Karplus–Strong String Synthesis
   HOME

TheInfoList



OR:

Karplus–Strong string synthesis is a method of
physical modelling synthesis Physical modelling synthesis refers to sound synthesis methods in which the waveform of the sound to be generated is computed using a mathematical model, a set of equations and algorithms to simulate a physical source of sound, usually a musical i ...
that loops a short waveform through a filtered delay line to simulate the sound of a hammered or plucked
string String or strings may refer to: *String (structure), a long flexible structure made from threads twisted together, which is used to tie, bind, or hang other objects Arts, entertainment, and media Films * ''Strings'' (1991 film), a Canadian anim ...
or some types of
percussion A percussion instrument is a musical instrument that is sounded by being struck or scraped by a percussion mallet, beater including attached or enclosed beaters or Rattle (percussion beater), rattles struck, scraped or rubbed by hand or ...
. At first glance, this technique can be viewed as
subtractive synthesis Subtractive synthesis is a method of sound synthesis in which Harmonic_series_(music)#Partial.2C_harmonic.2C_fundamental.2C_inharmonicity.2C_and_overtone, overtones of an audio signal are attenuated by a audio filter, filter to alter the timbre of ...
based on a
feedback loop Feedback occurs when outputs of a system are routed back as inputs as part of a chain of cause and effect that forms a circuit or loop. The system can then be said to ''feed back'' into itself. The notion of cause-and-effect has to be handle ...
similar to that of a comb filter for z-transform analysis. However, it can also be viewed as the simplest class of wavetable-modification algorithms now known as digital waveguide synthesis, because the delay line acts to store one period of the signal. Alexander Strong invented the algorithm, and Kevin Karplus did the first analysis of how it worked. Together they developed software and hardware implementations of the algorithm, including a custom VLSI chip. They named the algorithm "Digitar" synthesis, as a
portmanteau In linguistics, a blend—also known as a blend word, lexical blend, or portmanteau—is a word formed by combining the meanings, and parts of the sounds, of two or more words together.
for "digital guitar".


How it works

# A short excitation waveform (of length L samples) is generated. In the original algorithm, this was a burst of
white noise In signal processing, white noise is a random signal having equal intensity at different frequencies, giving it a constant power spectral density. The term is used with this or similar meanings in many scientific and technical disciplines, i ...
, but it can also include any
wideband In communications, a system is wideband when the message bandwidth significantly exceeds the coherence bandwidth of the channel. Some communication links have such a high data rate that they are forced to use a wide bandwidth; other links ma ...
signal, such as a rapid
sine wave A sine wave, sinusoidal wave, or sinusoid (symbol: ∿) is a periodic function, periodic wave whose waveform (shape) is the trigonometric function, trigonometric sine, sine function. In mechanics, as a linear motion over time, this is ''simple ...
chirp A chirp is a signal in which the frequency increases (''up-chirp'') or decreases (''down-chirp'') with time. In some sources, the term ''chirp'' is used interchangeably with sweep signal. It is commonly applied to sonar, radar, and laser syste ...
or frequency sweep, or a single cycle of a sawtooth wave or
square wave Square wave may refer to: *Square wave (waveform) A square wave is a non-sinusoidal waveform, non-sinusoidal periodic waveform in which the amplitude alternates at a steady frequency between fixed minimum and maximum values, with the same ...
. # This excitation is output and simultaneously fed back into a delay line L samples long. # The output of the delay line is fed through a filter. The gain of the filter must be less than 1 at all frequencies, to maintain a stable
positive feedback Positive feedback (exacerbating feedback, self-reinforcing feedback) is a process that occurs in a feedback loop where the outcome of a process reinforces the inciting process to build momentum. As such, these forces can exacerbate the effects ...
loop. The filter can be a first-order lowpass filter (as pictured). In the original algorithm, the filter consisted of averaging two adjacent samples, a particularly simple filter that can be implemented without a multiplier, requiring only shift and add operations. The filter characteristics are crucial in determining the harmonic structure of the decaying tone. # The filtered output is simultaneously mixed into the output and fed back into the delay line.


Tuning the string

The
fundamental frequency The fundamental frequency, often referred to simply as the ''fundamental'' (abbreviated as 0 or 1 ), is defined as the lowest frequency of a Periodic signal, periodic waveform. In music, the fundamental is the musical pitch (music), pitch of a n ...
(specifically, the lowest nonzero resonant frequency) of the resulting signal is the lowest frequency at which the unwrapped phase response of the delay and filter in cascade is -2\pi. The required phase delay ''D'' for a given fundamental frequency ''F''0 is therefore calculated according to ''D'' = ''F''''s''/''F''0 where ''F''''s'' is the sampling frequency. The length of any digital delay line is a whole-number multiple of the sampling period. In order to obtain a fractional delay often needed for fine tuning the string below JND ( Just Noticeable Difference), interpolating filters are used with parameters selected to obtain an appropriate phase delay at the fundamental frequency. Either IIR or
FIR Firs are evergreen coniferous trees belonging to the genus ''Abies'' () in the family Pinaceae. There are approximately 48–65 extant species, found on mountains throughout much of North and Central America, Eurasia, and North Africa. The genu ...
filters may be used, but 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 In mathematics, linear interpolation is a method of curve fitting using linear polynomials to construct new data points within the range of a discrete set of known data points. Linear interpolation between two known points If the two known po ...
between two samples (e.g., ''s''(4.2) = 0.8''s''(4) + 0.2''s''(5)). If the phase delay varies with frequency,
harmonic In physics, acoustics, and telecommunications, a harmonic is a sinusoidal wave with a frequency that is a positive integer multiple of the ''fundamental frequency'' of a periodic signal. The fundamental frequency is also called the ''1st har ...
s may be sharpened or flattened relative to the fundamental frequency. The original algorithm used equal weighting on two adjacent samples, as this can be achieved without multiplication hardware, allowing extremely cheap implementations. Z-transform analysis can be used to get the pitches and decay times of the harmonics more precisely, as explained in the 1983 paper that introduced the algorithm. 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. 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

Due to its plucked-string sound in certain modes, Alex Strong and Kevin Karplus conjectured that the Karplus-Strong (KS) algorithm was in some sense a vibrating string simulation, and they worked on showing that it solved the wave equation for the vibrating string, but this was not completed. Julius O. Smith IIIbr>
recognized that the transfer-function of the KS, when viewed as a digital filter, coincided with that of a vibrating string, with the filter in the feedback loop representing the total string losses over one period. He later derived the KS algorithm as a special case of digital waveguide synthesis, which was used to model acoustic waves in strings, tubes, and membranes. The first set of extensions and generalizations of the Karplus-Strong Algorithm, typically known as the Extended Karplus-Strong (EKS) Algorithm, was presented in a paper in 1982 at the International Computer Music Conference in Venice, Italy, and published in more detail in 1983 in Computer Music Journal in an article entitled "Extensions of the Karplus Strong Plucked String Algorithm," by David A. Jaffe and Julius O. Smith, and in Smith's PhD/EE dissertation. Alex Strong developed a superior wavetable-modification method for plucked-string synthesis, but only published it as a patent.


Musical applications

The first musical use of the algorithm was in the work ''May All Your Children Be Acrobats'' written in 1981 by David A. Jaffe, and scored for eight guitars, mezzo-soprano and computer-generated stereo tape, with a text based on Carl Sandburg's ''The People, Yes''. Jaffe continued to explore the musical and technical possibilities of the algorithm in ''Silicon Valley Breakdown'', for computer-generated plucked strings (1982), as well as in later works such as ''Telegram to the President, 1984'' for string quartet and tape, and ''Grass'' for female chorus and tape (1987). The patent was licensed first to Mattel Electronics, which failed as a company before any product using the algorithm was developed, then to a startup company founded by some of the laid-off Mattel executives. They never got sufficient funding to finish development, and so never brought a product to market either. Eventually Yamaha licensed the patent, as part of the Sondius package of patents from Stanford. It is unknown whether any hardware using the algorithm was ever sold, though many software implementations (which did not pay any license fees to the inventors) have been released. While they may not adhere strictly to the algorithm, many hardware components for modular systems have been commercially produced that invoke the basic principles of Karplus-Strong Synthesis: using an inverted, scaled control system for very small time values in a filtered delay line to create playable notes in the Western Tempered tuning system, controlled with volt per octave tracking or MIDI data. The Inventors were not specifically credited, though the term "Karplus-Strong Synthesis" is referenced in some of the manuals. Hardware components capable of Karplus-Strong style synthesis include the Moog Clusterflux 108M, Mutable Instruments Elements and Rings, 4ms Company Dual Looping Delay, 2HP Pluck, Make Noise Mimeophon, Arturia MicroFreak, Non Linear Circuits Is Carp Lust Wrong?, and the Strymon Starlab.


See also

*
Digital delay line A digital delay line (or simply delay line, also called delay filter) is a discrete element in a digital filter, which allows a signal to be delayed by a number of Sample (signal), samples. Delay lines are commonly used to delay audio signals feed ...


References

;Citations ;Bibliography * * * * * *


External links


The Karplus-Strong Algorithm



More sound examples under CC license

A HTML5 port of the above application

David A. Jaffe's music, including sound examples
{{DEFAULTSORT:Karplus-Strong string synthesis Sound synthesis types