template<FloatType SampleType, size_t NumStages>
class marvin::dsp::filters::Biquad< SampleType, NumStages >
A cascading direct form ii biquad filter.
Biquads have a tendency to "blow up" at high modulation frequencies, so keep in mind that a StateVariableFilter (coming soon) might be a better choice if that's the kind of thing you need. Uses a coeffs as the numerators (zeroes) and b coeffs as the denominators (poles).
Usage example:
class Processor final {
public:
void initialise(double sampleRate) {
m_lpf.setCoeffs(0, coeffs);
}
[[nodiscard]] float operator()(float x) noexcept {
const auto filtered = m_lpf(x);
return filtered;
}
void reset() noexcept {
m_lpf.reset();
}
private:
};
A cascading direct form ii biquad filter.
Definition marvin_Biquad.h:49
BiquadCoefficients< SampleType > lowpass(double sampleRate, SampleType cutoff, SampleType q) noexcept
Definition marvin_RBJCoefficients.h:25