Live data from Hacker News

Synthesizing a Plucked String Sound with the Karplus-Strong Algorithm

blog.demofox.org

1–10 of 26 posts

Re: Synthesizing a Plucked String Sound with the Karplus-Strong Algorithm

#3
This algorithm is so simple that I once accidentally implemented a workable approximation of it while experimenting with creating a simulated tape delay in a flexible-architecture DSP system that was designed mainly for sound reinforcement (Soundweb London). I was floored when I fed white noise into a very short filtered delay (with noise retriggered by the tape delay's output level) and started hearing plucked string sounds.

Re: Synthesizing a Plucked String Sound with the Karplus-Strong Algorithm

#4
post #2

Bizarre. And the most bizarre thing is that it works.

In the general case, what you do is you take a wideband excitation - like a buffer of random samples - and use it as the initial value for a system with a lumpy frequency response. In this case the frequency response is very simple but more complex IIR filters work too.

As the article says this is a good analogue for how a lot of musical instruments work. A string is a resonator, and plucking it gives it a wideband excitation.

Re: Synthesizing a Plucked String Sound with the Karplus-Strong Algorithm

#6
Looks like the virtual "string" is shaped as a random string, and then suddenly let go to make that sound. I wonder what would happen if you shaped the original buffer with a certain shape--for instance a linear rampup then a linear rampdown at some point, much like how you would stretch a string.

edit: hacked together a string plucking thing here: https://www.shadertoy.com/view/ldVSzd

modify the coefficient inside pluckPoint from 0.5 to 0.01 and hear the difference in timbre.

Post reply on HN