audio

@audio/synth-pluck1.1.4

Karplus-Strong plucked string synthesis

Status
calibrated
Updated
Family
synth, 20 packages under it
Plugin
pluck, generator, whole signal, 4 parameters
Category
synthesis
Licence
MIT
Dependencies
none
Downloads
2,351 last month
Tests
94 in audiojs/synth's CI, passed at f613513,

Listen

audio.from(2).pluck()

Parameters

  • generator
  • whole signal
freq
220 Hz
20 to 4000 Hz
damp
0.996
0.9 to 0.9999
amp
0.7
0 to 1
seed
1
1 to 65536

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