zdf_2pole_mode
Prev | Orchestra Opcodes and Operators | Next

## zdf_2pole_mode

zdf_2pole_mode — Zero-delay feedback implementation of 2 pole filter with multimode output.

## Description

Zero-delay feedback implementation of a 2 pole (12 dB/oct) filter. Offers low-pass, band-pass, and high-pass output.

## Syntax

    alp, abp, ahp zdf_2pole_mode ain, xcf, Q [, istor]

## Initialization

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.

## Performance

alp -- low-pass output signal.

abp -- band-pass output signal.

ahp -- high-pass output signal.

ain -- input signal.

xcf -- filter cutoff frequency (i-, k-, or a-rate).

Q -- filter Q value (i-, k-, or a-rate). Range 0.5-25.0.

## Examples

Here is an example of the zdf_2pole_mode opcode. It uses the file zdf_2pole_mode.csd.

Example 1239. Example of the zdf_2pole_mode opcode.

    <CsoundSynthesizer>
    <CsOptions>
    -o dac
    </CsOptions>
    <CsInstruments>

    sr	= 44100
    ksmps	=	1
    nchnls	=	2
    0dbfs	=	1

    instr 1
      asig = random:a(-1.0, 1.0)
      asigs[] init 3
      asigs[0], asigs[1], asigs[2] zdf_2pole_mode asig, line(20, p3, 10000), 4

      asig = asigs[p4]
      outc(asig, asig)
    endin

    instr 2
      asig = vco2(0.5, 220)
      asigs[] init 3
      asigs[0], asigs[1], asigs[2] zdf_2pole_mode asig, line(20, p3, 10000), 4
      outc(asigs[p4], asigs[p4])
    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>

## References

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.

1. Pirkle, Will. Designing Software Synthesizer Plug-ins in C++: For RackAFX, VST3, and Audio Units. CRC Press, 2014.

2. Pirkle, Will. AN-4: Virtual Analog (VA) Filter Implementation. 2013.

3. Zavalishin, Vadim. "The Art of VA filter design." Native Instruments, 2012.

## Credits

Author: Steven Yi
April 2017

New in Csound 6.09.0

Prev | Up | Next
zdf_2pole | Home | zdf_ladder