11. Filter Design for Audio

Poles, zeros, and why filters sound different

We've used filters to shape sound — sweeping a low-pass across a sawtooth wave, opening a band-pass to let a vowel-like resonance sing through. But so far we've treated filters as black boxes with a cutoff knob and maybe a resonance slider. It's time to open the box. Why does a Moog ladder filter sound different from a state-variable filter? Why does cranking the resonance on a TB-303 make it scream? The answers live in the mathematics of poles and zeros.

The filtering article covered FIR and IIR basics — convolution, feedforward vs. feedback, the four filter types. This article goes deeper: we'll convert difference equations into transfer functions, visualise them as pole-zero plots on the z-plane, and survey the classic filter families that define the sound of synthesis.

From Difference Equations to the Z-Transform

Recall the general IIR difference equation:

y[n]=∑k=0Mbk x[n−k]  −  ∑j=1Naj y[n−j]y[n] = \sum_{k=0}^{M} b_k \, x[n-k] \;-\; \sum_{j=1}^{N} a_j \, y[n-j]

The bb coefficients weight past inputs (feedforward), and the aa coefficients weight past outputs (feedback). Every digital filter — low-pass, high-pass, resonant peak, parametric EQ — is fully specified by these two sets of numbers.

The z-transform converts this time-domain recipe into an algebraic expression. The key idea: replace a one-sample delay x[n−1]x[n-1] with multiplication by z−1z^{-1}, where zz is a complex variable. Apply this substitution to both sides of the difference equation and you get the transfer function:

H(z)=B(z)A(z)=b0+b1z−1+b2z−2+⋯1+a1z−1+a2z−2+⋯H(z) = \frac{B(z)}{A(z)} = \frac{b_0 + b_1 z^{-1} + b_2 z^{-2} + \cdots}{1 + a_1 z^{-1} + a_2 z^{-2} + \cdots}

This is a ratio of two polynomials in z−1z^{-1}. The numerator encodes the feedforward path; the denominator encodes the feedback path.

Why is this useful? Because to find the frequency response — how the filter treats each frequency — you evaluate H(z)H(z) on the unit circle by setting z=ejωz = e^{j\omega}, where ω\omega ranges from 0 to π\pi (DC to Nyquist). The magnitude ∣H(ejω)∣\lvert H(e^{j\omega}) \rvert tells you the gain at frequency ω\omega, and the angle ∠H(ejω)\angle H(e^{j\omega}) tells you the phase shift.

Worked Example: First-Order Low-Pass

Consider the simplest IIR low-pass: y[n]=(1−α) x[n]+α y[n−1]y[n] = (1 - \alpha)\, x[n] + \alpha\, y[n-1], with α=0.8\alpha = 0.8.

The transfer function is:

H(z)=1−α1−αz−1=0.21−0.8 z−1H(z) = \frac{1 - \alpha}{1 - \alpha z^{-1}} = \frac{0.2}{1 - 0.8\, z^{-1}}

Evaluating at z=ejωz = e^{j\omega}: at ω=0\omega = 0 (DC), z=1z = 1, so H(1)=0.2/(1−0.8)=1.0H(1) = 0.2 / (1 - 0.8) = 1.0 — full passthrough. As ω\omega increases toward π\pi, the denominator 1−0.8 e−jω1 - 0.8\, e^{-j\omega} grows in magnitude, and ∣H∣\lvert H \rvert drops. This is a low-pass filter, derived entirely from the algebra of the transfer function.

Poles and Zeros

The real power of the transfer function emerges when you factor the polynomials. Any rational transfer function can be written as:

H(z)=b0 (z−z1)(z−z2)⋯(z−zM)(z−p1)(z−p2)⋯(z−pN)H(z) = \frac{b_0 \,(z - z_1)(z - z_2)\cdots(z - z_M)}{(z - p_1)(z - p_2)\cdots(z - p_N)}

The values z1,z2,…z_1, z_2, \ldots where the numerator is zero are called zeros — at these frequencies, the filter output is zero (a perfect notch). The values p1,p2,…p_1, p_2, \ldots where the denominator is zero are called poles — at these frequencies, the filter's gain theoretically goes to infinity.

Plot these on the complex plane (the z-plane), and you have a complete picture of the filter's character:

  • Zeros on the unit circle create perfect nulls in the frequency response at the corresponding frequency.
  • Poles near the unit circle create resonant peaks — the closer the pole, the sharper and taller the peak.
  • Poles inside the unit circle mean the filter is stable (output decays over time). Poles outside mean instability (output grows without bound).
Diagram

The z-plane: poles and zeros

Z-Plane Re Im 1 -1 zero pole conjugate r < 1 Frequency Response frequency (0 to Nyquist) |H| pole freq 0 dB
Left: z-plane with unit circle (dashed). A zero at z = −1 (teal circle) creates a null at Nyquist. A conjugate pole pair inside the unit circle (red crosses) creates a resonant peak. Right: the resulting frequency response shows a peak near the pole frequency and a null at Nyquist.
The Pole-Zero Mental Model: Every digital filter can be understood as a collection of poles and zeros in the z-plane. Poles pull the frequency response up (creating peaks), zeros push it down (creating notches). The closer a pole or zero is to the unit circle, the more dramatic its effect. Learning to read pole-zero plots is like learning to read sheet music — once you can do it, you can hear the filter before you run it.

For real-valued filter coefficients, poles and zeros always come in conjugate pairs: if p=rejθp = re^{j\theta} is a pole, then p∗=re−jθp^* = re^{-j\theta} is also a pole. This symmetry ensures the frequency response is symmetric around DC, which is physically required for real signals.

The Biquad Filter

The biquad (short for bi-quadratic) is the workhorse of digital audio. It's a second-order IIR filter — two poles, two zeros — with the transfer function:

H(z)=b0+b1z−1+b2z−21+a1z−1+a2z−2H(z) = \frac{b_0 + b_1 z^{-1} + b_2 z^{-2}}{1 + a_1 z^{-1} + a_2 z^{-2}}

Six coefficients. That's it. By choosing these six numbers differently, the same biquad structure implements every standard filter type: low-pass, high-pass, band-pass, notch, peaking EQ, low shelf, and high shelf. The design parameters are the cutoff frequency fcf_c, the Q factor (resonance), and the gain (for peaking/shelving types).

Biquad Resonant Low-Pass Coefficients

Given sample rate fsf_s, cutoff frequency fcf_c, and Q factor:

ω₀ = 2π · fc / fs
α  = sin(ω₀) / (2Q)

b₀ = (1 − cos(ω₀)) / 2
b₁ =  1 − cos(ω₀)
b₂ = (1 − cos(ω₀)) / 2
a₁ = −2 cos(ω₀)
a₂ =  1 − α

All coefficients are then normalised by dividing by 1+α1 + \alpha. These formulas come from Robert Bristow-Johnson's "Audio EQ Cookbook" — the standard reference for biquad filter design, widely used in DAWs, plugins, and synthesisers.

Diagram

Biquad Signal Flow (Direct Form I)

x[n] b₀ Σ y[n] z⁻¹ b₁ z⁻² b₂ z⁻¹ −a₁ z⁻² −a₂ Feedforward (zeros) Feedback (poles)
Direct Form I biquad: the input signal passes through three feedforward taps (b₀, b₁, b₂ — teal) that set the zeros. The output feeds back through two taps (−a₁, −a₂ — red) that set the poles. All paths sum at Σ to produce the output.

The biquad's popularity comes from its simplicity and stability. A second-order section is small enough to avoid severe numerical precision issues, and you can cascade multiple biquads in series to build higher-order filters. A 4th-order Butterworth low-pass? Two biquad stages in series. An 8th-order Chebyshev? Four biquads.

Butterworth Filters

The Butterworth filter is the "no surprises" option. Its defining property is a maximally flat passband — no ripples at all. The magnitude response decreases monotonically from passband to stopband with no bumps or dips.

For an NNth-order Butterworth low-pass, the squared magnitude response is:

∣H(jω)∣2=11+(ω/ωc)2N\lvert H(j\omega) \rvert^2 = \frac{1}{1 + (\omega / \omega_c)^{2N}}

At the cutoff frequency ωc\omega_c, the gain is always exactly −3-3 dB regardless of order. Higher order means steeper roll-off: a 2nd-order Butterworth drops at 12 dB/octave, a 4th-order at 24 dB/octave, and so on.

In the analog (s-plane) prototype, Butterworth poles are evenly spaced on a semicircle of radius ωc\omega_c in the left half-plane. The bilinear transform maps these analog poles to z-plane poles for digital implementation, warping the frequency axis in the process. Pre-warping the cutoff frequency compensates for this distortion.

The Butterworth Trade-Off: Maximally flat passband comes at the cost of a relatively gentle transition band. If you need a sharp cutoff with a low filter order, Butterworth is not your best choice. But for general-purpose filtering where you want a clean, neutral sound without coloration, Butterworth is hard to beat.

In synthesisers, Butterworth filters sound "transparent" and "clean." They're the default choice in parametric EQs and crossover networks where accurate frequency separation matters more than character.

Chebyshev Filters

The Chebyshev Type I filter trades passband flatness for a steeper roll-off. It allows a controlled amount of ripple in the passband — small oscillations in the gain that stay within a specified bound (typically 0.5 dB to 3 dB). In exchange, for the same filter order, the transition from passband to stopband is significantly sharper than Butterworth.

The Chebyshev Type II (or inverse Chebyshev) takes the opposite approach: the passband is perfectly flat, but ripples appear in the stopband. This is useful when you need guaranteed passband flatness but don't care about how cleanly signals are rejected outside the band.

The ripple parameter ϵ\epsilon controls the trade-off. Larger ripple means steeper roll-off — but also more passband distortion. In a pole-zero diagram, Chebyshev poles lie on an ellipse rather than a circle, and the shape of that ellipse depends on the ripple.

Diagram

Butterworth vs Chebyshev Frequency Response

0 dB −10 −20 −30 −40 0 fc Nyquist Frequency → Gain (dB) −3 dB ripple Butterworth (4th order) Chebyshev I (4th order)
Both filters are 4th order with the same cutoff frequency. Butterworth (teal) has a perfectly flat passband but a gentler roll-off. Chebyshev Type I (red) allows small ripples in the passband but achieves a significantly steeper transition into the stopband.

In audio synthesis, Chebyshev-style filters sound more "aggressive" and "characterful" than Butterworth. The passband ripple adds subtle coloration to the signal — frequencies in the passband aren't all treated equally. Some classic analogue synth filters have response curves that resemble Chebyshev characteristics, either by design or by accident.

Resonant Filters and Self-Oscillation

Resonance is what makes a filter musical. When you push the Q parameter higher, the poles move closer to the unit circle, and the filter produces a sharp peak at the cutoff frequency. Feed in a harmonically rich signal — a sawtooth, white noise — and the resonant peak rings out like a struck bell, emphasising a narrow band of frequencies.

Mathematically, a pole at position p=r ejθp = r \, e^{j\theta} in the z-plane creates a peak in the frequency response near angle θ\theta. The radius rr determines the sharpness: at r=0.9r = 0.9, the peak is broad; at r=0.99r = 0.99, it's a sharp spike; at r=1.0r = 1.0, the pole sits exactly on the unit circle and the gain is theoretically infinite.

This is self-oscillation: the filter becomes an oscillator. With the pole on the unit circle, the system is marginally stable — energy at the resonant frequency neither grows nor decays. In practice, any noise or rounding error at the resonant frequency gets amplified and sustained indefinitely, producing a pure sine wave at the pole frequency.

From Filter to Oscillator: Self-oscillation is not a bug — it is one of the most expressive features of analogue synths. The Moog ladder filter, the Roland TB-303, and the Korg MS-20 are all famous for their self-oscillation behaviour. When you sweep the cutoff of a self-oscillating filter, you're playing a sine-wave melody generated by the filter itself. The mathematical reason is simple: poles on the unit circle create a marginally stable system that sustains oscillation forever.
Diagram

Resonance: Poles Approaching the Unit Circle

Low Q (r = 0.8) freq → Gentle roll-off, broad bump High Q (r = 0.95) freq → Sharp resonant peak at cutoff Self-oscillation (r = 1.0) freq → ∞ Infinite gain — filter becomes an oscillator
As Q increases, the conjugate pole pair (red crosses) moves outward toward the unit circle (dashed). At r = 0.8 the peak is barely visible. At r = 0.95 there is a sharp resonant spike. At r = 1.0 the poles sit on the circle — gain is theoretically infinite and the filter self-oscillates, producing a pure sine tone.

Many classic synthesiser filters are designed so that the resonance knob smoothly moves the poles from well inside the unit circle (gentle filtering) to right on the boundary (self-oscillation). The musical character of the instrument depends heavily on how this transition behaves — whether the onset of oscillation is gradual or abrupt, whether the oscillation is pure or distorted, and how the filter responds to incoming signal energy while oscillating.

Designing by Ear

Everything above is mathematically precise, but audio filter design is ultimately part science, part art. A "correct" Butterworth low-pass and a "correct" Chebyshev low-pass will both remove high frequencies — but they won't sound the same, and neither will sound like the ladder filter on a vintage Minimoog.

Analogue circuits introduce nonlinearities — soft clipping when the signal is hot, thermal drift that subtly detunes the cutoff, capacitor leakage that changes the effective Q. These imperfections are not flaws; they're the reason analogue synths have "warmth" and "character." A mathematically ideal digital filter is too clean — it sounds sterile.

Modern "analogue modelling" filters deliberately reintroduce these imperfections. Techniques include:

  • Soft saturation inside the feedback loop to emulate transistor or diode clipping.
  • Coefficient modulation to simulate thermal drift and component tolerance.
  • Zero-delay feedback (ZDF) topologies that more accurately model the continuous-time behaviour of analogue circuits, avoiding the one-sample delay artefacts of naive digital implementations.
  • Oversampling to reduce aliasing from the nonlinear elements.

The result: digital filters that respond to input level, that distort gracefully under resonance, that have the subtle inconsistencies that make analogue hardware feel alive. The mathematics of poles and zeros gives you the skeleton; the art of analogue modelling gives you the flesh.

Key Takeaways

  • The z-transform converts a filter's difference equation into a transfer function H(z)=B(z)/A(z)H(z) = B(z)/A(z). Evaluating on the unit circle (z=ejωz = e^{j\omega}) gives the frequency response.
  • Zeros are roots of the numerator (notches in the response); poles are roots of the denominator (peaks). Their positions in the z-plane completely determine the filter's behaviour.
  • The biquad — a second-order IIR with two poles and two zeros — is the universal building block of digital audio filters. Different coefficient choices produce every standard filter type.
  • Butterworth filters are maximally flat in the passband but have gentle roll-off. They sound clean and neutral.
  • Chebyshev filters allow passband ripple in exchange for steeper roll-off at the same order. They sound more aggressive and coloured.
  • Resonance moves poles toward the unit circle, creating a peak at the cutoff frequency. At the limit, the filter self-oscillates — it becomes a sine oscillator.
  • Real audio filter design goes beyond mathematics: analogue nonlinearities, saturation, and component drift are deliberately emulated to give digital filters warmth and character.

Try It — Pole-Zero Explorer

Click on the z-plane to place poles (×) and zeros (○). Poles and zeros are automatically mirrored as conjugate pairs. The frequency response updates instantly. Use the presets to see classic filter configurations.

Z-Plane (click to place)
Frequency Response (magnitude)
Phase Response

We now have a solid understanding of what happens inside a filter — poles pulling the response up, zeros pushing it down, and the biquad as the universal building block. This mathematical framework explains why different filters sound different, and why resonance is such a powerful musical tool.

The next article explores the other side of synthesis: additive and FM synthesis. Instead of starting with a rich signal and carving it with filters (subtractive synthesis), we'll build complex timbres by combining and modulating simple sine waves — a fundamentally different approach to sound design that produces textures no filter can create.