<< Chapter < Page Chapter >> Page >
The Karplus-Strong algorithm plucked string algorithm produces remarkably realistic tones with modest computational effort. The algorithm requires a delay line and lowpass filter arranged in a closed loop, which can be implemented as a single digital filter. The filter is driven by a burst of white noise to initiate the sound of the plucked string. Learn about the Karplus-Strong algorithm and how to implement it as a LabVIEW "virtual musical instrument" (VMI) to be played from a MIDI file using "MIDI JamSession."
This module refers to LabVIEW, a software development environment that features a graphical programming language. Please see the LabVIEW QuickStart Guide module for tutorials and documentation that will help you:
•Apply LabVIEW to Audio Signal Processing
•Get started with LabVIEW
•Obtain a fully-functional evaluation edition of LabVIEW


In 1983 Kevin Karplus and Alex Strong published an algorithm to emulate the sound of a plucked string (see "References" section). The Karplus-Strong algorithm produces remarkably realistic tones with modest computational effort.

As an example, consider the sound of a violin's four strings plucked in succession: violin_plucked.wav (compare to the same four strings bowed instead of plucked: violin_bowed.wav ). Now compare to the Karplus-Strong version of the same four pitches: ks_plucked.wav .

In this module, learn about the Karplus-Strong plucked string algorithm and how to create a LabVIEW virtual musical instrument (VMI) that you can "play" using a MIDI music file.

Karplus-strong algorithm

The screencast video develops the theory of the Karplus-Strong plucked string algorithm, which is based on a closed loop composed of a delay line and a low pass filter.As will be shown, the delay line is initialized with a noise burst, and the continuously circulating noise burst is filtered slightly on each pass through the loop. The output signal is therefore quasi-periodicwith a wideband noise-like transient converging to a narrowband signal composed of only a few sinusoidal harmonic components.

[video] Theory of the Karplus-Strong plucked string algorithm

Labview implementation

The Karplus-Strong algorithm block diagram may be viewed as a single digital filter that is excited by a noise pulse. For real-time implementation, the digital filter runs continuously withan input that is normally zero. The filter is "plucked" by applying a burst of white noise that is long enough to completely fill the delay line.

As an exercise, review the block diagram shown in and derive the difference equation that relates the overall output y(n) to the input x(n). Invest some effort inthis so that you can develop a better understanding of the algorithm. Watch the video solution in only after you have completed your own derivation.

[video] Difference equation for Karplus-Strong block diagram

The screencast video shows how to implement the difference equation as a digital filter and how to create the noise pulse. The video includes an audiodemonstration of the finished result.

[video] Building the Karplus-Strong block diagram in LabVIEW

Project activity: karplus-strong vmi

In order to better appreciate the musical qualities of the Karplus-Strong plucked string algorithm, convert the algorithm to a virtual musical instrument ( VMI for short) that can be played by "MIDI Jam Session." If necessary, visit MIDI Jam Session , download the application VI .zip file, and view the screencast video in that module to learn more about the application and how to create yourown virtual musical instrument. Your VMI will accept parameters that specify frequency, amplitude, and duration of a single note, and will produce a corresponding array ofaudio samples using the Karplus-Strong algorithm described in the previous section.

For best results, select a MIDI music file that contains a solo instrument or perhaps a duet. For example, try "Sonata in A Minor for Cello and Bass Continuo" by Antonio Vivaldi.A MIDI version of the sonata is available at the Classical Guitar MIDI Archives , specifically Vivaldi_Sonata_Cello_Bass.mid .

Try experimenting with the critical parameters of your instrument, including sampling frequency and the low-pass filter constant g MathType@MTEF@5@5@+=feaagaart1ev2aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYb1uaebbnrfifHhDYfgasaacH8srps0lbbf9q8WrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfea0=yr0RYxir=Jbba9q8aq0=yq=He9q8qqQ8frFve9Fve9Ff0dmeaabaqaciGacaGaaeqabaWaaeaaeaaakeaacaWGNbaaaa@3633@ . Regarding sampling frequency: lower sampling frequencies influence the sound in two distinct ways -- can you describe each of these two ways?


  • Moore, F.R., "Elements of Computer Music," Prentice-Hall, 1990, ISBN 0-13-252552-6.
  • Karplus, K., and A. Strong, "Digital Synthesis of Plucked String and Drum Timbres," Computer Music Journal 7(2): 43-55, 1983.

Questions & Answers

how do I set up the problem?
Harshika Reply
what is a solution set?
find the subring of gaussian integers?
hello, I am happy to help!
Shirley Reply
please can go further on polynomials quadratic
hi mam
I need quadratic equation link to Alpa Beta
Abdullahi Reply
find the value of 2x=32
Felix Reply
divide by 2 on each side of the equal sign to solve for x
Want to review on complex number 1.What are complex number 2.How to solve complex number problems.
yes i wantt to review
use the y -intercept and slope to sketch the graph of the equation y=6x
Only Reply
how do we prove the quadratic formular
Seidu Reply
please help me prove quadratic formula
hello, if you have a question about Algebra 2. I may be able to help. I am an Algebra 2 Teacher
Shirley Reply
thank you help me with how to prove the quadratic equation
may God blessed u for that. Please I want u to help me in sets.
what is math number
Tric Reply
x-2y+3z=-3 2x-y+z=7 -x+3y-z=6
Sidiki Reply
can you teacch how to solve that🙏
Solve for the first variable in one of the equations, then substitute the result into the other equation. Point For: (6111,4111,−411)(6111,4111,-411) Equation Form: x=6111,y=4111,z=−411x=6111,y=4111,z=-411
x=61/11 y=41/11 z=−4/11 x=61/11 y=41/11 z=-4/11
Need help solving this problem (2/7)^-2
Simone Reply
what is the coefficient of -4×
Mehri Reply
the operation * is x * y =x + y/ 1+(x × y) show if the operation is commutative if x × y is not equal to -1
Alfred Reply
An investment account was opened with an initial deposit of $9,600 and earns 7.4% interest, compounded continuously. How much will the account be worth after 15 years?
Kala Reply
lim x to infinity e^1-e^-1/log(1+x)
given eccentricity and a point find the equiation
Moses Reply
A soccer field is a rectangle 130 meters wide and 110 meters long. The coach asks players to run from one corner to the other corner diagonally across. What is that distance, to the nearest tenths place.
Kimberly Reply
Jeannette has $5 and $10 bills in her wallet. The number of fives is three more than six times the number of tens. Let t represent the number of tens. Write an expression for the number of fives.
August Reply
What is the expressiin for seven less than four times the number of nickels
Leonardo Reply
How do i figure this problem out.
how do you translate this in Algebraic Expressions
linda Reply
why surface tension is zero at critical temperature
I think if critical temperature denote high temperature then a liquid stats boils that time the water stats to evaporate so some moles of h2o to up and due to high temp the bonding break they have low density so it can be a reason
Need to simplify the expresin. 3/7 (x+y)-1/7 (x-1)=
Crystal Reply
. After 3 months on a diet, Lisa had lost 12% of her original weight. She lost 21 pounds. What was Lisa's original weight?
Chris Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, Musical signal processing with labview (all modules). OpenStax CNX. Jan 05, 2010 Download for free at http://cnx.org/content/col10507/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Musical signal processing with labview (all modules)' conversation and receive update notifications?

Yasser Ibrahim
Start Quiz
Robert Murphy
Start Test
Courntey Hub
Start Test