FilterProcessor
A biquad filter with a selectable type, cutoff frequency and resonance.
| Declared in | src/libs/libbahn/bahn/tracker/processor/FilterProcessor.hpp |
| Inherits | Processor |
| Group | bahn |
Detailed description
The Type parameter selects low-pass, high-pass, band-pass, notch, peak, low shelf or high shelf. Frequency sets the cutoff from 20 Hz to 20000 Hz on a logarithmic scale, and Resonance sets the Q factor. A Biquad unit does the filtering.
Member function documentation
setSampleRate
[override virtual] void FilterProcessor::setSampleRate(int rate)
Follow the device: rate is the sample rate of the output device, in Hz. A rate of zero or less, or a rate equal to the current one, changes nothing.
Biquad stores its corner NORMALISED, so its own hook needs the previous rate to recover the frequency in Hz. Handing the unit the rate and letting it do that arithmetic is the whole fix; updating coefficients from here would mean this class knowing how Biquad stores things.