SynthMaker Circuits Manual Open SynthMaker (opens in a new tab)
Chapter 4 · Filters

How a state-variable filter works

A state-variable filter is two integrators and a summing op-amp in a loop: one circuit gives low-pass, band-pass and high-pass at once, and low plus high makes a notch. Its corner is f = 1/(2πRC), 1.33 kHz with 12 kΩ and 10 nF; one resistor sets Q without moving it.

StateVariable · the parts list
circuit StateVariable  setting input: 4 V  setting output: 16 V  setting cutoff: 12k, from 150k to 3.3k  setting resonance: 5k, from 500 to 59k  Rin in m 10k  Rf hp m 10k  Rl lp m 10k  Rq bp p resonance  Rp p gnd 1k  U1 p m hp opamp rails 12V  R1 hp i1 cutoff  C1 i1 bp 10n  U2 gnd i1 bp opamp rails 12V  R2 bp i2 cutoff  C2 i2 lp 10n  U3 gnd i2 lp opamp rails 12V  Ro lp out 1k  # Rn hp out 1k  Rload out gnd 1Mend
Scope · out

Press Play to see the wave after the circuit, at out.

A short riff through the circuit, round and round. Turn the knobs while it plays. Open in SynthMaker ↗ (opens in a new tab)

What you're hearing

An integrator is a low-pass that never stops falling: at the corner its gain is exactly 1. An op-amp with a resistor in and a capacitor across it adds up its input over time, upside down. Its gain is 1/(2πfRC): it falls 6 dB per octave at every frequency, and it's exactly 1 where f = 1/(2πRC) = 1/(2π × 12 kΩ × 10 nF) ≈ 1.33 kHz. That's the filter's corner. The cutoff knob turns both integrators' resistors together, as a dual pot does:

cutoff (R1 and R2)corner
150 kΩ106 Hz
47 kΩ339 Hz
22 kΩ723 Hz
12 kΩ1.33 kHz
4.7 kΩ3.39 kHz
3.3 kΩ4.82 kHz

At the top of the knob, the digital version's corner comes out about 1% lower than the formula.

Two integrators in a loop split the sound three ways. The first op-amp is a summing amp: it subtracts the low-pass output from the input, and what's left is the high-pass. The first integrator turns that into the band-pass, and the second turns the band-pass into the low-pass, which goes back to the summer. Far below the corner the integrators have plenty of gain, so the low-pass follows the input closely and cancels it at the summer: the lows come out of the low-pass, and the high-pass is left with almost nothing. Far above, the integrators can't keep up, the low-pass is tiny, and the high-pass is the whole input. The band-pass sits between them, after one integrator.

At the corner, all three outputs are equal, and they're Q times the input. With resonance at 5 kΩ, Q is 2, so each output is +6.0 dB at 1.33 kHz:

outputan octave below the cornerat the corneran octave abovefar away
low-pass+2.0 dB+6.0 dB−10.0 dB0 dB below; falls 12 dB per octave above
band-pass−4.0 dB+6.0 dB−4.0 dBfalls 6 dB per octave either side
high-pass−10.0 dB+6.0 dB+2.0 dB0 dB above; falls 12 dB per octave below
notch−6.5 dBsilence−6.5 dB−6.0 dB both sides

The low-pass and high-pass are mirror images, and the band-pass is their meeting point. Add the low-pass and high-pass, and at the corner they cancel: that's the notch. Here two 1 kΩ resistors average them, so the notch's passband is 6.0 dB down, and its gap is as wide as the band-pass's peak, 662 Hz at Q 2.

One resistor sets Q, and it doesn't touch the corner. The summer's + input sits on a divider from the band-pass output, resonance over 1 kΩ. That feeds back a share of the band-pass, which damps the loop. More resistance feeds back less, so the damping falls and Q rises: Q = (1 + Rq/1 kΩ)/3.

resonance (Rq)Qeach output at the cornerband-pass width (−3 dB)
500 Ω0.5−6.0 dB2.65 kHz
1.1 kΩ0.7−3.1 dB1.89 kHz
5 kΩ2+6.0 dB662 Hz
29 kΩ10+20.0 dB131 Hz
59 kΩ20+26.0 dB66 Hz

The band-pass's width is the corner divided by Q. Rq isn't one of the parts that set the corner, and the input's way in doesn't pass through it, so turning resonance leaves both the corner and the level below it alone; the knob only changes the peak. On the Sallen-Key, the gain that sets Q also lifts the passband, 8.6 dB at Q 3.3. In theory, with no damping at all (Rq taken out), two integrators in a loop ring for ever as a sine oscillator. The knob stops at Q 20, where each note rings long and dies away; the op-amps' 12 V rails catch the loudest.

That's why synths love it: one circuit, three responses, and Q of its own. Cutoff is two matched parts turned together, by a dual pot or, in a synth, by parts a control voltage can turn, such as OTAs in place of the two resistors. Resonance is a single resistor. The band-pass is a peak you can sweep, the sound of a wah: the wah pedal gets its peak from a coil and a capacitor instead, with a Q of about 2 to 6.

Try this

  • Hold a note and press Low-pass, Band-pass, High-pass and Notch in turn. The circuit and the knobs stay the same: dark, then nasal, then thin and buzzy, then hollow.
  • Press "Band-pass, Q 10" and turn cutoff slowly. A narrow peak, 131 Hz wide at 1.33 kHz, sweeps through the saw's harmonics like a wah. The example sound "Circuit Wah" is a band-pass from one op-amp, swept from about 460 Hz to 2.3 kHz.
  • Press "Low-pass, Q 0.7", then turn resonance up. The peak grows at the cutoff, but the bass under it stays where it was. Open it in SynthMaker to change the parts: make C1 and C2 22n, and at 12 kΩ the corner falls to 603 Hz.

The parts list

StateVariable · the parts list
circuit StateVariable  setting input: 4 V  setting output: 16 V  setting cutoff: 12k, from 150k to 3.3k  setting resonance: 5k, from 500 to 59k  Rin in m 10k  Rf hp m 10k  Rl lp m 10k  Rq bp p resonance  Rp p gnd 1k  U1 p m hp opamp rails 12V  R1 hp i1 cutoff  C1 i1 bp 10n  U2 gnd i1 bp opamp rails 12V  R2 bp i2 cutoff  C2 i2 lp 10n  U3 gnd i2 lp opamp rails 12V  Ro lp out 1k  # Rn hp out 1k  Rload out gnd 1Mend

U1 is the summer, U2 and U3 the integrators. For another output, change Ro lp out 1k to bp or hp. For the notch, remove the # from Rn. The cutoff setting is written from the bigger value (150k down to 3.3k), so turning the knob up raises the cutoff. rails 12V is the swing of a ±15 V supply, and setting output: 16 V keeps it under full volume.

How we checked it

Checked against ngspice, a standard circuit simulator: each of its outputs (low-pass, band-pass at Q 10, high-pass and notch), driven by a 1 kHz sine, is within 0.11% of ngspice across the audible band at the 2× rate it runs at.

Build it step by step

Further reading

  • W. J. Kerwin, L. P. Huelsman and R. W. Newcomb, "State-Variable Synthesis for Insensitive Integrated Circuit Transfer Functions", IEEE Journal of Solid-State Circuits, 1967: the three-op-amp circuit this page plays.
  • The circuit, its Q formula and its use in synthesizers: Wikipedia: State variable filter.
  • How an op-amp integrates: Wikipedia: Op amp integrator.
  • What a notch is: Wikipedia: Band-stop filter.
  • What Q measures: Wikipedia: Q factor.
  • How SynthMaker simulates a circuit with op-amps: M. Holters and U. Zölzer, "A Generalized Method for the Derivation of Non-Linear State-Space Models from Circuit Schematics", EUSIPCO 2015. PDF