zdf_1pole — Zero-delay feedback implementation of 1 pole filter.
Zero-delay feedback implementation of a 1 pole (6 dB/oct) filter. Offers low-pass (default), high-pass, and allpass output modes.
istor --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.
asig -- high-pass output signal.
asig -- input signal.
xcf -- filter cutoff frequency (i-, k-, or a-rate).
kmode -- filter output type. The default value is 0. The output mode may be one of the following.
0 - low-pass
1 - high-pass
2 - allpass
Here is an example of the zdf_1pole opcode. It uses the file zdf_1pole.csd.
Example 1245. Example of the zdf_1pole opcode.
<CsoundSynthesizer> <CsOptions> -o dac </CsOptions> <CsInstruments> sr = 48000 ksmps = 1 nchnls = 2 0dbfs = 1 instr 1 asig = random:a(-1.0, 1.0) asig = zdf_1pole(asig, line(220, p3, 10000), p4) outc(asig, asig) endin instr 2 asig = vco2(0.5, 220) asig = zdf_1pole(asig, line(220, p3, 10000), p4) outc(asig, asig) endin </CsInstruments> <CsScore> i1 0 4 0 i1 5 4 1 i1 10 4 2 i2 15 4 0 i2 20 4 1 i2 25 4 2 </CsScore> </CsoundSynthesizer>
This filter is based on the work of Will Pirkle that employs Vadim Zavalishin's work with bilinear tranforms to create topology-preserving transform (TPT) implementations of analog filters.
Pirkle, Will. Designing Software Synthesizer Plug-ins in C++: For RackAFX, VST3, and Audio Units. CRC Press, 2014.
Pirkle, Will. AN-4: Virtual Analog (VA) Filter Implementation. 2013.
Zavalishin, Vadim. "The Art of VA filter design." Native Instruments, 2012.