A few years ago I came across André Michelle’s
Karplus-Strong guitar synthesizer
Apart from being an incredibly cool toy, the set of
chords it strums is actually pretty nice to listen to. Sometimes I’d have it
playing for background noise.
The only hitch is that since it’s written in ActionScript, it won’t run on
Here’s how it turned out. Check out
for source. Full credit for the algorithm itself goes to André – this is an
almost exact clone of the decompiled ActionScript.
If you’re interested in details of how the Karplus-Strong algorithm works,
check out another post,
Karplus-Strong String Synthesis