< Karplus-Strong Plucked-String Synthesis Algorithm or How To Create String Instruments Out Of Noise

Plucked-String Algorithm

In the Karplus-Strong algorithm, the pluck, which in real string can contain energy at any frequency, is simulate by filling the delay-line with noise at each note beginning. Originally, Karplus and Strong used two-level randomness with probability of 1/2 for -A and A, where A represents the maximum desired amplitude. This is more economic than using uniform randomness between -A and A with the only difference that the signal is 5 dB louder. On today computers, generation of random numbers is not an issue and therefore uniform randomness can be use without any speed consequence.

Figure 2 - (a) Attack, (b) Sustain and (c) Release Wave Shape of a Real Pluck String

In a real string, vibration eliminates those frequencies introduce by the pluck that don't match the normal modes of the string. Friction and losses at end point will create the sound decay, with higher frequencies decaying faster than lower ones. At the end, the wave shape will almost be sinusoidal with a period corresponding to the fundamental mode of the string. The sound will finally decay to silence. In the Karplus-Strong model this can be achieve by the introduction of an averager in the loop.

Figure 3 - Original Karplus-Strong Algorithm

Alex Strong device his averager by simply adding the two last outputs and right shifting the result (divide by 2). The so create sample is then re-introduce in the loop. This and the length of the loop will cause self-cancellation of the "non-harmonic" partials. This will also cause higher frequencies to decay more and more at each delay-line trip, until only the fundamental remain. Like in the case of a real string, the delay-line content will finally decay to a constant value, which sounds like silence.

Figure 4 - (a) Attack, (b) Sustain and (c) Release Wave Shape of a Pluck String Create with The Karplus-Strong Algorithm

The averager is in fact equivalent to a low-pass filter with the following impulse response:

And transfer function:

It can be shown that this filter as a frequency response corresponding to the first quadrant of a cosine wave (i.e. a gentle drop off from unity to the Nyquist frequency) and a linear phase delay of 1/2.

Figure 5 - (a) Low-Pass Filter Magnitude Response, (b) Low-Pass Filter Phase Delay

This implies that the frequency corresponding to the system is now: