Moog Ladder Filter
Overview
The moog_ladder is a 4-pole (24 dB/octave) lowpass ladder filter with
resonance, the classic "fat" subtractive-synthesizer voice. It is four
topology-preserving one-pole lowpasses in series wrapped in a global resonance
feedback loop, after Vadim Zavalishin’s The Art of VA Filter Design and Will
Pirkle’s Designing Software Synthesizer Plug-Ins in C++.
-
Each one-pole stage has the gain
g = tan(pi * fc / fs). -
k = 4rscales the lowpass output, and× −1subtracts it from the input. -
In the nonlinear mode a
tanhsaturates the feedback.
In the default linear mode the instantaneous (zero-delay) feedback is resolved analytically, so, like State Variable Filter, the filter stays stable and free of zipper noise when the cutoff is modulated every sample.
Parametrization is exact: the cutoff coefficient is the bilinear prewarp
g = tan(pi * fc / fs), and the resonance is a normalized r in [0, 1]
(internally k = 4r). The filter reaches self-oscillation exactly at r = 1.
As resonance rises the passband thins, the characteristic ladder behavior.
The optional nonlinear mode runs a tanh saturation in the feedback path for
the saturating Moog character. That path uses the previous output for the
nonlinearity (a one-sample delay in the saturation only; the four stages stay
TPT), the standard inexpensive nonlinear ladder; it shifts tuning slightly at
very high resonance. The linear mode has no such approximation.
It is the most expensive of the resonant filters: about ten multiplies per sample, plus two divides when the cutoff or resonance changes. See Resonant Filters for a comparison.
moog_ladder is Ladder Filter with a transistor ladder’s cell, which is
where the topology, the pole count and the resonance scaling are documented.
Its sibling OTA Ladder Filter is the same shape with the variable gain cell the
Curtis chips used, which distorts in the second harmonic rather than the odd
ones.
| For a 12 dB/oct multimode filter (lowpass, bandpass, highpass, …), see State Variable Filter; for the cheaper Chamberlin state-variable filter, see Chamberlin Filter. |
Declaration
struct moog_ladder
{
moog_ladder(
frequency f, float sps
, float reso = 0.0f
, bool nonlinear = false
);
float operator()(float x); // 24 dB/oct lowpass
void cutoff(frequency f, float sps);
void resonance(float r); // normalized [0, 1]
void nonlinear(bool on);
moog_ladder& operator=(float y);
};
Expressions
Notation
ld,a,b-
Objects of type
moog_ladder. f-
Object of type
frequency(the cutoff). sps-
Floating point value representing samples per second.
r-
Normalized resonance, a
floatin [0, 1]. nl-
bool, nonlinear (tanh) mode. x-
Input sample.
y-
A
float.
Constructors and Assignment
| Expression | Semantics |
|---|---|
|
Construct with cutoff |
|
As above, linear ( |
|
As above with no resonance ( |
|
Copy construct from |
|
Assign |
|
Clear the filter state to |
| C++ brace initialization may also be used. |