A filter that makes a sound darker or brighter, and can make it ring and sing, the way the famous Moog synthesizers do.

In the menu: filters, then resonant.
Most sounds are a mixture of low parts and high parts: the deep body of a note, and the bright, sharp edge on top of it. Think of music heard through a wall from the next room: you hear the bass and the drums' thump, but the brightness is gone. The wall is a filter that lets low sounds through and stops high ones. The ladder filter does the same, and you choose where the wall starts with the cutoff frequency.
Turning the cutoff down makes a sound darker and softer; turning it up makes it brighter and sharper. What makes a filter so useful is moving the cutoff while a sound plays. Sweeping it up and down gives the "wow" or "wah" sound you've heard on countless records. Here's a buzzy tone with the cutoff sweeping slowly up and back down:
Resonance makes the filter ring at its cutoff, a little like the ring of a wine glass. As you turn it up, the part of the sound right at the cutoff gets louder and more pronounced, and a sweep starts to sound like a voice saying "eeeow":
Turn it all the way up and the filter starts to whistle by itself, a pure tone at the cutoff frequency, on top of the sound going through it. Sweep the cutoff now and you hear the whistle glide up and down:
Drive pushes the sound into the filter harder. A little drive adds warmth; more makes the sound rougher and more growling, the way an amplifier sounds when it's turned up too far. Here the drive slowly rises from 0 to 1 and falls again, with the cutoff and resonance held still:
Drive also makes the filter whistle sooner: with the drive up, even a middling resonance can set it singing.
These are the sound examples above, being made: a sawtooth oscillator goes through the filter, and a slow LFO, through a converter, sweeps its cutoff.

A scope shows what the filter does to a wave. On the left, a buzzy sawtooth wave at 110 Hz through the filter with its cutoff at 600 Hz and no resonance: the sharp corners are rounded off. On the right, the resonance is at 0.7: each sharp edge of the wave sets the filter ringing, and you can see the ringing die away between them.


Because the resonance and drive can make the filter louder than the sound going in, its output can go past full volume and distort harshly. If that happens, follow it with an "attenuation filter" (from filters, then basic) to turn it down.
The tutorial in chapter 2 uses a ladder filter in its step 5The ladder filter is a four-pole (24 dB per octave) resonant low-pass filter modelled on Robert Moog's transistor ladder, the filter of the Moog modular systems and the Minimoog, and of the many instruments since that borrowed its sound. It's the filter for fat basses, brassy leads and the classic filter-envelope "pluck".
Below the cutoff, the passband is flat; above it, the response falls by 24 dB an octave, four times as steeply as a one-pole tone control, so the harmonics above the cutoff are removed decisively rather than just softened. With no resonance, the response is already about 12 dB down at the cutoff itself, so the knee is soft and round, which is part of the ladder's smooth, "creamy" character.

Since a sawtooth's harmonics fall at 6 dB an octave, the cutoff is effectively the point where the timbre turns from bright to sine-like: set it near the fundamental and a sawtooth becomes nearly a sine; a couple of octaves above and it's warm and round; four or five octaves above and it's open and buzzy.
Resonance (emphasis, or Q) feeds the output back to the input, inverted, which boosts a narrow band around the cutoff into a peak. Sweeping a resonant cutoff through a harmonically rich tone picks out each harmonic in turn, giving the vocal "wow" of filter sweeps. At around 0.8 (with no drive) the peak becomes self-sustaining and the filter oscillates, producing a near-sine tone just below the cutoff: it needs only the faintest input to start, and then sustains itself.

Two things that shape the sound, both faithful to the original:
You can see the resonant peak on a spectrum analyser, filtering white noise with the cutoff at 1 kHz. On the left, no resonance: a flat passband and a steep fall above the cutoff. On the right, resonance at 0.8: the peak just below 1 kHz.


The drive is a tanh saturation stage where the input and the feedback meet, like the overdriven input transistors of the real ladder. It adds odd harmonics, rounds off peaks, and compresses, so loud passages thicken and growl while quiet ones stay cleaner.

It also changes how the resonance behaves. Driving harder raises the filter's gain for quiet signals, so the feedback loop is stronger, and the filter self-oscillates at a lower resonance: from about 0.8 with no drive, down to about 0.5 at drive 0.5 and under 0.2 at full drive. In the shaded region below, the filter whistles by itself; below it, it rings but dies away. Once oscillating, the saturation keeps the whistle from growing without limit, and adds a little edge to its otherwise sine-like tone.

So drive and resonance work together: high drive with moderate resonance gives the aggressive, squelchy resonance of acid basslines, which feeds back on itself and distorts as it peaks. Compare the same bassline played with no resonance and a little drive, then with resonance 0.85 and drive 0.5:
The ladder filter is a virtual-analogue model: four trapezoidal-integrated one-pole low-pass sections in series, in a negative feedback loop closed through a unit delay, with a normalised tanh saturator at the loop's input. All state is kept in double precision.

Each section is a one-pole low pass discretised with the trapezoidal rule (the bilinear transform) in topology-preserving form, as in Zavalishin's "The Art of VA Filter Design". The cutoff f_c is first clamped to [20 Hz, 0.45 f_s] and prewarped, so each section's analogue cutoff maps exactly to f_c:

Each sample, a section with state s takes its input x to its output y with:

which has the transfer function of the bilinear transform of ω_c / (s + ω_c), with a zero at Nyquist:

g and G are recomputed only when the cutoff changes.
With resonance r and drive d (both in [0, 1]), the feedback gain is k = 4r, and the saturator's gain is a = ½ · 10^d, from 0.5 to 5. The input to the first section is the input less the feedback from the previous sample's output y[n−1], through a tanh normalised so that ±1 maps to ±1:
![u[n] = tanh(a (x[n] − k y[n−1])) / tanh a, a = ½ · 10^d, k = 4r](../images/nodes/ladder-filter-eq-input.png)
The fourth section's output y[n] is then scaled by a make-up gain, to compensate in part for the passband loss the feedback causes:
![out[n] = (1 + k/4) y[n]](../images/nodes/ladder-filter-eq-output.png)
Closing the loop through y[n−1] rather than solving the implicit zero-delay feedback equation makes the filter explicit and cheap, at the cost of a little extra phase lag in the loop, ωT at frequency ω. Its effects are the peak shift and threshold described below.
For small signals, tanh(a v) / tanh a ≈ λ v, with λ = a / tanh a: 1.08 with no drive, 1.72 at d = ½, and 5.0 at d = 1. Linearising the saturator gives the filter's small-signal transfer function:

The response plots on this page are |H(e^{jωT})| computed from this. At z = 1, H₁ = 1, so the passband (DC) gain is:

which, with no drive, is +0.7 dB at r = 0, −5.8 dB at r = ½ and −7.0 dB at r = ¾: the bass loss musicians hear. Far above the cutoff, |H₁|⁴ falls as ω⁻⁴, 24 dB an octave, and the zero of each section at Nyquist takes the response to nothing at f_s / 2.
The analogue prototype is the classic

At ω = ω_c each pole contributes −45° and a gain of 1/√2, so the loop gain k (1/√2)⁴ = k/4 reaches 1 at −180° when k = 4: the ideal ladder oscillates at its cutoff at r = 1.
Here the loop gain is L(z) = k λ z⁻¹ H₁(z)⁴. The unit delay adds −ωT of phase, so the −180° crossing comes below ω_c. At f_c = 1 kHz it's at about 935 Hz, where |z⁻¹ H₁⁴| is a little above ¼, and the loop gain reaches 1 at k λ ≈ 3.5. With no drive (λ = 1.08), that's r ≈ 0.81. Since λ grows with the drive, the threshold falls as 0.81 / (λ / 1.08): to 0.51 at d = ½ and 0.18 at d = 1, as plotted above (and confirmed by simulating the filter sample by sample). The same phase lag pulls the resonant peak below the cutoff, more so as ωT grows: the peak at r = ¾ is at 0.94 f_c for f_c = 250 Hz, 0.92 f_c at 1 kHz, 0.80 f_c at 5 kHz and 0.71 f_c at 10 kHz.
Above the threshold, the oscillation grows until the saturator's effective (describing-function) gain falls enough to bring |L| back to 1, which sets its amplitude. Since |u| ≤ 1 and the sections are low passes, |y| stays near 1, and the output is bounded near 1 + k/4, so up to about twice full scale at r = 1: hence the advice to follow a resonant, driven ladder with an attenuator.
Back to Filters: resonant