biquad - Biquad IIR filter
loadrt biquad [count=N|names=name1[,name2...]] |
Biquad IIR filter. Implements the following transfer function: H(z) = (n0 + n1z-1 + n2z-2) / (1+ d1z-1 + d2z-2)
biquad.N (requires a floating-point thread)
biquad.N.in float in
Filter input.
biquad.N.out float out
Filter output.
biquad.N.enable bit in (default: 0)
Filter enable. When false, the in pin is passed to the out pin without any filtering. A transition from false to true causes filter coefficients to be calculated according to the current type and the describing pin and parameter settings
biquad.N.valid bit out (default: 0)
When false, indicates an error occurred when calculating filter coefficients (require 2>Q>0.5 and f0>sampleRate/2)
biquad.N.type u32 in (default: 0)
Filter type determines the type of filter coefficients calculated. When 0, coefficients must be loaded directly from the n0,n1,n2,d1 params. When 1, a low pass filter is created specified by the f0,Q pins. When 2, a notch filter is created specified by the f0,Q pins.
biquad.N.f0 float in (default: 250.0)
The corner frequency of the filter.
biquad.N.Q float in (default: 0.7071)
The Q of the filter.
biquad.N.s1 float out (default: 0.0)
1st-delayed internal state (for debug only)
biquad.N.s2 float out (default: 0.0)
2nd-delayed internal state (for debug only)
biquad.N.d1 float rw (default: 0.0)
1st-delayed denominator coef
biquad.N.d2 float rw (default: 0.0)
2nd-delayed denominator coef
biquad.N.n0 float rw (default: 1.0)
non-delayed numerator coef
biquad.N.n1 float rw (default: 0.0)
1st-delayed numerator coef
biquad.N.n2 float rw (default: 0.0)
2nd-delayed numerator coef
Peter G. Vavaroutsos
GPL