Modal synthesis — two-pole resonator bank (string/bar/membrane/plate/tube), impulse or noise excited
Listen
audio.from(3).modal()
Parameters
freq- 440 Hz
- 20 to 5000 Hz
model- string, bar, membrane, plate, tube-open, tube-closed
nmodes- 8
- 1 to 16
t60- 2 s
- 0.05 to 20 s
damping- 0.7
- 0 to 2
inharmonicity- 0
- 0 to 0.01
strike- 0.5
- 0 to 1
exciter- impulse, noise
amp- 0.8
- 0 to 1
seed- 9
- 1 to 65536
Modal synthesis — impulse-invariant resonator bank; F&R-cited bar/membrane/plate/tube/stiff-string tables, strike-position weighting, per-mode T60
import modal from '@audio/synth-modal'
A bank of impulse-invariant two-pole resonators, one per vibrational mode, excited by an impulse or short noise burst (Adrien 1991, "The missing link: modal synthesis"; Cook, Real Sound Synthesis for Interactive Applications, ch. 5). Mode-ratio tables per model are cited from Fletcher & Rossing, The Physics of Musical Instruments, 2nd ed. — string (Fletcher 1964 stiff-string), bar (free-free Euler-Bernoulli), membrane (Bessel-zero circular membrane), plate (free circular plate), tube-open/tube-closed (pipe harmonics/odd-harmonics).
modal(220, { model: 'string', inharmonicity: 0.0002, strike: 0.3 })
| Param | Default | |
|---|---|---|
freq |
— | Fundamental (mode 1) Hz (positional) |
model |
'bar' |
'string' | 'bar' | 'membrane' | 'plate' | 'tube-open' | 'tube-closed' |
modes |
— | Custom [{ratio, gain?, t60?}] — overrides model/nmodes/inharmonicity |
nmodes |
8 |
Modes drawn from the model's table |
t60 |
2 |
Fundamental decay time, seconds (-60dB) |
damping |
0.7 |
HF loss exponent: t60_k = t60·(f1/fk)^damping |
inharmonicity |
0 |
String-only stiffness coefficient B: fk = k·f1·√(1+B·k²) |
strike |
0.5 |
0..1 strike/pluck position (1D models only) |
exciter |
'impulse' |
'impulse' | 'noise' | custom Float32Array |
duration |
— | Default: covers the slowest mode's T60 |
amp |
0.8 |
Peak amplitude |
seed |
9 |
Noise-exciter PRNG seed |
fs |
44100 |
Sample rate |
Use when: physically-grounded percussive/struck timbres (bars, membranes, plates, strings, tubes) with per-model literature-sourced mode ratios rather than hand-tuned partials.
Part of @audio/synth — the synth family umbrella.
MIT © audiojs