home/ modules/ physical-modeling-instruments

Physical modeling: Karplus-Strong, waveguides, and instrument models

  • learner can synthesize plucked/struck strings with Karplus-Strong and tune them via delay-line length and interpolation
  • learner can build waveguide models — delay lines with filters — and simplify multi-section strings, coupled strings, and reflections
  • learner can extend physical models to woodwinds (reed nonlinearity, tone holes) and feedback/guitar simulation

Build a Karplus-Strong plucked-string instrument tuned across an octave, then extend it into a waveguide model with a reflection filter and demonstrate one acoustic behavior (coupled strings, feedback drone, or a reed nonlinearity).

This module builds a playable string instrument out of nothing but delay lines and filters — the sound-design move behind every “plucked” patch you hear in ambient, folktronica, and live-coded sets where sample libraries are off-limits and everything must be synthesized on stage. Physical modeling is uniquely suited to live coding: a handful of lines yields an instrument that responds organically to parameter tweaks, and Karplus-Strong is famously cheap enough to run many voices at once on a laptop mid-performance.

The arc starts supported: recreate the classic noise-burst-into-feedback-loop pluck, leaning on the Karplus-Strong recirculating-delay concept and (if you prefer a synth-first route) the Surge XT String-oscillator framing of excitation into a tuned feedback delay. The first friction point is tuning — pitch is the reciprocal of delay time, and fractional delays demand interpolation that quietly darkens the tone. These two skills recur on every note you play, which is why they are drilled inside the whole task rather than in isolation. From there you graduate to the waveguide view: two delay lines carrying opposite-traveling waves, then the linearity argument that collapses a multi-section string into one delay plus one lowpass. The unsupported capstone asks you to pick one acoustic behavior — bridge-coupled strings, a nonlinear-shaper feedback drone, or a blown reed — and make it audible.

The required atoms gate the capstone directly: without the pitch-tuning reciprocal, the octave scale fails; without a reflection filter and the sign-inversion trick, the extension sounds like a comb filter, not a string. Supporting atoms enrich the picture — comb-filter spectra explain why the loop is pitched at all, circular buffers demystify the implementation, and the guitar-feedback-as-drone lineage and modal-drum layering connect this technique to the wider ecology of resonator-based sound design.

Runnable examples

Generated from the context/ instrument corpus by concept (redistributable idioms only). Do not edit — regenerate with gen-module-examples.mjs.

drone

osc 55 >> audio

punctual-0001 · CC0-1.0

SinOsc s => dac;

chuck-0001 · MIT

feedback-loop

{ CombN.ar(Impulse.ar(2) * 0.3, 0.2, 0.2, 3) }.play

supercollider-0015 · CC0

s("cp").delay(0.5).delaytime(0.166).delayfeedback(0.7)

strudel-0018 · CC0

formant-vowel

note("<c3 e3 g3>").vowel("<a e i o>")

strudel-0036 · CC0

d1 $ note "c e g" # sound "supersquare" # vowel "a e i"

tidal-0035 · CC0

{ Klank.ar(`[[200, 400, 733], [0.4, 0.3, 0.2], [1, 0.6, 0.4]], Impulse.ar(2) * 0.1) }.play

supercollider-0021 · CC0

physical-modeling

Mandolin m => dac; 0.9 => m.pluck; 220 => m.freq;

chuck-0043 · MIT

Atoms in this module

Required — these gate the capstone

Karplus-Strong synthesizes a plucked string by recirculating a noise burst through a delay line and a lowpass averaging filter
Concept L2 First instrument BFE
Karplus-Strong physical modeling feeds an excitation signal into a tuned feedback delay to synthesize plucked or bowed strings
Concept L3 Craft BE
Physical modeling synthesis approximates acoustic instrument physics using mathematical models of wave propagation
Concept L3 Craft BE
Waveguide synthesis models acoustic resonators as digital delay lines with filters, efficiently simulating instrument resonances
Concept L3 Craft BE
A digital waveguide section models wave propagation with two delay lines, six attenuators, and two summers per section
Concept L4 Performance BE
Physical model pitch is inversely proportional to delay time, requiring reciprocal computation from note number
Principle L3 Craft BE
Fractional delay times require interpolation, which trades tuning accuracy for frequency-dependent attenuation
Principle L4 Performance B
Fixed-length variable-step delay lines keep decay time constant across pitch, unlike variable-length lines
Principle L4 Performance BE
Coupled strings interact through a shared non-rigid bridge modeled as a single shared loss filter
Concept L4 Performance BE
A multi-section string waveguide simplifies to a single delay line with one lowpass filter by exploiting linearity
Principle L4 Performance BE
Inverting the sign of a waveguide's reflected wave drops the pitch an octave and cancels DC buildup
Procedure L4 Performance BE
Guitar feedback can be simulated by feeding Karplus-Strong output through a nonlinear shaper back into the delay line
Procedure L4 Performance BE
Woodwind synthesis requires a nonlinear reed model to provide gain and generate harmonics
Concept L4 Performance BE
Woodwind pitch is changed by tone holes that selectively reflect low frequencies and transmit high frequencies
Concept L4 Performance BE
Klank implements a bank of resonant filters excited by an impulse to model acoustic resonators in SuperCollider
Concept L2 First instrument BF

Supporting — enrichment, not gating

A delay line feeding back into itself creates a comb filter with resonant peaks at integer multiples of 1/delay
Concept L2 First instrument BE
Summing a signal with a delayed copy creates a comb filter: evenly-spaced spectral peaks and nulls set by the delay time
Concept L3 Craft BD
A delay line is a circular buffer read behind a rotating write pointer
Concept L2 First instrument BJ
Guitar feedback is a self-sustaining tone that lets rock musicians generate drones without a bow or wind
Concept L1 Foundations BO
Surge XT's comb filter delays the signal by a pitch-tuned amount to create resonant coloration and physical-model waveguides
Concept L3 Craft B
Voice synthesis models the vocal tract as a series of formant resonances shaped by the source-filter model
Concept L3 Craft BE
Extended techniques on acoustic instruments produce hybrid timbres unavailable through synthesis
Concept L3 Craft BA
Layering detuned oscillators models the multiple resonant modes of a drum membrane
Principle L3 Craft B