dplug.dsp.iir

Basic IIR 1-pole and 2-pole filters through biquads.

Members

Aliases

BiquadCoeff
alias BiquadCoeff = double[5]

Type which hold the biquad coefficients. Important: Coefficients are considered always normalized by a0. Note: coeff[0] is b0, coeff[1] is b1, coeff[2] is b2, coeff[3] is a1, coeff[4] is a2 in the litterature.

Functions

biquadBypass
BiquadCoeff biquadBypass()

Identity biquad, pass signal unchanged.

biquadOnePoleHighPass
BiquadCoeff biquadOnePoleHighPass(double frequency, double sampleRate)

1-pole high-pass filter. Note: the cutoff frequency can be >= nyquist, in which case it is equal to zero. the cutoff frequency can be below 0 Hz, in which case it asymptotically approaches a bypass. You always have -3 dB at cutoff in the valid range.

biquadOnePoleHighPassImprecise
BiquadCoeff biquadOnePoleHighPassImprecise(double frequency, double samplerate)

1-pole high-pass filter, frequency mapping is not precise. Not accurate across sample rates, but coefficient computation is cheap. Not advised.

biquadOnePoleLowPass
BiquadCoeff biquadOnePoleLowPass(double frequency, double sampleRate)

1-pole low-pass filter. Note: the cutoff frequency can be >= nyquist, in which case it asymptotically approaches a bypass. the cutoff frequency can be below 0 Hz, in which case it is equal to zero. You always have -3 dB at cutoff in the valid range.

biquadOnePoleLowPassImprecise
BiquadCoeff biquadOnePoleLowPassImprecise(double frequency, double samplerate)

1-pole low-pass filter, frequency mapping is not precise. Not accurate across sample rates, but coefficient computation is cheap. Not advised.

biquadRBJBandPass
BiquadCoeff biquadRBJBandPass(double frequency, double samplerate, double Q = SQRT1_2)

Band-pass filter as described by Robert Bristow-Johnson.

biquadRBJHighPass
BiquadCoeff biquadRBJHighPass(double frequency, double samplerate, double Q = SQRT1_2)

High-pass filter 12 dB/oct as described by Robert Bristow-Johnson.

biquadRBJHighShelf
BiquadCoeff biquadRBJHighShelf(double frequency, double samplerate, double gain, double Q = SQRT1_2)

High-shelf filter as described by Robert Bristow-Johnson.

biquadRBJLowPass
BiquadCoeff biquadRBJLowPass(double frequency, double samplerate, double Q = SQRT1_2)

Low-pass filter 12 dB/oct as described by Robert Bristow-Johnson.

biquadRBJLowShelf
BiquadCoeff biquadRBJLowShelf(double frequency, double samplerate, double gain, double Q = SQRT1_2)

Low-shelf filter as described by Robert Bristow-Johnson.

biquadRBJNotch
BiquadCoeff biquadRBJNotch(double frequency, double samplerate, double Q = SQRT1_2)

Notch filter as described by Robert Bristow-Johnson.

biquadRBJPeak
BiquadCoeff biquadRBJPeak(double frequency, double samplerate, double gain, double Q = SQRT1_2)

Peak filter as described by Robert Bristow-Johnson.

biquadZero
BiquadCoeff biquadZero()

Zero biquad, gives zero output.

Structs

BiquadDelay
struct BiquadDelay

Maintain state for a biquad state. A biquad is a realization that can model two poles and two zeros.

Meta