|
| 1 | +<!-- |
| 2 | +id:otafilter |
| 3 | +category:Signal Modifiers:Standard Filters:Resonant |
| 4 | +--> |
| 5 | +# otafilter |
| 6 | +Resonant 4pole non-linear lowpass filter. |
| 7 | + |
| 8 | +Otafilter is a version of [vclpf](../opcodes/vclpf.md) with |
| 9 | +non-linearities inserted in the signal path. It attempts to |
| 10 | +model the saturation behaviour of an operational transconductance |
| 11 | +amplifier (OTA), which is commonly used in the implementation |
| 12 | +of analogue filters. The filter has two outputs: the usual 4-pole |
| 13 | +output plus a tap midway through the filter structure after the |
| 14 | +second stage (a 2-pole output). |
| 15 | + |
| 16 | +## Syntax |
| 17 | +=== "Modern" |
| 18 | + ``` csound-orc |
| 19 | + sig4:a, sig2:a = otafilter(in:a, cf:{a,k}, res:{a,k}, drive:k[, stor:i]) |
| 20 | + ``` |
| 21 | + |
| 22 | +=== "Classic" |
| 23 | + ``` csound-orc |
| 24 | + asig4,asig2 otafilter ain, xcf, xres, kdrive[, istor] |
| 25 | + ``` |
| 26 | + |
| 27 | +### Initialization |
| 28 | + |
| 29 | +_stor_ --initial disposition of internal data space. Since filtering incorporates a feedback loop of previous output, the initial status of the storage space used is significant. A zero value will clear the space; a non-zero value will allow previous information to remain. The default value is 0. |
| 30 | + |
| 31 | +### Performance |
| 32 | + |
| 33 | +_sig4_ -- 4-pole output |
| 34 | + |
| 35 | +_sig2_ -- 2-pole output |
| 36 | + |
| 37 | +_in_ -- input signal. |
| 38 | + |
| 39 | +_cf_ -- filter cutoff frequency (a- or k-rate) |
| 40 | + |
| 41 | +_res_ -- resonance, between 0 and 1. Higher values will make the |
| 42 | +filter self-oscillate (a- or k-rate). |
| 43 | + |
| 44 | +_drive_ -- filter drive gain (0 - no drive, > 0 - increased drive) |
| 45 | + |
| 46 | +## Examples |
| 47 | + |
| 48 | +Here is an example of the otafilter opcode. It uses the file [otafilter.csd](../examples/otafilter.csd). |
| 49 | + |
| 50 | +``` csound-csd title="Example of the otafilter opcode." linenums="1" |
| 51 | +--8<-- "examples/otafilter.csd" |
| 52 | +``` |
| 53 | + |
| 54 | +## See also |
| 55 | + |
| 56 | +[Standard Filters: Resonant Low-pass filters](../sigmod/standard.md) |
| 57 | + |
| 58 | +## Credits |
| 59 | + |
| 60 | +Author: Victor Lazzarini<br> |
| 61 | +April 2024<br> |
0 commit comments