Karplus-Strong string synthesis
|
Karplus-Strong string synthesis is a method of physical modelling synthesis that loops a short waveform through a filtered delay line to simulate the sound of a hammered or plucked string or some types of percussion. This is a subtractive synthesis technique based on feedback.
How it works
|
Tuning the string
The period of the resulting signal is the period of the delay line plus the average group delay of the filter; the frequency, as usual, is the reciprocal of the period. The required delay D for a given fundamental frequency F1 is therefore calculated according to D = Fs/F1 where Fs is the sampling frequency.
Digital delay lines are available only with lengths that are whole-number multiples of the sampling period. In order obtain a fractional delay, interpolating filters are used with parameters selected to obtain an appropriate group delay at the fundamental frequency. Either IIR or FIR filters may be used, however FIR have the advantage that transients are suppressed if the fractional delay is changed over time. The most elementary fractional delay is the linear interpolation between two samples (e.g., s(4.2) = s(4)·0.8 + s(5)·0.2). If the group delay varies too much with frequency, harmonics may be sharpened or flattened relative to the fundamental frequency.
A demonstration of the Karplus-Strong algorithm can be heard by downloading the following Vorbis file. The algorithm used a loop gain of 0.98 with increasingly attenuating first order lowpass filters. The pitch of the note was A2, or 220 Hz.
- Karplus-Strong #1, F1 = 220Hz
Holding the period (= length of the delay line) constant produces vibrations similar to those of a string or bell. Increasing the period sharply after the transient input produces drum-like sounds.
Refinements to the algorithm
Julius O. Smith III and others realized that the Karplus-Strong algorithm was physically analogous to a sampling of the transversal wave on a string instrument, with the filter in the feedback loop representing the total string losses over one period. Generalization of the algorithm lead to digital waveguide synthesis, which could also be used to model acoustic waves in tubes and on drum membranes.