Expand description
Direct Form II Transposed (DF2T) 3-Band Parametric Biquad Filter.
Designed for the Webizen AudioWorklet real-time audio thread:
- DF2T Topology: 2 state variables per biquad, superior numerical stability against low-frequency pole quantization (200 Hz low-shelf anchor).
- Denormal Prevention: Injects $10^{-24}$ DC offset into raw samples, preventing subnormal stall penalties (up to 100x) on mobile ARM NEON FPUs.
- 128-Sample Quantum Ramping: Trigonometric coefficient updates occur strictly at quantum boundaries (2.67 ms @ 48 kHz). Inner sample loop linearly ramps coefficients using 5 scalar additions per sample, eliminating zipper noise and audio clicks.
- Zero-Heap Hot Path: Evaluates directly into caller-supplied slices, delegating
RBJ Audio EQ Cookbook synthesis and DF2T recurrence math to
etalon_signal::filter.
Structs§
- Biquad
Coeffs - Normalized biquad filter coefficients $H(z) = \frac{b_0 + b_1 z^{-1} + b_2 z^{-2}}{1 + a_1 z^{-1} + a_2 z^{-2}}$.
- Df2t
Biquad - Single DF2T biquad filter with linear coefficient ramping.
- Df2t
State - Direct Form II Transposed filter state registers.
- Three
Band Parametric Biquad - 3-Band Parametric Equalizer consisting of cascaded DF2T biquads:
Constants§
- ANCHOR_
HIGH_ HZ - High-frequency shelf anchor (Hz).
- ANCHOR_
LOW_ HZ - Low-frequency shelf anchor (Hz).
- ANCHOR_
MID_ HZ - Mid-frequency peaking band anchor (Hz).
- AUDIO_
WORKLET_ DF2T_ JS - Standalone JavaScript snippet for standard AudioWorkletProcessor registration.
- DENORMAL_
DC_ OFFSET - DC offset injected per sample to prevent subnormal-FPU stall penalties.
- QUANTUM_
SIZE - AudioWorklet render quantum — coefficient updates and ramping occur at these boundaries (2.67 ms @ 48 kHz).