Biquad filters¶
BiquadCoefficients::design supplies lowpass, highpass, unity-center bandpass,
notch, allpass and peaking filters. Sample rate must be finite/positive, frequency
strictly between DC and Nyquist, Q in (0, 1,000,000], and peaking gain between
-120 and 120 dB. The equations follow the
Audio EQ Cookbook.
new also accepts normalized numerator/denominator coefficients, checking finite
values and strict second-order Jury stability. Numerically unrepresentable
stability margins reject instead of producing a nominally stable filter.
magnitude_at evaluates linear amplitude at normalized frequencies 0..=0.5.
Biquad uses one channel of transposed direct-form II f64 state. Replacement
preserves delay state; reset clears it. Neither operation smooths transitions.
Even-order Butterworth designs and explicit cascades are described below;
automatic modulation remains pending. Tests check
response landmarks and an independent direct-form impulse recurrence across
block partitions, plus invalid/unstable designs.