Karplus-Strong string synthesis
From Wikipedia, the free encyclopedia
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 a feedback loop similar to that of a comb filter.
Contents |
[edit] How it works
|
[edit] 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 fundamental 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 to 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) = 0.8s(4) + 0.2s(5)). 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 in 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 (file info) — play in browser (beta)
- F1 = 220Hz
- Problems listening to the file? See media help.
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.
[edit] Refinements to the algorithm
Julius O. Smith III [1] 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 led to digital waveguide synthesis, which could also be used to model acoustic waves in tubes and on drum membranes.
[edit] References
- Kevin Karplus, Alex Strong (1983). "Digital Synthesis of Plucked String and Drum Timbres". Computer Music Journal 7 (2): 43-55.
- David A. Jaffe, Julius O. Smith (1983). "Extensions of the Karplus-Strong Plucked String Algorithm". Computer Music Journal 7 (2): 56-69.
- US4649783 (1987-03-17) Alexander R. Strong, Kevin J. Karplus Wavetable Modification Instrument and Method for Generating Musical Sound
[edit] External links
Sound synthesis types |
Frequency modulation synthesis | Phase distortion synthesis | Scanned synthesis | Subtractive synthesis | Additive synthesis |
Sample-based synthesis: Wavetable synthesis | Granular synthesis | Vector synthesis |
Physical modelling synthesis: Digital waveguide synthesis | Karplus-Strong string synthesis | Formant synthesis |