// Karplus-Strong — plucked string from noise + delay feedback. // Run: node examples/karplus-strong.js 220 4s // Run: node examples/karplus-strong.js freq=440 -d 2s // Keys: space pause · p pluck · ↑/↓ ±semitone · q quit import { AudioContext, AudioWorkletNode } from 'web-audio-api' import { init } from './graphs/karplus-strong.js' import { args, num, sec, keys, status, clearLine, noteName, pausedTag, help } from './utils.js' help({ description: 'synthesize a plucked string from noise and feedback', usage: ['', '[frequency] [duration]', 'freq=A4 dur=2s'], options: [ ['freq=', 'string frequency (default: 220)'], ['decay=', 'time for the pluck to fade 60 dB (default: 4)'], ['-d, --duration