Advanced filter design: biquads, allpass, and phase response
Learning objectives
- learner can implement common filters as biquads and reason about pole/zero structure, cascading, and Butterworth response
- learner can explain filter phase behavior — allpass dispersion, frequency-dependent delay, and harmonic phase shift — and use expressive resonant-edge patches
Capstone — one whole task that evidences the objectives
Implement a resonant lowpass as a biquad and a cascade for a steeper slope, add an allpass stage for phase movement, push the resonance to the edge of self-oscillation and play the patch expressively (velocity/aftertouch) on a bass, demonstrating how the filter's phase response (not just its magnitude) changes the sound.
Prerequisite modules
Every live-coded bassline in a club set lives or dies on its filter — and by L3 the presets stop being enough. This module builds toward implementing your own filter chain and hearing what the spec sheets hide: that a filter is a time machine as much as a tone control. On a sub-heavy bass through a big PA, the phase response — how much each harmonic is delayed — audibly reshapes the waveform even when the magnitude curve looks identical. That is why two 24 dB lowpasses at the same cutoff can feel completely different, and why topology (ladder versus state-variable) is a sound-design choice, not an implementation detail.
The arc starts supported: code a single resonant lowpass from the biquad cookbook (the two-pole, two-zero structure with six coefficients is your JIT how-to), verify its slope against the pole-count rule of thumb, and sweep it on a saw bass. Then steepen it by cascading — where the trap that identical stacked stages sag the corner by an extra 3 dB forces you to derive per-stage Q for a true Butterworth. Next, insert an allpass stage: flat magnitude, but frequency-dependent delay that smears the harmonics’ phase and visibly warps the waveform. Finally, remove the scaffolding for the capstone: build the full chain yourself, ride the resonance up to the edge of self-oscillation so the patch responds expressively to touch, and demonstrate — by ear and by scope — that phase alone changes the bass.
The required atoms gate this directly: biquad implementation, cascade Q correction, the two allpass views, the magnitude/phase distinction, harmonic phase shift, and the resonance-edge expressive patch. Supporting atoms enrich the story — topology character (why ladder and state-variable chains sound different), pole/rolloff and Q refreshers, Surge XT’s Vintage Ladder as a reference model, tolerance-window response specs, and resonant EQ as drum-body modeling.
Runnable examples
Generated from the context/ instrument corpus by concept (redistributable idioms only). Do not edit — regenerate with gen-module-examples.mjs.
resonant-filter
SinOsc s => LPF f => dac; 400 => f.freq;
chuck-0002 · MIT
play :e2, cutoff: 90, res: 0.9, release: 0.3
sonicpi-0022 · CC0
Atoms in this module
Required — these gate the capstone
Supporting — enrichment, not gating
Part of curricula
- Synthesist / Sound Designer — deep DSP to a performed live synth rig — Deep DSP — advanced operators, spectral, physical, formant, procedural required