Plucked String Models FromtheKarplus StrongAlgorithmtoDigitalWG&Beyond
Plucked String Models FromtheKarplus StrongAlgorithmtoDigitalWG&Beyond
7HUR 7RORQHQ
3OXFNHG6WULQJ
Helsinki University of Technology 0RGHOV)URPWKH
.DUSOXV6WURQJ
Laboratory of Acoustics and
Audio Signal Processing
P.O. Box 3000
FIN-02015 HUT, Finland
$OJRULWKPWR'LJLWDO
http://www.acoustics.hut.fi/
[email protected], [email protected],
:DYHJXLGHVDQG
[email protected] %H\RQG
The emergence of what is called physical modeling (Smith 1987, 1992, 1997); however, the relation has
and model-based sound synthesis is closely related to never been explicated in full detail. The first aim of
the development of computational simulations of this article is to show how the more “physical”
plucked string instruments. Historically, the first waveguide model of a plucked string can be reduced
physical approaches (Hiller and Ruiz 1971a, 1971b; to an extended form of the Karplus-Strong type that
McIntyre and Woodhouse 1979; McIntyre, we call the single delay-loop (SDL) model. For a linear
Schumacher, and Woodhouse 1983) were followed and time-invariant (LTI) case, this reduction is
by the Karplus-Strong (KS) algorithm (Karplus and relatively straightforward, and results in a
Strong 1983). The KS algorithm was discovered as a computationally more efficient digital filter
simple computational technique that seemingly had structure. (Note that the historical order of the KS
nothing to do with physics. Soon thereafter, Julius algorithm and digital waveguides is the reverse of
Smith and David Jaffe showed a deeper their logical order, since the generalization was not
understanding of its relation to the physics of the developed until after the KS algorithms was
plucked string (Smith 1983; Jaffe and Smith 1983). designed. This article’s title reflects the historical
Later, Julius Smith generalized the underlying evolution: the “beyond” refers to recent
ideas of the KS algorithm by introducing the theory generalizations and extensions of both concepts.)
of digital waveguides (Smith 1987). Digital The second aim of this article is to discuss further
waveguides are physically relevant abstractions yet extensions to the basic SDL models that make them
computationally efficient models, not only for capable of simulating plucking styles, beats in string
plucked strings, but for a variety of one-, two-, and vibration, sympathetic vibrations, and resonant
three-dimensional acoustic systems (Van Duyne and strings. Such techniques have already been proposed
Smith 1993; Savioja, Rinne, and Takala 1994; Van and studied (Jaffe and Smith 1983; Smith 1993;
Duyne, Pierce, and Smith 1994). Further Karjalainen, Välimäki, and Jánosy 1993). Here we
investigations embodied these ideas in more detailed discuss them in the context of our recent
synthesis principles and implementations, resulting implementations of plucked-string models.
in high-quality and realistic syntheses of plucked
string instruments (Sullivan 1990; Karjalainen and
Laine 1991; Smith 1993; Karjalainen, Välimäki, and )XQGDPHQWDOV RI 6WULQJ %HKDYLRU
Jánosy 1993; Välimäki, Huopaniemi, Karjalainen,
and Jánosy 1996). A recent overview of research in The behavior of a vibrating string with a plucked
this field is given by Smith (1996). excitation can be described in terms of two traveling
The equivalence of Karplus-Strong and digital waves traversing the string in opposite directions
waveguide formulations in sound synthesis was al– and reflecting back at the string terminations
ready known when the waveguide theory appeared (Elmore and Heald 1969; Fletcher and Rossing 1991).
When we assume that during autonomous vibration
This article was originally published in Computer Music Journal,
the string is an LTI system, we can model it as shown
22:3, pp. 17-32, Fall 1998. This reprint is available at URL:
http://www.acoustics.hut.fi/~vpv/publications/cmj98.htm
in Figure 1 (Smith 1987, 1992). The two delay lines
Propagation direction
Delay line
1/2
R (z ) R b(z )
f x (n) y (n)
Delay line
Propagation direction
can be interpreted as a digitized d’Alembert’s trip along the string: at the loop filter H l(z). When the
solution to the one-dimensional lossless wave loop filter is a two-point average y(n) = [x(n) + x(n –
equation. The two waveforms travel through the 1)]/2, and when the initial conditions (i.e., the initial
delay lines and reflect at reflection filters R f (z) and contents of the delay line) that are used to pluck the
R b (z) which produce phase inversion and slight string are taken to be random numbers, the well-
frequency-dependent damping. The input signal x(n) known Karplus-Strong algorithm for plucked-string
is summed into both delay lines just as output signal sounds is obtained (Karplus and Strong 1983; Jaffe
y(n) is taken as a sum of the wave-variable values in and Smith 1983). Note that the original algorithm
the two delay lines at the observation point. This uses no explicit input signal.
digital waveguide-modeling approach yields
efficient implementations for real-time sound
synthesis. For the digital waveguide of Figure 1, a )URP %LGLUHFWLRQDO 'LJLWDO :DYHJXLGHV
further assumption is needed: All signals to be WR 6'/ 0RGHOV
modeled must be bandlimited to below one-half of
the sampling rate. Owing to the LTI assumption, Above, we discussed two computational models for
string losses and dispersions can be commuted stringed musical instruments that provide the basis
between any driving or observation points (Smith for efficient real-time synthesis. The case of extreme
1992, 1997). This allows the use of ideal delay lines simplicity and efficiency, the KS model of Figure 2, is
that are computationally very efficient. certainly an oversimplification for anything but
In the string model of Figure 1, the input and rudimentary synthesis. More detailed models are
output signals can be of any wave-variable type, needed both for high-quality sound synthesis and for
such as displacement, velocity, acceleration, or slope theoretical understanding in physical modeling. In
(Smith 1992; Morse 1976). An interesting case is to this section, we derive the relations between the
select acceleration as the wave variable, since then an bidirectional digital waveguide and the SDL
ideal pluck corresponds to a unit impulse (Smith formulations in detail.
1983; Karjalainen and Laine 1991). Let us consider the relation of the two basic
Further using the above simplification principles, formulations, the bidirectional digital waveguide
it is possible to commute the elements of a model and the single delay-loop model. We will
terminated, dispersive, and lossy string into the form analyze two cases: a string with (1) a bridge output
illustrated in Figure 2, provided that the output and (2) a pickup output. An excitation—such as a
signal is taken to be a single traveling-wave pluck—in a real physical string initiates wave
component. In this extreme case, the losses and the components that travel independently in opposite
dispersion are lumped at a single point in the round directions. The output of the string—e.g., the force at
x (n) y (n)
Loop filter Delay line
H ( z)
l
z-L I
the bridge of an acoustic instrument, or the pickup In Figure 3, we redefine the dual delay-line
voltage in an electric guitar—reacts to both wave waveguide model for an ideally plucked string with
components. The effects of the excitation and pickup transversal bridge force as an output. This situation
positions are easily simulated in the waveguide is applicable to the simulation of the acoustic guitar,
model that is based on a dual delay line, as depicted for example. In our notation, H A,B(s) refers to the
in Figure 1. However, for sound-synthesis purposes, transfer function from point A to point B. Note that
the SDL realization, such as in Figure 2, is more we have divided the pluck excitation X(s) into two
efficient. Also, it is interesting from a theoretical parts, X 1(s) and X 2(s), such that X 1(s) = X 2(s) = X(s)/2.
point of view to formulate an SDL model that We can first simplify the model by deriving an
includes the effects of the excitation and pickup equivalent single excitation at point E1 that
positions. It has been shown that an ideal corresponds to the net effect of the two excitation
acceleration or velocity input into a string model components at points E1 and E2. When we assume
(corresponding to plucking or striking the string, that the bridge termination point (R1, R2) is to the
respectively) can be approximated by a unit impulse right of the input point (E1, E2) as in Figure 1, the
(Smith 1992). Thus, by assuming linearity and time equivalent single excitation at E1 can be expressed as
invariance, we can naturally think in terms of
impulse responses, and interpret the string model as XE1,eq(s) = X1(s) + HE2,L2(s)R f(s)HL1,E1(s)X2(s)
a linear filter. = ½[1 + HE2,E1(s)]X(s) = HE(s)X(s), (1)
where subscript “eq” stands for “equivalent,” and
Plucked String with Bridge Output X E2,E1(s) is the left-side transfer function from E2 to
E1 consisting of the partial transfer functions from E2
In the discussion to follow, we describe the transfer to L2 and L1 to E1, and the reflection function R f(s).
functions of the model components in the Laplace Thus, H E(s) is the equivalent excitation transfer
transform domain. The Laplace transform is an function.
efficient tool in linear continuous-time systems The output signal of interest is the transverse force
theory. In particular, time-domain integration and F( s) at the bridge. It can be elaborated as
derivative operations transform respectively into
division and multiplication by the Laplace variable s. F(s) = F+(s) + F–(s) = Z(s)[V+(s) – V–(s)]
We can replace the complex variable s with jω
= Z(s)[A1(s) – A2(s)]/s, (2)
(where j is the imaginary unit −1 , ω is the radian
frequency, which is equal to 2 π f, and f is the where the “+” and “–“ subscripts denote the two
frequency in Hz) to derive the corresponding opposite propagation directions. Equation 2 states
representation in the Fourier transform domain, i.e., that the bridge force is the bridge impedance Z(s)
the frequency domain. Later, we approximate the times the difference of the string velocity
continuous-time system by a discrete-time system in components V +(s) and V –(s) at the bridge. The
the Z-transform domain. For more information on acceleration difference A 1(s) – A 2(s) is integrated
Laplace, Fourier, and Z-transforms, see a standard (operator 1/s) to yield velocity difference V +(s) – V –
textbook on signal processing, such as that by (s). Hence
Oppenheim, Willsky, and Young (1983).
H L1,E1( s) H E1,R1 ( s)
L1 E1 R1 A 1( s)
Delay line
L2 E2 R2 A 2 ( s)
H E2,L2 ( s) H R2,E2 ( s)
= Z(s)[A1(s) – R b(s)A1(s)]/s F ( s)
H E,B ( s) =
= Z(s)[1 – R b(s)]A1(s)/s X ( s)
(7)
[ ]
1 H E1,R1( s) 1
= HB(s)A1(s), (3) = 1 + H E2,R1( s) Z( s) [1 − R b ( s)],
2 1 − H loop ( s) s
where H B(s) is the acceleration-to-force transfer
function at the bridge. Now or more compactly, based on the above notation,
Input
Delay Low-pass
String loop
S ( z)
Low-pass Delay
Low-pass
Output
Integrator
1 1
0.8 0.8
(a) 50 % (b) 22.5 %
Magnitude
Magnitude
0.6 0.6
0.4 0.4
0.2 0.2
0 0
0 2 4 6 8 0 2 4 6 8
Harmonic index Harmonic index
(a) (b)
L1 E1 O1 R1
Delay line
X 1( s) A 1( s)
1/2
R ( s) P o( s) R b( s)
f X ( s) U ( s)
s
X 2( s)
A 2 ( s)
Delay line
L2 E2 O2 R2
H E2,L2 ( s) H R2,O2( s)
HP( z )
From the -1
string loop Delay LP
y (n) P o (z ) I ( z) u ( n)
1
Based on Equations 1, 10, and 12, we can solve for 4. A block diagram of the string-output stage for a
the overall excitation-to-pickup transfer function, pickup is shown in Figure 8. Note that again the
minus sign due to the reflection from the end of the
U( s)
H E,P ( s) = string is explicitly shown with multiplication by – 1
X ( s) (compare with Figure 4).
(13)
[ ] [ ]
1 H E1,O1( s) P o ( s) A sound-synthesis model for a plucked string
= 1 − H E2,E1 ( s) 1 + H O1,O2 ( s) ,
2 1 − H loop ( s) s with a pickup output will be the same as the
diagram shown in Figure 5, except that a pickup-
or more compactly, based on the above notations, position comb filter and a pickup filter, P o(s), must
be cascaded. The comb filter can be similar to the
H E,P ( s) = H E ( s)H E1,O1 ( s)S ( s)H P ( s) . (14) pluck-position filter of Figure 5, and the pickup filter
If the pickup point O is to the left of the excitation can be a second-order low-pass filter.
point (E1), we can derive a similar formulation The synthesis models derived above can be
where the indices 1 and 2 are interchanged, as are further simplified using the commuted aggregate
the string terminations, L and R. excitation techniques (Smith 1993; Karjalainen,
As with the case of the bridge output, we now Välimäki, and Jánosy 1993), whereby the impulse
approximate the continuous-time transfer function in responses of other parts, such as the body, are
the Laplace transform domain with a discrete-time preconvolved with the primary excitation and stored
transfer function in the Z-domain: in a wavetable. If all the components apart from the
string loop are aggregated, we approach a variant of
H E,P ( z) = H E ( z) H E1,O1 ( z)S( z )H P ( z ) . (15) the basic KS algorithm that has an explicit input
signal. All variations are possible, from a fully
The differences between the bridge-output model aggregated excitation containing even the string loop
(Equation 7) and the pickup-output model (Equation (that is, pure wavetable synthesis), to the SDL model
13) are twofold. First, the wave propagation from the of Figure 5, or to the full bidirectional waveguide
excitation point to the output, H E1,R1(s) versus model of Figure 3. This shows the compatibility of
H E1,O1(s), covers different distances along the string. physical modeling with more traditional synthesis
Due to very low losses of wave propagation during techniques, such as source-filter modeling or
normal playing conditions, this difference is sampling. The more simplified versions are
negligible. Second, the transfer functions related to computationally more efficient, naturally, but the
the output couplings are very different. While the price is paid with decreased flexibility of parametric
difference of accelerations at the bridge R has a control.
relatively flat response (Equation 3 and Figure 3), the
summation of the two acceleration waves at the
pickup point O creates a comb-filter effect (Equation 0RUH ([WHQVLRQV WR WKH 6'/ 0RGHOV
10 and Figure 7) similar to the excitation point
filtering. Thus, a string-instrument model with a The SDL models derived above are flexible building
string-velocity pickup has two cascaded comb filters blocks when one is developing model-based sound
to color the response, instead of just the one in Figure synthesis of plucked string instruments. The SDL
Sympathetic
Horizontal polarization couplings
to other strings
Pluck Pluck
shaping position Sh(z)
filter comb filter mo out
Pluck and Body
E (z) P (z)
Wavetable n
1- m o
Sympathetic S v(z)
couplings from
other strings Vertical polarization
models show improved efficiency compared to the “synthesizer-like” character. An example of the
bidirectional digital waveguides, because the basic effect of mistuning the two polarization models is
DSP building blocks are maximally consolidated and shown in Figure 10. In Figure10a, the model
simplified. For example, a single fractional delay parameters are equal, and exponential decay is
filter for fine-tuning the pitch is sufficient. However, resulted. In Figure10b, the fundamental frequencies
if the string behavior contains essential nonlinearities of the models are equal, but the loop-filter
or time-varying characteristics, bidirectional parameters are different, and a two-stage decay is
waveguide formulations are needed (see, for produced. In Figure10c, the loop-filter parameters
example, Karjalainen, Backman, and Pölkki 1993). are equal, but the frequencies are mistuned to obtain
It is possible to add further details to the SDL a beating effect.
models to improve the naturalness and other sound- Several principles to simulate the sympathetic
quality features. Figure 9 illustrates an extended coupling between strings have been proposed (Jaffe
model in which additional properties are and Smith 1983; Smith 1993; Välimäki et al. 1996). A
implemented (Välimäki et al. 1996). The string physically correct method is a bridge-coupling filter
model’s excitation is realized with wavetables that presented by Smith (1993). A simple feedback
store consolidated pluck excitations and body coupling is added in Figure 9 to simulate the
responses, for easy and extremely efficient (but non- sympathetic coupling between strings. This
physical) modeling of the body (Smith 1993; approach is potentially unstable, because there is a
Karjalainen, Välimäki, and Jánosy 1993). Alternative feedback from the output of all strings to their
wavetables can be applied for different pluck styles inputs. When the feedback signals are attenuated
and qualities. A pluck-shaping filter E(z) can be used using small gain coefficients between all outputs and
to fine-tune the timbre of a single pluck-table inputs, it is possible to reach a stable simulation.
excitation. The comb-notch filter effect caused by Nevertheless, it would be safer to use a sympathetic
pluck position and pickup position are easy to add. coupling model that is inherently stable. Jaffe and
The pluck-position filter P(z) is shown in Figure 9, Smith (1983) proposed using a separate bank of
but the pickup-position filter is not included. sympathetic strings that get their input signal from
The beat effects caused by dual polarization of the output of the main strings that are plucked. This
string vibration (horizontal and vertical with respect approach is always stable. However, it would be
to the top plate) can be realized by mixing the desirable to use the existing strings of the instrument
outputs of two string models (Jaffe and Smith 1983). model for generating sympathetic vibrations, and
When the two models are slightly mistuned, a not implement separate models. In the following
natural sounding beat effect results that reduces the section, we introduce such a configuration.
0.5
Amplitude
−0.5
−1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time (sec)
(a)
1
0.5
Amplitude
−0.5
−1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time (sec)
(b)
1
0.5
Amplitude
−0.5
−1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time (sec)
(c)
C Sympathetic couplings
Horizontal polarization to other strings
Sh(z)
mp
mo out
Pluck and Body
E (z) P (z)
Wavetable n gc
1- m p
1- m o
Sympathetic
couplings from S v(z)
other strings
Vertical polarization
Coupling Phenomenon gains of the output signal to be sent from the kth
horizontal string to its parallel vertical string, and
Figure 11 illustrates a modified version of the
coefficients cmk are the gains of the kth horizontal
plucked-string synthesizer for a single dual-
string output to be sent to the mth vertical string.
polarization string. This time, the excitation for
There is a physical motivation to use real numbers
sympathetic vibrations is taken from one of the
less than 1 for all the elements of matrix C. However,
parallel strings that model the two polarizations (in
the structure’s stability does not depend on these
Figure 11, the horizontal one is used). To avoid
values, since there is no feedback.
feedback, the input from other strings is added to the
The model shown in Figure 11 also divides the
input of only those parallel strings that do not have
excitation signal that is sent to the two polarizations,
sympathetic coupling output. This implies that input
by using a mixing coefficient mp that is chosen to
must be fed into the vertical string model in Figure
have a value between 0 and 1. A non-zero value of
11, because the output is taken from the horizontal
parameter gck enables coupling of the two
model. This kind of signal coupling is
polarizations. If at the same time mp = 1, the model
unconditionally stable, and produces realistic
for the vertical polarization becomes a resonance
sympathetic coupling phenomena. Furthermore,
string that receives input only from the upper string
separate sympathetic string models need not be
model in Figure 11.
implemented, since sympathetic vibrations are now
An example of sympathetic coupling is pictured in
produced in a natural manner by all the strings
Figure 12. The primary vibration (the waveform
included in the synthesis model.
displayed in the upper part of Figure 12) excites
In the general form of this algorithm, there is a
another string whose output signal is shown in the
matrix C of coupling coefficients that determine the
lower part of Figure 12. In this example, the
proportion of the output signal to be sent to a
fundamental frequency of the secondary string is an
particular parallel string. This matrix can be written
octave higher than that of the primary string. Notice
as
the slow attack of the vibration in the coupled string
g c1 c12 c13 c1 N (the lower part of Figure 12).
c g c2 c 23
21
C = c 31 c 32 gc3 (16)
6WLOO 0RUH ([WHQVLRQV DQG )XWXUH 'LUHFWLRQV
c N 1
g cN Topics for future work in physical modeling of
plucked strings includes pluck simulation, different
where N is the number of dual-polarization strings, kinds of nonlinearities, the interaction between the
the coefficients gck (for k = 1, 2, 3, ..., N) denote the string and the body, modeling of the body response
0.5
Amplitude
−0.5
−1
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Time (s)
0.5
Amplitude
−0.5
−1
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Time (s)
using a digital filter, and calibration of the model by Karjalainen and Smith (1996). In the
parameters. Some of these problems have been computationally efficient synthesis models, it has
tackled in recent literature. Rank and Kubin (1997) been advantageous to avoid the use of a body model
proposed a nonlinear model for cases where the and instead use the principle of commuted
amplitude of string vibration is limited by contact waveguide synthesis. However, if one wishes to
with frets, such as in slap-bass playing techniques. A simulate the two-way interaction between the strings
passive nonlinear filter structure was devised by and the body, an explicit model for the body can be
Pierce and Van Duyne (1997). They presented an developed, although this is not required in the LTI
example where the nonlinear generation of missing case.
harmonics in string vibrations was successfully Calibration of the parameter values of a plucked-
simulated by their simple digital model. Digital filter string model was tackled by Välimäki et al. (1996).
approximations of the body response were discussed The proposed technique was based on short-time