@audio/ synth-pluck
Status calibrated
npm1.1.4licenseMIT
Karplus-Strong plucked string synthesis
Karplus-Strong plucked string
import pluck from '@audio/synth-pluck'
Karplus-Strong plucked string (Karplus & Strong 1983): a seeded noise burst circulates through an averaging delay loop sized to the pitch period, decaying via the loop's damping factor. Pitched — (freq, opts).
pluck(220, { damp: 0.996, duration: 1.5 }) // → Float32Array
| Param | Default | |
|---|---|---|
freq |
— | Hz (positional) — sets the delay-loop length |
duration |
1 |
Seconds |
amp |
0.7 |
Noise-burst amplitude |
damp |
0.996 |
Loop damping — closer to 1 decays slower |
seed |
1 |
PRNG seed for the excitation burst |
fs |
44100 |
Sample rate |
Use when: plucked-string/guitar-like tones without a physical model; cheap and classic.
Part of @audio/synth — the synth family umbrella.
MIT © audiojs