Lecture 6 · From the circuit to the digital filter
| Block | Representation | Generator |
|---|---|---|
| Filters and effects | LTI and time-varying systems | hand-designed |
| Classical synthesis | samples, partials, modes, physical state | hand-designed |
| DDSP | the same structured models | parameters learned |
| Reverberation | a recursive dynamical system | hand-designed, fittable |
| Diffusion | a learned representation | learned |
The four questions
Filters and effects, part 5 of 5. Last time: delay lines and Karplus–Strong. Today: wave digital filters: from the schematic of a circuit to a digital filter, linear and nonlinear.
Application in Sound synthesis:
Application in Virtual Analog Modeling
The simplest passive RC low-pass, a treble-cut tone control: \[\frac{U_\mathrm{C}(s)}{U_\mathrm{in}(s)} = \frac{1}{1 + sRC}, \qquad \omega_\mathrm{c} = \frac{1}{RC}\]
So far we transformed the transfer function. A circuit has component values, possibly nonlinear components, and then no transfer function at all.
Idea
Apply the bilinear transform to each component and keep the circuit’s structure: that is the wave digital filter.
Capacitor, \(U = \frac{1}{sC} I\), in waves:
\[\frac{B}{A} = \frac{U - RI}{U + RI} = \frac{1 - sRC}{1 + sRC}\]
Bilinear transform with \(R = \frac{T}{2C}\) gives \(sRC = \frac{z - 1}{z + 1}\):
\[\frac{B}{A} = \frac{(z+1) - (z-1)}{(z+1) + (z-1)} = z^{-1}\]
| Component | Kirchhoff | Port \(R\) | Wave digital |
|---|---|---|---|
| resistor | \(u = R_\mathrm{r}\, i\) | \(R_\mathrm{r}\) | \(b = 0\) |
| capacitor | \(U = \frac{1}{sC} I\) | \(\frac{T}{2C}\) | \(b[k] = a[k-1]\) |
| inductor | \(U = sL\, I\) | \(\frac{2L}{T}\) | \(b[k] = -a[k-1]\) |
| source | \(u = u_\mathrm{Q} + R_\mathrm{i}\, i\) | \(R_\mathrm{i}\) | \(b = u_\mathrm{Q}\) |
| open circuit | \(i = 0\) | any | \(b = a\) |
Parallel adaptor, ports \(0 \dots n\) share one voltage \(v\):
\[v = \frac{\sum_i G_i\, a_i}{\sum_i G_i}, \qquad b_i = 2v - a_i, \qquad G_i = \frac1{R_i}\]
Choose one port reflection-free (\(G_0 = \sum_{i \ge 1} G_i\)): its output wave \(b_0 = \sum_{i \ge 1} \frac{G_i}{G_0}\, a_i\) does not depend on its own input \(a_0\). For series/parallel circuits this breaks every delay-free loop: the circuit becomes a tree, computed leaves → root → leaves, once per sample.
Route 1: transfer function → bilinear transformation → \(H_\mathrm{d}(z) = \frac{1 - z_\infty}{2}\frac{z+1}{z - z_\infty}\)
Route 2: circuit → wave digital filter (source, capacitor, parallel adaptor, open-circuit root)
Identical
With \(R\) = 2.2 kΩ, \(C\) = 10 nF (\(f_\mathrm{c}\) = 7.2 kHz) the two outputs on the riff differ by about \(10^{-16}\) (machine precision). A linear WDF is the bilinear transform of its circuit.

| TPT low-pass, \(Q = 4\), \(f_\mathrm{c}\) = 200 Hz → 8 kHz |
V. Zavalishin, The Art of VA Filter Design, 2020 (topology-preserving transform).
Replace the open circuit at the root by two antiparallel diodes, \(i = 2I_\mathrm{s}\sinh(v/V_\mathrm{T})\). At the root, per sample, solve \[\frac{a - v}{R_0} = 2 I_\mathrm{s} \sinh\frac{v}{V_\mathrm{T}}, \qquad b = 2v - a\] with \(R_0 = 1/G_0\) (Newton iterations, warm-started from the last sample).
| input | |
|---|---|
| 0.2 V | |
| 2 V | |
| 20 V |
Run at 4 × 44.1 kHz; output peaks 0.20 V, 0.56 V, 0.68 V.

A clipper creates harmonics above \(f_\mathrm{s}/2\); they fold back as inharmonic components.
S. Bilbao, F. Esqueda, J. D. Parker, V. Välimäki, “Antiderivative antialiasing for memoryless nonlinearities,” IEEE SPL, 2017.
| 2.5 kHz sine through \(\tanh(10x)\), naive | |
| sine, 4× oversampled | |
| sine, ADAA | |
| riff, naive | |
| riff, ADAA |
Listen
The naive sine has tones that are not harmonics of 2.5 kHz. Can you hear them? Which version removes them, and at what cost?
Figures reproduced from Fig. 2(a) (clipping stage) and Fig. 2(e) (WDF adaptor structure) of K. J. Werner, V. Nangia, J. O. Smith III, and J. S. Abel, “Resolving Wave Digital Filters with Multiple/Multiport Nonlinearities,” in Proc. 18th Int. Conf. Digital Audio Effects (DAFx-15), Trondheim, Norway, Nov. 30 – Dec. 3, 2015 · paper
Analog circuit for “lead” mode:

Figure reproduced from Fig. 5(a) of J. Zhang and J. O. Smith III, “Real-Time Wave Digital Simulation of Cascaded Vacuum Tube Amplifiers using Modified Blockwise Method,” in Proc. 21st Int. Conf. Digital Audio Effects (DAFx-18), Aveiro, Portugal, Sept. 4–8, 2018 · paper
Analog circuit for “clean” mode:

Figure reproduced from Fig. 5(b) of J. Zhang and J. O. Smith III, “Real-Time Wave Digital Simulation of Cascaded Vacuum Tube Amplifiers using Modified Blockwise Method,” in Proc. 21st Int. Conf. Digital Audio Effects (DAFx-18), Aveiro, Portugal, Sept. 4–8, 2018 · paper
Realization by WDF structure:
Figure reproduced from Fig. 6 of J. Zhang and J. O. Smith III, “Real-Time Wave Digital Simulation of Cascaded Vacuum Tube Amplifiers using Modified Blockwise Method,” in Proc. 21st Int. Conf. Digital Audio Effects (DAFx-18), Aveiro, Portugal, Sept. 4–8, 2018 · paper
Analog circuit:

Hammond B3 with Leslie 122 · it:user:Salli, CC BY-SA 3.0
Figure reproduced from Fig. 1 of K. J. Werner, W. R. Dunkel, and F. G. Germain, “A Computational Model of the Hammond Organ Vibrato/Chorus using Wave Digital Filters,” in Proc. 19th Int. Conf. Digital Audio Effects (DAFx-16), Brno, Czech Republic, Sept. 5–9, 2016 · paper
Realization by WDF structure:

🔊 WDF model: played in the lecture
Figure reproduced from Fig. 5(a) of K. J. Werner, W. R. Dunkel, and F. G. Germain, “A Computational Model of the Hammond Organ Vibrato/Chorus using Wave Digital Filters,” in Proc. 19th Int. Conf. Digital Audio Effects (DAFx-16), Brno, Czech Republic, Sept. 5–9, 2016 · paper
The capacitor
In the wave domain a capacitor becomes \(b[k] = a[k-1]\) with port resistance \(R_\mathrm{C} = \frac{T}{2C}\). Where did the bilinear transformation of lecture 2 go?
| Prototype + bilinear / allpass transformation | Wave digital filter | |
|---|---|---|
| Representation | rational transfer function \(H_\mathrm{d}(z)\), difference equation | waves at the ports of a circuit tree |
| Controls | gain \(G\), cutoff/center frequency, bandwidth or \(Q\) (and \(f_\mathrm{s}\)) | component values \(R\), \(C\), \(L\), potentiometers |
| Built-in structure | analog prototype, order and stability preserved, frequency warped | circuit topology, passivity, nonlinear elements |
| Fixed vs. learned | designed, closed form for every knob | designed from the schematic (white box); grey-box fitting of amp models in lecture 10 |
Waves instead of \(u\) and \(i\)
\(a = u + R\,i\), \(b = u - R\,i\): every component becomes a simple digital element, every connection an adaptor.
Linear circuits
A linear WDF is the bilinear transform of the circuit, computed component by component and stable by construction (passivity).
Nonlinear circuits
Diodes, transistors and tubes sit at the root of the tree: the route to virtual analog models of pedals, amplifiers and organs.
This closes the filters block. Lecture 7 starts the synthesis block: oscillators and spectra.
WDF slides from the WS 25/26 lecture slides (M. Schäfer); figures redrawn in TikZ (slides/filters_tikz/), example figures from the cited DAFx papers, added examples by the slides/make_filters_*.py scripts in the course repository.