Two poles and two zeros — the smallest filter that can resonate, and the one that, cascaded, shapes almost all digital sound. Its transfer function is H(z) = (b0 + b1 z⁻¹ + b2 z⁻²) / (1 + a1 z⁻¹ + a2 z⁻²). Down the center, signal flows: coefficients go in, the engine places the poles and zeros, and a proven response — stable or not — comes out. The blue team builds and defends it; the red team tries to break it by pushing a pole outside the unit circle.
source R. Bristow-Johnson, "Cookbook formulae for audio EQ biquad filter coefficients" (web memo, c.1994; W3C copy) — and A. Oppenheim & R. Schafer, Discrete-Time Signal Processing (Prentice-Hall, 1975/1989), §6, direct-form structures. w3.org/2011/audio/audio-eq-cookbook.html. Rendered, not quoted.
The biquad is a second-order IIR filter. Multiply top and bottom of H(z) by z², and it is a ratio of two quadratics: the zeros are the roots of the numerator b0 z² + b1 z + b2, the poles the roots of the denominator z² + a1 z + a2.
It runs as one line of arithmetic per sample — the difference equation:
y[n] = b0·x[n] + b1·x[n-1] + b2·x[n-2]
− a1·y[n-1] − a2·y[n-2]
The selfcheck proves four things about it live — stability from the pole radii, that the coefficients realize a low-pass shape, that a pole near the unit circle makes a resonant peak, and that this recurrence reproduces H(z) exactly. Current filter:
The biquad is the atom of audio DSP. Two poles, two zeros — too few to be a sharp filter alone, so you cascade them: a graphic or parametric equalizer is a chain of biquads, each shaping one band.
Its cousin is the-comb-filter — the same idea of feedback and feedforward, but spread across a long delay so the zeros comb the spectrum at regular intervals. The biquad is the local resonator; the comb is the delayed echo. Every reverb is both, stacked. One sphere is the next one's premise.
The blue team's live check: recompute the canonical pole radius and the low-pass DC/Nyquist invariants on every interaction, and confirm the pole stays inside the unit circle. If red pushes it out (window 6), this badge is where it turns red.
A biquad is five numbers: b0, b1, b2 (the feed-forward, which place the zeros) and a1, a2 (the feedback, which place the poles; a0 is normalized to 1). You do not usually type them — you name a shape (low-pass, high-pass, band-pass), a cutoff f₀/fs, and a Q, and the cookbook maps them to the five coefficients through the bilinear transform.
Pick a shape and drag the sliders below — those three inputs are what you feed the engine.
Web Audio runs real white noise through this exact biquad (IIRFilterNode). An unstable filter is refused — it would only produce a blow-up.
Change any control — the coefficients, poles, zeros, response and stability are computed from H(z) on the spot, never looked up.
What the machine proves, live: the filter is STABLE if and only if both poles lie strictly inside the unit circle (|z| < 1, read off the denominator roots exactly); a constructed low-pass passes DC at unit gain and drives Nyquist to zero; a pole at radius 0.99 and angle ω₀ makes the response peak at ω₀; and the sample-by-sample recurrence reproduces H(z) to 1e-9. Verdict for the current filter is above.
The blue team's witness (left) confirms the pole stays inside; the red team (right) tries to shove it out.
Worse, in fixed-point the danger is coefficient quantization: a pole designed at |z| = 0.9998 can round to |z| > 1 and the filter explodes. "Stable" is a property of the ideal coefficients; the shipped ones are quantized — which is why the panel lets you watch the pole radius, and why the tamper below is not a fantasy.
"Stability depends on the zeros too." Cut. Stability depends only on the poles (the denominator). Zeros set the shape and the phase; they never move the stability boundary. Minimum-phase is a zero question, stability a pole question.
"A higher-order filter is always better." Cut. A single high-order polynomial is numerically ill-conditioned; the whole reason to cascade biquads is that 2nd-order sections keep the coefficients well-behaved.
"Direct Form II is the best structure." Kept, corrected. Plain DF-II shares delays but its internal state can overflow; DF-II transposed has better rounding noise. Same H(z), different arithmetic.
The red team's move: push the canonical pole from radius 0.9 out to 1.06 — outside the unit circle. The impulse response then grows without bound: a bounded input yields an unbounded output. The blue team's witness (window 7) is watching the radius.
Move the pole outside and the filter is no longer stable — the witness recomputes the pole radius, sees |z| > 1, and turns red. Nothing is faked; the instability is real and it is caught.