<< 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

are nano particles real
Missy Reply
Hello, if I study Physics teacher in bachelor, can I study Nanotechnology in master?
Lale Reply
no can't
where we get a research paper on Nano chemistry....?
Maira Reply
nanopartical of organic/inorganic / physical chemistry , pdf / thesis / review
what are the products of Nano chemistry?
Maira Reply
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Preparation and Applications of Nanomaterial for Drug Delivery
Hafiz Reply
Application of nanotechnology in medicine
has a lot of application modern world
what is variations in raman spectra for nanomaterials
Jyoti Reply
ya I also want to know the raman spectra
I only see partial conversation and what's the question here!
Crow Reply
what about nanotechnology for water purification
RAW Reply
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
yes that's correct
I think
Nasa has use it in the 60's, copper as water purification in the moon travel.
nanocopper obvius
what is the stm
Brian Reply
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
scanning tunneling microscope
how nano science is used for hydrophobicity
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
what is differents between GO and RGO?
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
analytical skills graphene is prepared to kill any type viruses .
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
The nanotechnology is as new science, to scale nanometric
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now

Source:  OpenStax, Musical signal processing with labview -- subtractive synthesis. OpenStax CNX. Nov 07, 2007 Download for free at http://cnx.org/content/col10484/1.2
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 -- subtractive synthesis' conversation and receive update notifications?