A State Variable filter which offers 12db resonant low, high, bandpass and notch modes. More...
Public Member Functions | |
StateVariable () | |
Constructor. | |
void | setResonance (Q0n8 resonance) |
Set how resonant the filter will be. | |
void | setCentreFreq (unsigned int centre_freq) |
Set the centre or corner frequency of the filter. | |
int | next (int input) |
Calculate the next sample, given an input signal. |
A State Variable filter which offers 12db resonant low, high, bandpass and notch modes.
FILTER_TYPE | choose between LOWPASS, BANDPASS, HIGHPASS and NOTCH. |
Definition at line 54 of file StateVariable.h.
int StateVariable< FILTER_TYPE >::next | ( | int | input | ) | [inline] |
Calculate the next sample, given an input signal.
input | the signal input. |
Definition at line 120 of file StateVariable.h.
void StateVariable< FILTER_TYPE >::setCentreFreq | ( | unsigned int | centre_freq | ) | [inline] |
Set the centre or corner frequency of the filter.
centre_freq | 20 - 4096 Hz (AUDIO_RATE/4). This will be the cut-off frequency for LOWPASS and HIGHPASS, and the centre frequency to pass or reduce for BANDPASS and NOTCH. |
Definition at line 103 of file StateVariable.h.
void StateVariable< FILTER_TYPE >::setResonance | ( | Q0n8 | resonance | ) | [inline] |
Set how resonant the filter will be.
resonance | a byte value between 1 and 255. The lower this value is, the more resonant the filter. At very low values, the filter can output loud peaks which can exceed Mozzi's output range, so you may need to attenuate the output in your sketch. |
Definition at line 75 of file StateVariable.h.