home/ atoms/ sc-klank-physical-model

Klank implements a bank of resonant filters excited by an impulse to model acoustic resonators in SuperCollider

Klank takes a backtick-array [freqs, amps, rings] specification and excites multiple resonant filters simultaneously with an input signal (typically Dust for random excitation). Each filter's frequency, amplitude, and decay time is set independently. This models struck or plucked acoustic objects: bells, marimba bars, plate reverb. The backtick syntax () is SC’s notation for a reference to an array literal, preventing multichannel expansion. Klank is computationally cheap and produces naturally decaying resonant textures from a single impulse.

Examples

Klank.ar(`[freqs, amps, rings], Dust.ar(1/6, 0.03)) // freqs = Array.fill(10, { exprand(100, 10000) }) // rings = Array.fill(10, { rrand(1.0, 6.0) })

Assessment

Design a 10-resonator Klank patch that sounds like a metal plate struck randomly. Vary the frequency ratios from harmonic to inharmonic and describe the perceptual change. Explain why `[…] is required rather than […].

“Klank.ar(`specs, Dust.ar(1/6, 0.03)), // excitation of model”
corpus · the-supercollider-book-official-code-examples-scbookcode-gpl · chunk 1