^ programmer's guide | std classes | basic ugen

ChucK basic filters

BPF | BRF | LPF | HPF | ResonZ
BiQuad | OnePole | TwoPole | OneZero | TwoZero | PoleZero

filters


FilterBasic

FilterBasic is the base class for several simple filters.

FilterBasic.functions Filter base class.
see UGen
float Q(), Q(float val) Get/set filter resonance
float freq(), freq(float val) Get/set filter cutoff/center frequency.
void set(float freq, float Q) Set filter frequency and resonance at the same time.

BPF

BPF is a band pass filter. 2nd order Butterworth. (In the future, this class may be expanded so that order and type of filter can be set).

BPF.functions
see FilterBasic
see bp.ck

BRF

BRF is a band reject filter. 2nd order Butterworth. (In the future, this class may be expanded so that order and type of filter can be set).

BRF.functions
see FilterBasic
see br.ck

LPF

LPF is a resonant low pass filter. 2nd order Butterworth. (In the future, this class may be expanded so that order and type of filter can be set).

LPF.functions
see FilterBasic
see lp.ck
rlp.ck

HPF

HPF is a resonant high pass filter. 2nd order Butterworth. (In the future, this class may be expanded so that order and type of filter can be set).

HPF.functions
see FilterBasic
see hp.ck
rhp.ck

ResonZ

ResonZ Resonance filter. BiQuad with equal-gain zeros. Keeps gain under control independent of frequency.

ResonZ.functions
see FilterBasic
see resonz.ck

BiQuad

BiQuad STK biquad (two-pole, two-zero) filter class. This protected Filter subclass implements a two-pole, two-zero digital filter. A method is provided for creating a resonance in the frequency response while maintaining a constant filter gain.
by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

BiQuad.functions Description
float a0(), a0(float) get/set a0 coefficient
float a1(), a1(float) get/set a1 coefficient
float a2(), a2(float) get/set a2 coefficient
float b0(), b0(float) get/set b0 coefficient
float b1(), b1(float) get/set b1 coefficient
float b2(), b2(float) get/set b2 coefficient
float pfreq(), pfreq(float) get/set resonance frequency (poles)
float prad(), prad(float) get/set pole radius (less than 1 to be stable)
float zfreq(), zfreq(float) get/set notch frequency
float zrad(), zrad(float) get/set zero radius
float norm(), norm(float) get/set normalization
float eqzs(), eqzs(float) get/set equal gain zeroes

OnePole

OnePole This protected Filter subclass implements a one-pole digital filter. A method is provided for setting the pole position along the real axis of the z-plane while maintaining a constant peak filter gain.
by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

OnePole.functions Description
float a1(), a1(float) get/set filter coefficient
float b0(), b0(float) get/set filter coefficient
float pole(), pole(float) get/set pole position along real axis of z-plane

TwoPole

TwoPole This protected Filter subclass implements a two-pole digital filter. A method is provided for creating a resonance in the frequency response while maintaining a nearly constant filter gain.
by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

TwoPole.functions Description
float a1(), a1(float) filter coefficient
float a2(), a2(float) filter coefficient
float b0(), b0(float) filter coefficient
float freq(), freq(float) filter resonance frequency
float radius(), radius(float) filter resonance radius
float norm(), norm(float) toggle filter normalization
see: powerup.ck

OneZero

OneZero This protected Filter subclass implements a one-zero digital filter. A method is provided for setting the zero position along the real axis of the z-plane while maintaining a constant filter gain.
by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

OneZero.functions Description
float zero(), zero(float) get/set zero position
float b0(), b0(float) get/set filter coefficient
float b1(), b1(float) get/set filter coefficient

TwoZero

TwoZero This protected Filter subclass implements a two-zero digital filter. A method is provided for creating a "notch" in the frequency response while maintaining a constant filter gain.
by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

TwoZero.functions Description
float b0(), b0(float) filter coefficient
float b1(), b1(float) filter coefficient
float b2(), b2(float) filter coefficient
float freq(), freq(float) filter notch frequency
float radius(), radius(float) filter notch radius

PoleZero

PoleZero This protected Filter subclass implements a one-pole, one-zero digital filter. A method is provided for creating an allpass filter with a given coefficient. Another method is provided to create a DC blocking filter.
by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

PoleZero.functions Description
float a1(), a1(float) get/set filter coefficient
float b0(), b0(float) get/set filter coefficient
float b1(), b1(float) get/set filter coefficient
float blockZero(), blockZero(float) get/set DC blocking filter with given pole position
float allpass(), allpass(float) get/set allpass filter with given coefficient
home .. language .. program .. examples