<< Chapter < Page Chapter >> Page >
Karplus-Strong Algorithm

Karplus-strong algorithm

How it works

The Karplus-Strong algorithm was developed by Alexander Strong and analyzed by Kevin Karplus as a model of hammered or plucked string instruments. It simulates the sharp impact through a short wideband signal such as a burst of white noise. The signal is fed back through a delay line whose length depends on the frequency of the desired note. The delayed signal is sent through a lowpass filter to attenuate all other frequencies except the frequency of the note and its harmonics.

Karplus-strong algorithm

A diagram representation of a burst of white noise being delayed, filtered, and combined with the original burst. The output sounds like a realistic guitar string pluck.

Concepts

The main concept behind the algorithm is to model the sudden attack of a pluck with white noise containing equal energy in all frequencies. Due to the cavity of the instrument, the instrument material, and various other parameters, only a given frequency and its harmonics will resonate. This is simulated by recursively shaping the output signal. By matching the length of the time delay to correspond with the frequency of the note desired, the output will ultimately sound at the selected frequency given a short period of time. The feedback loop only reinforces the fundamental frequency and its harmonics. This technique is sometimes referred to as a comb filter because of the characteristic shape of the output.

Spectrum of a plucked string

The output of the Karplus-Strong algorithm with its characteristic comb shape. Notice the rapid attenuation of all other frequencies not near a harmonic.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Music synthesizer. OpenStax CNX. Dec 18, 2008 Download for free at http://cnx.org/content/col10618/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Music synthesizer' conversation and receive update notifications?

Ask