2007, Digital Filter Applications To Modeling
2007, Digital Filter Applications To Modeling
a dissertation
submitted to the department of music
and the committee on graduate studies
of stanford university
in partial fulfillment of the requirements
for the degree of
doctor of philosophy
ii
I certify that I have read this dissertation and that in my
opinion it is fully adequate, in scope and quality, as a disser-
tation for the degree of Doctor of Philosophy.
Chris Chafe
(Principal Adviser)
Jonathan Berger
David Berners
Jonathan Abel
iii
Preface
This work is primarily archival in nature, documenting the research I did at CCRMA
in the 1990s. Although new or unpublished material is presented herein, most of the
research was completed, published, presented publicly and/or patented by me by 1999,
at which time I stopped out of Stanford to pursue a start-up company in the valley. I
have only now returned to my degree program in 2007. I have focused the narrative of
this dissertation on the tools and methods of spectral analysis of hyperbolic differential
equations, finite differences, multi-dimensional waveguide structures, linear and nonlinear
coupling of modes and strings, linear and nonlinear excitation models and the basic model
calibration methods. I rely heavily on my previously published works, internal reports,
patent applications, etc. which are cited throughout as appropriate.
iv
Acknowledgments
Jean-Claude Risset, who believed in me from the start, and who gave me my first
true window into what computer music was about;
John Chowning, who created the CCRMA culture of the 80s and 90s which was so
fertile for so long to my random-walk research;
John Pierce, who rolled up his sleeves with me on the passive nonlinearity, and gave
me a glimpse at how the engineering giants of another time built the world we live in;
Max Mathews, whose unshakable enthusiasm for hands-on exploration was a daily
inspiration;
Julius Smith, who provided me an introduction to the nuts and bolts of physical
modeling;
Chris Chafe, who never gave up on me, and whose help and advice was instrumental
in getting me back on track after an extended detour;
Dave Berners, Jonathan Abel and Jonathan Berger, who served beyond the call of
duty on my various academic review committees;
David Jaffe, Tim Stilson, and Sean Costello, fellow travelers who stuck with me
beyond reason through SynthBuilder, SynthCore, Staccato Systems, SoundMAX,
SMartTools, and VisualAudio till the very last day; and
v
Contents
Preface iv
Acknowledgments v
vi
1.6 A More General Difference for c "= 1 . . . . . . . . . . . . . . . . . . . . . . 21
1.6.1 Deriving the General Difference . . . . . . . . . . . . . . . . . . . . . 22
1.6.2 Spectral Analysis of the General Difference . . . . . . . . . . . . . . 23
1.6.3 Numerical Instability when c > 1 . . . . . . . . . . . . . . . . . . . . 24
1.6.4 Dispersion Error when c < 1 . . . . . . . . . . . . . . . . . . . . . . 26
1.6.5 Digital Waveguide Structure Models Optimal Wave Speed . . . . . . 28
vii
2.6.4 Calibrating Loop Stiffness from Recorded Data . . . . . . . . . . . . 56
2.6.5 Calibrating Loop Loss From Recorded Data . . . . . . . . . . . . . . 59
2.7 Coupled Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
2.7.1 Two-Stage Decay Rate . . . . . . . . . . . . . . . . . . . . . . . . . . 63
2.7.2 The Loaded Scattering Junction . . . . . . . . . . . . . . . . . . . . 66
2.7.3 The Coupled String Model . . . . . . . . . . . . . . . . . . . . . . . 67
2.8 Calibrating the Coupling Filter . . . . . . . . . . . . . . . . . . . . . . . . . 69
2.8.1 First Method: Deducing Rb from Single-String Decay Rates . . . . 70
2.8.2 Second Method: Deducing Rb from First-Stage Decay Rates . . . . 71
viii
4.1.2 Connecting Two Junctions with a Bidirectional Unit Delay . . . . . 106
4.1.3 The General Finite Difference Scheme . . . . . . . . . . . . . . . . . 108
4.1.4 Generalized Amplification Factors . . . . . . . . . . . . . . . . . . . 109
4.2 The 8-Port 2-D Multiply-Free Mesh . . . . . . . . . . . . . . . . . . . . . . 111
4.3 The 6-Port 2-D Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
4.3.1 The 6-Port 2-D Multiply-Free Non-Isotropic Mesh . . . . . . . . . . 113
4.4 The 6-Port 3-D Rectilinear Mesh . . . . . . . . . . . . . . . . . . . . . . . . 113
4.4.1 Animating the 6-Port 3-D Mesh . . . . . . . . . . . . . . . . . . . . 115
4.4.2 Dispersion Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
4.5 The 3-Port 2-D Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
4.5.1 Alternating Symmetry: Two Time Steps Needed . . . . . . . . . . . 120
4.5.2 Computing the Finite Difference . . . . . . . . . . . . . . . . . . . . 121
4.5.3 Verifying the FDA Converges to the PDE . . . . . . . . . . . . . . . 121
4.5.4 Dispersion Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
4.5.5 Animating the 3-Port 2-D Mesh . . . . . . . . . . . . . . . . . . . . 121
4.6 The 4-Port 3-D Tetrahedral Mesh . . . . . . . . . . . . . . . . . . . . . . . . 122
4.6.1 Motivation for the Tetrahedral Mesh . . . . . . . . . . . . . . . . . . 122
4.6.2 The Tetrahedral Difference . . . . . . . . . . . . . . . . . . . . . . . 124
4.6.3 Converging to the PDE . . . . . . . . . . . . . . . . . . . . . . . . . 128
4.6.4 Dispersion Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
4.6.5 Benefits of the Tetrahedral Mesh Over the Rectilinear Mesh . . . . . 133
ix
5.4.3 Bilinear Transform from s-Plane to z-Plane . . . . . . . . . . . . . . 144
5.4.4 Making the Spring Nonlinear . . . . . . . . . . . . . . . . . . . . . . 145
5.4.5 Finding the Digitally Correct Coefficient Gating Signal . . . . . . . 145
5.4.6 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
5.5 Why It Works from a Phase Modulation Perspective . . . . . . . . . . . . . 148
5.5.1 Phase Response of the One–Pole Allpass Filter . . . . . . . . . . . . 149
5.5.2 Sinusoidal Variation of the Coefficient . . . . . . . . . . . . . . . . . 150
5.5.3 Step Variation of the Coefficient . . . . . . . . . . . . . . . . . . . . 152
5.6 Simple Models of Spectrally Active Sounds . . . . . . . . . . . . . . . . . . 154
5.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
x
7.2.3 Impedance of the Ideal Linear Hammer . . . . . . . . . . . . . . . . 190
7.2.4 Connecting the Hammer to the String . . . . . . . . . . . . . . . . . 190
7.2.5 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
7.3 Analysis of Real Hammer-String Interaction Data . . . . . . . . . . . . . . . 193
7.4 Spectral Modeling Approach to the Multi-Pulse Effect . . . . . . . . . . . . 195
7.5 Excitation Synthesis with Nonlinearly Filtered Noise . . . . . . . . . . . . . 196
7.5.1 Synthesizing Sustain Pedal Effect . . . . . . . . . . . . . . . . . . . . 200
7.6 Wrap Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
xi
List of Figures
xii
2.15 Modes of Two Identical Strings Coupled Together by a Bridge: Reactive
Coupling (left graph) and Resistive Coupling (right graph). Adapted from
(Fletcher and Rossing, 1991). . . . . . . . . . . . . . . . . . . . . . . . . . . 63
2.16 Decay Trajectories Measured on Piano G4 Tone: Single String vs. Three
String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
2.17 G4 Decay Trajectories Measured on Synthesized G4 Piano Tone: Tuned
Exactly vs. Slight Detuning . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
2.18 Two Strings Coupled at a Lumped Impedance . . . . . . . . . . . . . . . . . 66
2.19 Three Piano Strings Coupled at a Bridge Termination . . . . . . . . . . . . 68
2.20 G4 Piano Tone: Single- and Triple-String Decay Rates . . . . . . . . . . . . 72
xiii
4.7 6-Port Mesh with Non-Isotropic Wave Impedance . . . . . . . . . . . . . . . 114
4.8 Dispersion in the Non-Isotropic 6-Port Mesh . . . . . . . . . . . . . . . . . 114
4.9 Structure of the 6-Port Rectilinear 3-D Mesh . . . . . . . . . . . . . . . . . 115
4.10 Animation of the 3-D Rectilinear Mesh Modeling Compression Wave Through
a Tube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
4.11 Rectilinear Dispersion: ωz = 0 . . . . . . . . . . . . . . . . . . . . . . . . . . 117
4.12 Rectilinear Dispersion: ωz = ωx . . . . . . . . . . . . . . . . . . . . . . . . . 117
4.13 Rectilinear Dispersion: |ω| = π/2 . . . . . . . . . . . . . . . . . . . . . . . . 118
4.14 The 3-Port 2-D Hexagonal Mesh . . . . . . . . . . . . . . . . . . . . . . . . 119
4.15 Close-up Showing Alternating Symmetry . . . . . . . . . . . . . . . . . . . . 120
4.16 Three-Port Dispersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
4.17 The Animated 3-way 2-D Hexagonal Mesh . . . . . . . . . . . . . . . . . . . 123
4.18 Methane: Tetrahedral Bonds on the Carbon Atom . . . . . . . . . . . . . . . 124
4.19 Diamond: The Tetrahedral Carbon Mesh . . . . . . . . . . . . . . . . . . . . 125
4.20 3-D Tetrahedral Mesh Structure . . . . . . . . . . . . . . . . . . . . . . . . . 126
4.21 Bi-Directional Delay Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
4.22 Tetrahedral Dispersion: ωx = 0 . . . . . . . . . . . . . . . . . . . . . . . . . 129
4.23 Tetrahedral Dispersion: ωy = 0 . . . . . . . . . . . . . . . . . . . . . . . . . 130
4.24 Tetrahedral Dispersion: ωz = 0 . . . . . . . . . . . . . . . . . . . . . . . . . 130
4.25 Tetrahedral Dispersion: |ω| = π/2 . . . . . . . . . . . . . . . . . . . . . . . . 131
xiv
5.13 Effect of Varying acenter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
5.14 Effect of Varying ∆a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
5.15 Output Spectrum from Sinusoidally Driven, Sinusoidally-Modulated Allpass
Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
5.16 Evolving Spectrum of String/PNF System . . . . . . . . . . . . . . . . . . . 152
5.17 Harmonic Loop with Lowpass Filter . . . . . . . . . . . . . . . . . . . . . . . 153
5.18 Harmonic Loop with Lowpass Filter and Passive Nonlinear Filter . . . . . . 153
5.19 Inharmonic Loop with Lowpass Filter . . . . . . . . . . . . . . . . . . . . . . 154
5.20 Inharmonic Loop with Lowpass Filter and Passive Nonlinear Filter . . . . . 154
xv
7.5 Feed-Forward Hammer Filter . . . . . . . . . . . . . . . . . . . . . . . . . . 192
7.6 Impulse-Driven Recursive Hammer Filter . . . . . . . . . . . . . . . . . . . 192
7.7 Middle-C (261 Hz) Struck Hard: Force Signals Computed Using the WDH
Parameterized with Physical Data Taken from (Chaigne and Askenfelt, 1994b)194
7.8 Spectral EQ Method of Modeling the Hammer Filter . . . . . . . . . . . . . 195
7.9 Sixth-Order Filter Fit to Ratio Spectrum . . . . . . . . . . . . . . . . . . . . 195
7.10 Synthesis of Soundboard Tap with Nonlinearly Filtered Noise . . . . . . . . . 197
7.11 1-Pole Soundboard Resonance Implementation . . . . . . . . . . . . . . . . . 197
7.12 Noise-Plus-Resonator Soundboard Synthesis . . . . . . . . . . . . . . . . . . 197
7.13 dB Frequency Response of a Recorded Piano Soundboard Tap (above) and
a Close-Up of the Lower Frequencies (below) . . . . . . . . . . . . . . . . . . 198
7.14 Synthetic Soundboard Tap Using a Swept 1-Pole and Noise . . . . . . . . . 199
7.15 “Pedal-Down” Synthesis of Dry Soundboard Tap Plus “Wet” Open Strings
Tap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
xvi
Chapter 1
1.1 Introduction
This first chapter investigates the partial differential equation of the vibrating string and
its relationship to the digital waveguide filter implementation and the equivalent finite
difference approximations. Understanding the wave equation and its traveling-wave solu-
tion is fundamental to the digital waveguide physical modeling approach (Smith, 1992).
Furthermore, a grasp of the numerical properties of finite difference approximations to
differential equations is illuminating in the one-dimensional case of vibrating strings, and
is indispensable in the development of the multi-dimensional digital waveguide mesh so-
lutions for traveling waves in membranes, plates, and rooms presented here in Chapters 3
and 4, and originally published in (Van Duyne and Smith, 1996; Van Duyne and Smith,
1993b; Van Duyne and Smith, 1993a; Van Duyne and Smith, 1995a). Inasmuch as finite
difference approximations are a fundamental computational tool to the scientific com-
munity (Strikwerda, 1989), we review the derivation of the flexible string equation and
derive the traveling-wave solutions in both the continuous time–space equation and in the
standard finite difference approximation. We then review the digital waveguide compu-
tational model and show its exact equivalence to an optimally sampled finite difference
approximation.
Chapter 2 follows up with modeling stiffness and loss in strings and coupled strings
including calibration methods to make the models useful. Chapter 5 addresses nonlinear
coupling of modes. Chapter 6 introduces traveling-wave decomposition of lumped imped-
ances, in particular, a coupled-mode synthesis method, and a nonlinear piano hammer
1
CHAPTER 1. TRAVELING WAVE WARM-UPS 2
design. Chapter 7 investigates how to commute the piano soundboard response through
a nonlinear hammer excitation to create efficient piano tone synthesis algorithms. The
Appendices provide some interesting sidelights: a hybrid waveguide/FM pick-up point
modulation synthesis method, a stiff-string FM-based synthesis model, and an interesting
way to do signal-controlled artifact-free allpass interpolation of delay line loop lengths.
Now on to the analysis of the 1-D wave equations and finite difference schemes in both
the continuous time and space domains and the discrete time and space domains, spectral
amplification factors, and techniques for evaluating and correlating the digital waveguide
filters, finite difference schemes and differential equations which describe traveling wave
behavior in isotropic media.
The ideal flexible string equation is worked out fully in (Morse, 1976), and in many other
places. We review here the basic physical intuition of the equation. Assume an ideal
lossless flexible string whose transverse displacement is given by y(t, x), where t is time,
and x is horizontal position along the string. Assume it is infinitely long, that is, there
are no termination boundary conditions to worry about for now. There is a constant
tension, K, on the string; and the string has a mass per unit length of ε. We may apply
Newton’s Second Law, f = ma, that is, force = mass × acceleration, to a small piece of
the string between point x and point x + ∆x. The mass of this small string segment is its
mass density times its length, ε∆x. Its acceleration is the second partial time derivative
of its transverse position, ∂ 2 y/∂t2 . Figure 1.1 shows the transverse force on the right end
point of the string segment as the transverse component of the string tension, which may
∆
be approximated, for small string deflection angles, θ, as K sin θ ≈ K tan θ = K∂y/∂x
evaluated at the point x + ∆x. The transverse force on the left end point of the string
segment may be similarly approximated as −K∂y/∂x evaluated at the point x. Hence,
the total transverse force is the sum of these two forces. Substituting these values for
force, mass and acceleration into f = ma, we obtain the relationship,
! "
∂y(t, x + ∆x) ∂y(t, x) ∂2y
K − = ε∆x (1.1)
∂x ∂x ∂t2
CHAPTER 1. TRAVELING WAVE WARM-UPS 3
K
K sinθ
θ
y(x)
x x+Δx
Dividing both sides by ∆x and taking the limit as ∆x goes to zero, we note that the
left-hand side of the equation contains the definition of the second partial derivative of y
with respect to x.
waves, vertical transverse waves, and longitudinal compression waves, all of which play an
important role in the vibration of real strings. These three modes of vibration are linear
and may be separated into orthogonal, non-coupled modes in the ideal string only when
deflections remain small enough (Elmore and Heald, 1985).
Returning to the simplified case, Jean Le Rond d’Alembert published the traveling-wave
solution to the wave equation in 1749 in his Recherches sur la courbe que forme une corde
tendue mise en vibration (d’Alembert, 1749). It is easy to verify by substitution that the
ideal wave equation (1.3) is solved by the sum of two arbitrary traveling waves,
where y + (x − ct) represents an arbitrary fixed wave shape traveling to the right at speed
c, and y − (x + ct) represents an arbitrary fixed wave shape traveling to the left at speed c.
Defining ÿ ± as the second derivatives of the traveling-wave shape functions y ± ,
∆ d2 y ± (ξ)
ÿ ± (ξ) = (1.5)
dξ 2
∂ 2 y(t, x)
= c2 ÿ + (x − ct) + c2 ÿ − (x + ct) (1.6)
∂t2
2
∂ y(t, x)
= ÿ + (x − ct) + ÿ − (x + ct) (1.7)
∂x2
Substituting, we see,
∂ 2 y(t, x) 2
2 ∂ y(t, x)
= c (1.8)
∂t2 ∂x2
∆ #
which is equivalent to (1.3) with c = K/ε. Hence, the traveling-wave solution of the
wave equation is verified by direct substitution.
The arbitrary traveling waves may be expressed as sums of their traveling sinusoidal
components:
$
jωk (x∓ct)
y ± (x ∓ ct) = A±
ke (1.9)
k
CHAPTER 1. TRAVELING WAVE WARM-UPS 5
where the A±
k are complex amplitude scalers containing magnitude and phase information,
and ejωk (x∓ct) represents a complex sinusoid of spatial frequency ωk traveling at speed c.
Note that, in this formulation, the corresponding temporal frequency observed at some
fixed point on the string would be ωk c.
If we lack the intuition of d’Alembert, or otherwise prefer not to guess at the solutions
of the wave equation, we may derive the traveling-wave solution from Equation (1.8) by
applying straightforward spectral transform methods. An application of the generalized
bi-directional Laplace transform to the space dimension of the wave equation may be found
in (Zemanian, 1987). However, we do not follow this method; our approach will be to apply
the Fourier transform to the continuous space dimension, −∞ < x < ∞, mapping to the
continuous frequency variable, −∞ < ω < ∞; then to apply the uni-directional Laplace
transform to the continuous time dimension, t > 0, mapping to the complex frequency
variable, s, over the complex plane where the imaginary part of s corresponds to real
frequencies, and the real part of s corresponds to decaying exponentials. First, we take
the Fourier transform of (1.8) over the spatial coordinate, mapping,
% ∞
F ∆
y(t, x) ←→ yω (t) = y(t, x)e−jωx dx (1.10)
−∞
and taking advantage of the derivative theorem (Hsu, 1984) which states,
∂y(t, x) F
←→ jωyω (t) (1.11)
∂x
∂ 2 yω (t)
= c2 (jω)2 yω (t) (1.12)
∂t2
where yω (t) is the Fourier transform of y(t, x) along x. Applying the uni-directional
Laplace transform to 1.12, mapping,
% ∞
L ∆
yω (t) ←→ Yω (s) = yω (t)e−st dt (1.13)
0
CHAPTER 1. TRAVELING WAVE WARM-UPS 6
∂yω (t) L
←→ sYω (s) − yω (0) (1.14)
∂t
and
∂ 2 yω (t) L 2
←→ s Yω (s) − syω (0) − ẏω (0), (1.15)
∂t2
we find
s2 Yω (s) − syω (0) − ẏω (0) = c2 (jω)2 Yω (s) (1.16)
∆
where yω (0) is the initial condition spatial spectrum at time zero, and ẏω (0) = ∂yω /∂t
evaluated at ω = 0 is the first partial time derivative of the spatial spectrum at time zero.
Solving for Yω (s) and making a partial fraction expansion, we obtain the result,
where, ! "
∆ 1 ẏω (0)
yω± = yω (0) ∓ (1.18)
2 jωc
We may view Equation (1.17) as a continuum of second-order analog filter systems which
operate pointwise on space spectrum point signals. The filter continuum is tuned according
to the frequency ω of the spatial spectrum point on which it is working.
Noting that,
L 1
eat ←→ (1.19)
s−a
we take inverse Laplace transform of Equation (1.17) to get,
Applying the inverse Fourier transform in space, taking advantage of the shift theorem,
which maps linear phase modulation in the spectral domain to constant distance shift in
the space domain, we obtain the classical traveling-wave solution,
Furthermore, taking the inverse Fourier transform of Equation (1.18), we may express the
left and right displacement wave components in terms of the initial displacement, y(0, x),
and initial transverse velocity, ∂y(0, x)/∂t, of the the string:
! % x "
1 1 ∂y(0, ξ)
y ± (x) = y(0, x) ∓ dξ (1.22)
2 c −∞ ∂t
These initial condition relations are reached in (Morse and Ingard, 1968) in an entirely
time-space domain approach.
Our spectral transform approach is somewhat heavy-handed if its only purpose is to solve
the 1-D wave equation. However, we have in mind to apply this same method to finite
difference approximations to the wave equation in the multi-dimensional cases. These
methods will give us a way to evaluate quantitatively the numerical error in finite ap-
proximation schemes. We work out the details here in the one-dimensional case, and
apply the same principles to the analysis of the digital waveguide mesh solutions to the
multi-dimensional wave equation in Chapters 3 and 4.
To proceed, we may study the behavior of wave travel in the wave equation by tracing
the evolution of the spatial spectrum over time. In particular, we may compute a set of
spectral amplification factors (Strikwerda, 1989) which describe how the spatial spectrum
changes over a given time interval, ∆t.
Equation (1.20) expresses the spatial spectrum at time t as the sum of two initial
constant spectra, yω± , modulated by linear phase terms, e±jωt . We may investigate how
the spatial spectrum changes over the interval from t to t + ∆t by comparing (1.20) with
the following:
where,
∆
gω± (∆t) = e∓jωc∆t (1.25)
are the spectral amplification factors. The magnitude of these factors is equal to 1, which
CHAPTER 1. TRAVELING WAVE WARM-UPS 8
means there is no loss in this equation. However there is a spatial phase shift of
This is the number of radians that a given spatial frequency, ω, will advance in phase after
a time interval ∆t.
Phase Distance
By analogy with the concept of phase delay, or really phase advance, in the time domain,
we may define a phase distance which is intuitively the distance which a space wave travels
in the time interval corresponding to the apparent phase advance at the given frequency.
Phase distance is the phase advance normalized by spatial frequency,
−% gω± (∆t)
= ±c∆t (1.27)
ω
Of course, we may define the speed of wave travel as phase distance traveled per unit of
time,
−% gω± (∆t)
= ±c (1.28)
ω∆t
Tn = 2L/n (1.29)
2π nπ
ωn = = (1.30)
Tn L
∆
Defining the travel speed of the spatial frequencies to be C(ωn ) = c, constant for all spatial
frequencies, then the allowed partial frequencies, p(n), are computed as
C(ωn ) nc
p(n) = = (1.31)
Tn 2L
Allowed partial frequencies are simply multiples of the fundamental frequency, p(1).
Although this computation is evidently trivial and not surprising in the ideal flexible
string case, this method is general and will permit us to compute allowed frequencies on
terminated media where C(ωn ) is not constant over ωn .
For the purpose of the present work, note that the digital waveguide is a direct implemen-
tation of the traveling-wave solution to the wave equation as a pair of bi-directional delay
lines which represent both time delay and physical distance by their delay elements (Smith,
1987; Smith, 1992). Figure 1.2 illustrates a high-level view of the digital waveguide. Two
arbitrary digital traveling-wave signals propagate independently in their respective left-
and right-going directions in delay line registers, while the physical wave amplitude at any
point may be obtained by summing the left- and right-going signals at a physical position.
The physical signal output, u, is the transverse displacement of the vibrating string
at some pick-up point on the string, and is computed as sum of its traveling components,
u+ and u− . The full shape of the string can be computed by summing the traveling-wave
signals at each point of the bidirectional delay lines.
CHAPTER 1. TRAVELING WAVE WARM-UPS 10
u+
DELAY LINE
+ u
DELAY LINE
u–
The position of the pick-up point is critical in audio synthesis, as the choice of position
comb filters (Dodge and Jerse, 1985; Parks and Burrus, 1987) the output signal signifi-
cantly in relation to the modal shapes on the strings. Sometimes this is desirable, often
not. In much physical modeling synthesis, the audio output can be taken directly from
one of the traveling waves (without computing the sum of traveling waves), or in more
advanced modeling, extracted form the bridge filter or scattering junction (Smith, 1987).
In Chapters 3 and 4, we extract output audio from scattering junctions on the plane, but
then a 2-D comb filtering effect is in place relating to the modal shapes on the membrane.
Appendix A investigates the audio synthesis possibilities of sliding the position of the
pick-up point along the length of the string model at constant velocity, accelerating it,
or oscillating the position placement—something that would be hard to do in reality, but
easy to do in a physical model. This exploits the comb filtering effect and the result is a
combination of amplitude and frequency modulation (Chowning, 1973) effects on physical
model output.
CHAPTER 1. TRAVELING WAVE WARM-UPS 11
z-N z-1
1–ε ε
We will need to model string systems whose loop delays are a non-integral number of
samples long. However, we are in a time-sampled environment and there is no way to
have a fractional delay except by some form of filtering. Much work has gone into this
area of research and we do not intend to explore this area fully. See (Välimäki, 1995) for
some excellent analysis and applications. For now, we may extract two simple methods
which are in common use due to their efficiency and useful properties.
Linear Interpolation
Allpass Interpolation
An alternative to linear interpolation, which does not attenuate the magnitude of the
signal in the delay line is allpass interpolation (Jaffe and Smith, 1983). The idea is to
CHAPTER 1. TRAVELING WAVE WARM-UPS 12
z-N Hε(z)
insert an allpass filter into the delay line whose phase response delays the phase of the
component frequencies in the signal so as to imitate the effect of a fractional delay. The
first-order allpass filter is sufficient for this purpose.
The one-pole digital allpass filter may be defined by its difference equation,
where x(n) is its input signal and y(n) is its output signal, or by its Z–transform (Parks
and Burrus, 1987),
∆ a0 + z −1
H(z) = (1.34)
1 + a0 z −1
We take the coefficient, a0 , to be a real number between −1 and 1. The frequency response
of this filter is obtained by replacing z with ejωT , where ω is the radian frequency and
∆
T = 1/fs is the sampling interval. The magnitude response, |H(ejωT )|, is always 1;
therefore, we may re-write the frequency response in the following polar form,
∆
where the phase response is φ(ωT ) = % H(ejωT ).
We may derive an analytic expression for the phase response,
& '
Im H(ejωT )
φ(ωT ) = arctan (1.36)
Re{H(ejωT )}
(a0 2 − 1) sin ωT
= arctan (1.37)
2a0 + (a0 2 + 1) cos ωT
where the arc tangent function has been unwrapped. Since we restrict ω to positive fre-
quencies, we can unwrap the values of the usual computer generated arc tangent function
by subtracting π whenever the arctan function is positive. Figure 1.5 shows overlaid plots
of φ(ωT ) for values of a0 ranging from −0.8 to 0.8.
CHAPTER 1. TRAVELING WAVE WARM-UPS 13
ωT
0 π/4 π/2 3π/4 π
0
a0 = 0.8
−π/4
φ(ωT)
−π/2
−3π/4
a0 = −0.8
−π
The phase delay of the allpass filter is defined as the phase response normalized by
frequency,
∆
Pd (ω) = φ(ωT )/ω (1.38)
The phase delay tells us the effective number of samples that a particular frequency has
been delayed. Therefore, if we need a fractional delay of ε, then we simply need an allpass
filter whose phase delay is ε at all frequencies. This is not exactly possible, but the one-
pole allpass makes a convenient unattenuated approximation to this. An estimate of the
correct allpass coefficient for a given fractional delay is given in (Jaffe and Smith, 1983),
1−ε
a0 ≈ (1.39)
1+ε
which is good for low frequencies. There is some dispersion at the higher end of the
frequency response, but the effect is quite good when the coefficient is near zero, which
is where the allpass reduces to the exactly linear phase case of one sample of pure delay.
Therefore, it may be best to let your desired fractional delay, ε, range from .5 to 1.5,
rather than from 0 to 1 by modifying the integral delay length appropriately.
CHAPTER 1. TRAVELING WAVE WARM-UPS 14
Returning to the digital waveguide filter structure, per se, we note that the continuous
time and space solution to the wave equation, y(t, x) may be sampled over space and time
with a time sampling interval of T and a spatial sampling interval of X to define a discrete
time–space function, vm (n), where n is the time index and m is the space index. If we
take X = cT , then waves should travel at the rate of one spatial sample per time sample:
∆
vm (n) = y(nT, mX) (1.40)
= y + (mX − cnT ) + y − (mX + cnT ) (1.41)
= y + ((m − n)X) + y − ((m + n)X) (1.42)
∆
= u+ (m − n) + u− (m + n) (1.43)
where u± are the sampled traveling-wave signals as in Figure 1.2 of the solution corre-
sponding to the continuous traveling waves, y ± .
In Figure 1.6, we now explicitly define separate traveling-wave signals between every
+ (n) is the signal output at position m
delay unit in the upper and lower delay lines: vm
− (n) is the signal output at position m on
on the upper right-going delay line at time n; vm
+ (n) is the
the lower left-going delay line at time n. To clarify by an example, note that vm
+ − (n) is the same signal as v + (n − 1).
same signal as vm−1 (n − 1), similarly vm m+1
Figure 1.6 illustrates the basic computational structure in digital filter block diagram
notation. The time index is represented by n and the spatial position is represented by
+ (0) is the initial spatial wave shape at time 0 which travels to the right
m. The signal vm
− (0) is the initial spatial wave shape at time 0 which travels
as n increments. The signal vm
to the left as n increments. The actual physical variable is given by
+ −
vm (n) = vm (n) + vm (n) (1.44)
CHAPTER 1. TRAVELING WAVE WARM-UPS 15
+ (n)
vm-1 + (n)
vm + (n)
vm+1
z−1 z−1 z−1
∞
$
Z ∆
vm (n) ←→ Vm (z) = vm (n)z −n (1.45)
n=0
$∞
± Z ∆
vm (n) ←→ Vm± (z) = ±
vm (n)z −n (1.46)
n=0
With this, we observe the following relationships from the Figure 1.6:
+
Vm+ (z) = z −1 Vm−1 (z) (1.48)
Applying these observations, we may express the traveling-wave signals, Vm± (z) as combi-
nations of the physical signals, Vm (z)
z −1
Vm+ (z) = (Vm−1 (z) − z −1 Vm (z)) (1.55)
1 − z −2
z −1
Vm− (z) = (Vm+1 (z) − z −1 Vm (z)) (1.56)
1 − z −2
Hence, the physical variable signals, Vm (z), may be expressed in terms of other physical
variable signals, and the wave variable signals may be eliminated,
∆
Vm (z) = Vm+ (z) + Vm− (z) (1.57)
z −1
= (Vm−1 (z) − 2z −1 Vm (z) + Vm+1 (z)) (1.58)
1 − z −2
Gathering terms,
In later chapters it will be useful to have a reliable method to verify exactly what partial
differential equation a given finite difference scheme converges to as the grid interval sizes
approach 0.
In general we will be able to replace the discrete time and space variables with contin-
uous time and space variables, and replace the unit spatial and time sample shifts in the
finite difference with an ε. We can then apply a multi-dimensional power series expansion
around an arbitrary point in all directions, and let ε converge to 0. When the finite dif-
ference relation under study represents wave propagation in a membrane or in 3-D space,
and uses a non-rectilinear space grid, this may be the most direct way to glean the actual
theoretical wave speed of the traveling waves in a closed form.
Let’s apply the techniques in the simple 1-D case. Note that even in the 1-D case we
will need a 2-D Taylor’s expansion as there are two variables, time and space.
The 2-D Taylor’s series expansion around the point, u(t, x) can be defined as follows (Courant
and John, 1974)
∞ $
∞
∆ $ u(nt ,nx ) (t, x)∆tnt ∆xnx
u(t + ∆t, x + ∆x) = (1.62)
nt nx nt !nx !
( )
∆x (0,1) ∆x2 (0,2)
= u(t, x) + u (t, x) + u (t, x) + . . .
1! 2!
( )
∆t ∆x (1,1) ∆x2 (1,2)
+ u(1,0) (t, x) + u (t, x) + u (t, x) + . . .
1! 1! 2!
( )
∆t2 (2,0) ∆x (2,1) ∆x2 (2,2)
+ u (t, x) + u (t, x) + u (t, x) + . . .
2! 1! 2!
+ ...
where u(n,m) (t, x) is the partial derivative of u of order n in the t direction and of order
m in the x direction (and assumed to exist), evaluated at the point (t, x).
CHAPTER 1. TRAVELING WAVE WARM-UPS 18
Then we can replace each term with a full Taylor’s expansion around the point (t, x):
( )
(1,0) (2ε)2 (2,0)
u + u − 2εu + u + O{ε3 } = (1.64)
2!
( )
(1,0) (0,1) ε2 ε2
u − εu − εu + u(2,0) + u(0,2) + ε2 u(1,1) + O{ε3 }
2! 2!
( )
(1,0) (0,1) ε2 ε2
+ u − εu + εu + u(2,0) + u(0,2) − ε2 u(1,1) + O{ε3 }
2! 2!
where O{ε3 } are terms of order ε3 or higher. Canceling and gathering terms, this reduces
to
ε2 u(2,0) = ε2 u(0,2) + O{ε3 } (1.65)
Dividing through by ε2 ,
O{ε3 }
u(2,0) = u(0,2) + (1.66)
ε2
and taking the limit as ε −→ 0, we arrive at the standard 1-D wave equation,
We wish now to arrive at the discrete traveling-wave solution by solving the difference
scheme directly. To begin, we take the discrete Fourier transform of the infinite spatial
series (DFTIS) in the difference equation mapping
DF T IS
vm (n) ←→ vξ (n) (1.68)
where ξ is the spatial frequency variable and vξ (n) are a time sequence of spatial trans-
forms.
This is just a second-order difference equation in n of the indexed spatial transforms, which
may be solved easily by taking the Z-transform over n, and applying the shift theorems
which map
Z
y(n − 1) ←→ z −1 Y (z) + y(−1) (1.71)
Z
y(n − 2) ←→ z −2 Y (z) + z −1 y(−1) + y(−2) (1.72)
We get,
* + * +
Vξ (z) + vξ (−2) + z −1 vξ (−1) + z −2 Vξ (z) = 2 cos ξ vξ (−1) + z −1 Vξ (z) (1.73)
where vξ (−1) and vξ (−2) are initial spatial spectrum conditions at times −1 and −2.
Solving for Vξ (z),
The denominator may be factored into two complex-conjugate poles and we may make a
CHAPTER 1. TRAVELING WAVE WARM-UPS 20
vξ+ vξ−
Vξ (z) = + (1.75)
1 − e−jξ z −1 1 − ejξ z −1
where vξ+ and vξ− are some combination of the initial condition spatial spectra vξ (−1) and
vξ (−2).
We may view 1.75 as a continuum of second-order digital filter systems which operate
pointwise on space spectrum signals. The filter continuum is tuned according to the
frequency ξ of the spatial spectrum bin on which it is working.
Taking the inverse Z-transform we obtain an expression for the evolution of the spatial
spectrum over time,
vξ (n) = vξ+ e−jξn + vξ− ejξn (1.76)
Taking the inverse discrete time spatial Fourier transform we obtain a pure traveling-wave
solution,
vm (n) = v + (m − n) + v − (m + n) (1.77)
Just as we did in the continuous time and space domain, we can define the digital spectral
amplification factors as
∆
gξ± (T ) = e∓jξ , (1.78)
representing the change in the spatial spectrum over one time sample. The magnitude of
these factors is one, which means the implementation is lossless; there is no decay in the
waveshape as time passes.
is the number of radians that a given spatial frequency, ξ, will advance in phase after a
time interval of one sample. By analogy with the concept of phase advance in the time
CHAPTER 1. TRAVELING WAVE WARM-UPS 21
domain, we compute the phase distance which a space wave travels in the time interval
as,
−% gξ± (T )
= ±1 (1.80)
ξ
The speed of wave travel is one space sample per time sample.
In effect, we have just compared the continuous-time spectral amplification factors (which
revealed that all spatial frequencies traveled at speed c) with the discrete-time spectral
amplification factors (which revealed that spatial frequencies traveled at 1 spatial sample
per time sample) to conclude that the difference approximation modeled the behavior of
the continuous equation exactly on the sampled grid for the case, c = 1. This approach
is known as von Neumann analysis (Strikwerda, 1989); it uses a variety of frequency
transforms to compare the evolution over time of the spatial spectrum in the continuous
time system to that in the discrete time system.
Recall that to solve an ordinary linear differential equation, we may reduce the problem
to a polynomial in s by taking the Laplace transform and replacing orders of derivatives
with powers of s, then take a spatial transform of a partial differential equation with
independent time and space variables to obtain an ordinary differential equation describing
the evolution of spatial spectra over time. From here, we can check how the spatial
spectrum evolves after a time delay of T seconds. The ratio of the spatial spectrum at
time t + T to the spatial spectrum at time t is known as the spectral amplification factor.
Also, recall that in the discrete case, to solve a time-indexed difference equation, we
may reduce the problem to a polynomial in z −1 by taking the Z-transform and replacing
samples of time delay in the index with powers of z −1 . If we have a time- and space-indexed
difference scheme approximation to compare with our partial differential equation, we may
even perform a similar spectral evolution analysis in multiple dimensions. First, let’s look
at the more difficult 1-D situation where c "= 1.
f (x + ∆x) − f (x)
f & (x) ≈ (1.81)
∆x
∂2y 2
2∂ y
= c (1.83)
∂t2 ∂x2
∆
u(n, m) = y(nT, mX) (1.84)
where T is the time sampling interval, and X is the space sampling interval. We may
then approximate the continuous wave equation with the following partial finite difference
equation, where we have chosen a centered difference in space, and a backward difference
in time:
where,
∆ cT
C= (1.86)
X
Here, C is the normalized wave travel speed parameter given in units of spatial samples
per time samples.
CHAPTER 1. TRAVELING WAVE WARM-UPS 23
We wish to determine how closely this difference equation will simulate the behavior of
the differential equation it approximates. There is predictably going to be numerical error
introduced simply because of the space and time sampling. But it is less obvious how this
approximation error affects the traveling-wave behavior of the system.
To begin, we take the discrete Fourier transform on the infinite spatial series of the
difference equation 1.85, mapping
∞
$
DF T IS ∆
u(n, m) ←→ uω (n) = u(n, m)e−jωm (1.87)
m=−∞
where ω is the spatial frequency variable lying in the range from −π to π, and uω (n) is a
discrete time sequence of spatial transforms, giving
, -
uω (n) − 2uω (n − 1) + uω (n − 2) = C 2 uω (n − 1) ejω − 2 + e−jω (1.88)
Gathering terms,
, -
uω (n) − 2 1 + C 2 cos ω − C 2 uω (n − 1) + uω (n − 2) = 0 (1.89)
∞
$
Z ∆
uω (n) ←→ Uω (z) = uω (n)z −n (1.90)
n=0
Z
uω (n − 1) ←→ z −1 Uω (z) + uω (−1) (1.91)
Z
uω (n − 1) ←→ z −2 Uω (z) + z −1 uω (−1) + uω (−2) (1.92)
to obtain
, -* +
Uω (z) − 2 1 + C 2 cos ω − C 2 z −1 Uω (z) + uω (−1) (1.93)
* +
+ z −2 Uω (z) + z −1 uω (−1) + uω (−2) = 0 (1.94)
CHAPTER 1. TRAVELING WAVE WARM-UPS 24
u+ω u−ω
Uω (z) = + −1 + (1.97)
1 − gω z 1 − gω− z −1
where u+ −
ω and uω are some combination of the initial condition spatial spectra uω (−1)
and uω (−2).
Noting that,
Z 1
an ←→ , (1.98)
1 − az − 1
we see the inverse Z-transform of Equation 1.97 leads to a discrete time series of spatial
spectra,
uω (n) = u+ + n − − n
ω (gω ) + uω (gω ) (1.99)
The gω± , as defined in 1.96, are now the spectral amplification factors for the finite difference
equation 1.85. First we may observe by inspection of Equation (1.96) that the magnitude
of gω± may exceed 1 for certain values of ω if C is chosen greater than 1. C greater than
1 means that a spatial sampling interval, X, and time step, T , were chosen such that
the wave speed, c, in the original partial differential equation corresponded to something
greater that one spatial sample per time step. The von Neumann numerical stability
analysis method (Strikwerda, 1989) states that if the spectral amplification factors exceed
1 in magnitude (and are not otherwise dependent on the sampling grid size), then the
difference equation can be numerically unstable. In fact, it is obvious from (1.99) that if
CHAPTER 1. TRAVELING WAVE WARM-UPS 25
the magnitudes of either gω+ or gω− are greater than 1, then as n gets large, the magnitude
of the spatial spectrum uω (n) is unbounded.
Figure 1.7 illustrates how the spectral amplification factor magnitude, |gω+ |, exceeds 1
for some spatial frequencies for wave speeds greater than 1.
|cλ| ≤ 1 (1.100)
This condition simply states that a difference scheme cannot possibly propagate waves
faster than the domain of dependence expands. Reformulating the standard finite differ-
ence equation (1.85) as an explicit computation scheme, that is, a scheme where a given
point may be computed in terms of a finite sum of points in the past,
one can see that u(n, m) is dependent on the three spatial points between u(n − 1, m − 1)
and u(n − 1, m + 1) from the previous time step; and that those points are, in turn,
dependent on the five spatial points between u(n − 2, m − 2) and u(n − 2, m + 2) at the
time step before that; and that, in general, there is a domain of dependence such that
a point N time steps in the future can only be affected by grid points not more than
N spatial steps away in either direction in the present time step (Courant et al., 1956).
Hence, a wave speed greater that one spatial step per time step forces the difference scheme
to predict the value at a point without the information it needs from outside its domain
of dependence, which leads to numerical instability.
∆
cos ω̃ = 1 + C 2 cos ω − C 2 (1.102)
= e±j ω̃ (1.106)
In the special case where C = 1, we note that ω̃ = ω and (1.99) may be written,
uω (n) = u+
ωe
−jωn
+ u−
ωe
jωn
(1.107)
We may perform an inverse discrete time spatial Fourier transform, applying the shift
theorem, to obtain a pure traveling-wave expression,
u(n, m) = u+ (m − n) + u− (m + n) (1.108)
This means that the standard second-order difference approximation of the wave equation
∆
computes an exact traveling-wave solution when C = cT /X = 1, up to the Nyquist
frequency band limit imposed by the sampling intervals. Furthermore, values at any points
in between on the time-space sampling grid may be reconstructed through band-limited
interpolation.
When C ≤ 1, there is dispersion error in the computation scheme. In general, the
higher spatial frequencies begin to travel a little slower than the lower spatial frequencies.
This may be seen through an analysis of the finite difference amplification factors.
The spectral amplification factors are
The magnitudes are evidently 1, so there is no loss in the system. However there is a
spatial phase shift of
, -
% gω± = ∓ arccos 1 + C 2 cos ω − C 2 (1.111)
This is the number of radians that a given spatial frequency, ω, will advance in phase in
one time sample. We define the frequency dependent normalized wave speed, C̃(ω), as
. /
∆ arccos 1 + C 2 cos ω − C 2
C̃(ω) = ± (1.112)
wC
Figure 1.8 illustrates the dispersion error of traveling-wave speed for finite difference
approximations for C less than 1.
CHAPTER 1. TRAVELING WAVE WARM-UPS 28
1.0
C = 1.0
C = 0.9
C = 0.8
0.9
0.8
C = 0.1
∼
C(ω)
0.7
0.6
0 π/4 π/2 3π/4 π
ω
Note that subtracting 2vm (n − 1) from both sides of the difference scheme derived in
Section 1.4.4 for the digital waveguide structure,
leads to
∂2y 2
2∂ y
= c (1.116)
∂t2 ∂x2
CHAPTER 1. TRAVELING WAVE WARM-UPS 29
∆
where the wave speed in the difference equation is C = cT /X = 1, one spatial sample per
time sample, as specified by the digital waveguide structure.
This demonstrates that the digital waveguide, which actually uses no computation to
propagate the traveling waves (aside from updating the delay line pointers), is mathemat-
ically equivalent to the optimal finite difference approximation, in the Courant-Friedrichs-
∆
Lewy sense where C = cT /X = 1, of the ideal one-dimensional wave equation. Further,
there is no numerical dispersion error, and the value at any non-integral space-time point
may be reconstructed exactly, in a band-limited sense, through proper interpolation of
time- and space-sampled digital signals. We will use a similar mathematical approach in
Chapters 3 and 4 when analyzing the validity of complex spatial geometries for higher
dimensional wave equations.
Chapter 2
The introduction of loss and stiffness into the linear string equation modifies the traveling-
wave solution in two ways: (1) loss introduces an exponential decay into the traveling waves
30
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 31
in the direction of travel; (2) stiffness introduces a frequency dependence into the wave
travel speed. As a result, waveshapes do not remain intact when they travel on a lossy stiff
string. The spectral amplification factors for a general string with frequency-dependent
loss and wave speed can be written as follows:
where the frequency-dependent wave propagation speed is C(ω) and the frequency-dependent
“time constant” of decay is τ (ω).
In the linear waveguide string model, we may gather the distributed loss over an unob-
served section of string and lump it together in a single loss filter. We can do this because
of the commutative and associative properties of linear systems (Karjalainen et al., 1993;
Smith, 1993). Similarly, wave speed dispersion may be modeled by an appropriate sum-
mary allpass filter which corrects for the compound frequency-dependent phase delay in
the same section of string (Karplus and Strong, 1983). The frequency-dependent phase
response of the allpass filter can simulate the frequency traveling-wave speed, C(ω). In
effect, the loop length of the waveguide string model will seem longer or shorter to dif-
ferent frequencies due to phase adjustment; and this is equivalent to making the various
frequencies travel faster or slower. Figure 2.1 illustrates the lumping together of loss into
a single attenuation filter, G(z), and dispersion effects into an allpass filter, H(z).
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 32
First, the extreme case of a stiff string is when it is so stiff it becomes a solid bar. The
standard equation for wave propagation in a bar is given in (Morse and Ingard, 1968),
∂ 2 y(t, x) 4
2 ∂ y(t, x)
= −a (2.2)
∂t2 ∂x4
∂ 2 (yω )
(t) = −a2 (jω)4 yω (t) (2.3)
∂t2
2 2t
yω (t) = yω+ e−jaω t + yω− ejaω (2.7)
∆ 2 ∆t
gω± (∆t) = e∓jaω (2.8)
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 33
∆ % gω± (∆t)
C(ω) = − = ∓aω (2.9)
ω∆t
where n = 1, 2, . . . are the partial frequency index numbers. Spatial frequencies associated
with the partials would be
2π nπ
ωn = = (2.11)
Tn L
∆
With C(ωn ) = aω, the allowed partial frequencies, p(n) on the bar are computed as
C(ωn ) ωn na πn2 a
p(n) = = = (2.12)
Tn 2L 2L2
Somewhere between the ideal flexible string and the ideal bar, there is the stiff string, which
has elements of both. The standard partial differential equation for wave propagation on
a stiff string (Morse and Ingard, 1968) is given as
∂2y 2
2∂ y
4
2∂ y
= c − a (2.14)
∂t2 ∂x2 ∂x4
where we summarize the stiffness term as a2 . Notice this equation just combines the
spatial derivative terms from both the flexible string and the bar equations.
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 34
∂ 2 (yω )
(t) = c2 · (jω)2 yω (t) − a2 · (jω)4 yω (t) (2.15)
∂t2
s2 Yω (s) − syω (0) − ẏω (0) = c2 · (jω)2 Yω (s) − a2 · (jω)4 Yω (s) (2.16)
∆ % gω± (∆t) # 2
C(ω) = − = c + a2 ω 2 (2.21)
ω∆t
Allowed frequencies on a rigidly terminated vibrating stiff string of length, L, and spatial-
√
frequency-dependent traveling-wave speed, C(ω) = c2 + a2 ω 2 , can be computed as fol-
lows:
Rigid terminations reflect and invert traveling waves, so round-trip traveling-wave
length of the stiff string system is 2L. Supported wave lengths, Tn , of partial frequencies
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 35
Tn = 2L/n (2.22)
2π nπ
ωn = = (2.23)
Tn L
The allowed partial frequencies, p(n) on the stiff string are computed as
1
C(ωn ) nc a2 n2 π 2
p(n) = = 1+ (2.24)
Tn 2L c2 L2
C(ωn ) nc
p(n) = = (1 + βn2 + . . .) (2.25)
Tn 2L
Compare this with the allowed frequencies for the ideal flexible string, nc/(2L). Here, β is
a small stiffness factor that stretches the distance between partials as the partial number
increases. One function corresponding to the frequency separations between the partials at
a certain partial number is the derivative of the hypothetical continuous function through
the partial frequency points,
dp(n) c cβ
= + n + ... (2.26)
dn 2L 4L
Piano strings are well-known to exhibit inharmonicity due to stiffness, especially in the
lower octaves. Figure 2.2 shows measured frequency peaks for an A0 piano string (the
lowest string on most pianos). The first 50 or so partials are shown as dots. Gaps
indicate partials were not present at a high enough amplitude for reliable measurement.
Measurements were made from sound recordings in matlab using peak tracking methods
similar to those described in (Serra, 1997). The straight line indicates the expected partial
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 36
frequencies for all partials as perfect harmonic multiples of the fundamental frequency,
27.5Hz. The bending upward of the sequence of partial frequency points on the graph
indicates that the partials are getting further and further apart. Much more detailed
analysis and re-synthesis of piano string sounds has been undertaken in (Bensa, 2000).
Figure 2.3 shows the frequency difference between adjacent partials. The data is some-
what quantized due to a peculiarity of the analysis technique; however, we can interpolate
a line through the data points and note that the rate of increase in distances between the
partials is approximately linear. This implies that the partial frequency number curve
contains something close to a square term, as expected. Appendix C explores the nature
of partial stretching in low piano strings, and describes a novel inharmonic FM-based
synthesis method, first published in (Van Duyne, 1992).
If we wish to derive a general differential equation for a an ideal lossless isotropic string
with arbitrary stiffness, or rather, arbitrary wave travel speed, it is convenient to start
in the Laplace/Fourier domain defining the spectral amplification factors. We wish the
spectral amplification factors to reflect that the medium can support 1-D traveling waves
in opposite directions which have a frequency-dependent speed of travel and which are
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 37
symmetric in their speed with respect to direction. The wave travel in this medium may
be described with a system, Yω (s), which is characterized by two conjugate poles in the
Laplace domain. The two poles correspond to the two traveling-wave directions, and their
magnitudes should be 1 corresponding to lossless wave travel, and their phases correspond
to wave speeds of the spatial frequency components.
Let us assume we have a continuous differentiable function describing the wave propa-
gation speed for each ω as C(ω). Thus we can write the spectral amplification factors for
the desired partial differential equation as
Not worrying about the initial conditions for this analysis, this corresponds to the second-
order system,
α+ α−
Yω (s) = + (2.28)
s − jωC(ω) s + jωC(ω)
A(s)
= (2.29)
s2 + ω 2 C(ω)2
Since C(ω) is an even real function with non-negative real values, we can re-write ω 2 C(w)2
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 38
∆ √
Γ(η) = ηC( η)2 (2.30)
A(s) A(s)
Yω (s) = = 2 (2.31)
s2 + ω 2 C(ω)2 s + Γ(ω 2 )
or,
s2 Yω (s) + Γ(ω 2 )Yω (s) = A(s) (2.32)
∞
$ ∆ 1 dn Γ 22
Γ(ω 2 ) = cn ω 2n , cn = 2 (2.33)
n=0
n! dη n η=0
Noting that A(s) was a first-order polynomial in s corresponding to the initial spatial
spectral conditions, we can now inverse Laplace transform to the time domain, and inverse
Fourier transform to the space dimension to obtain the general differential equation
∞
∂2y $ n ∂ (2n) y
+ (−1) cn =0 (2.36)
∂t2 n=0 ∂x(2n)
This is an equation whose solutions are a sum of spatial frequency waves which travel
in left and right directions at the same rate of speed, and at only one speed for each
spatial frequency. The wave speed dispersion comes from the even space derivatives. The
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 39
reason that there may only be even-ordered partial space derivatives is that the frequency-
dependent decay rates and wave speed functions are even with respect to positive and
negative values of ω. This means that phase of the roots of the characteristic polynomial
in 2.31 are the same for positive and negative frequencies. Hence, speed of travel and
decay rates are the same for left and right going waves.
By a fortunate coincidence, a set of cascaded first-order allpass filters will produce the
qualitatively correct kind of stiffness effects, and can be controlled by a single parameter.
We will show that the effect on inharmonicity of cascaded first-order allpasses embedded
in a feedback delay loop is qualitatively similar to the effect of real stiffness on real strings.
That is, the general way in which partials of a real stiff string stretch apart and get more
and more out of tune as one progresses up the spectrum, is qualitatively similar to the
way in which the modes of a delay line loop will stretch apart in the presence of cascaded
allpass filters.
First-order allpass filters, in their less severe ranges of operation, have long been used
for fractional tuning, as was discussed in Chapter 1. The use of allpass filtering to in-
troduce dispersion into feedback delay loops has been known for some time (Jaffe and
Smith, 1983). Stiff string sounds have been generated with excellent results, (Paladin
and Rocchesso, 1992) on the MARS workstation in real–time using a group delay based
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 40
analysis approach to the stiff string equation, and using one of the allpass filter design
methods in the literature such as that proposed by (Yegnanarayana, 1982) to find allpass
filter coefficients for a desired group delay response. However, the order of allpass filters
found by these methods can become large, requiring a fair amount of computation; and
finding the coefficients requires a sophisticated filter design algorithm.
A simplified approach to the filter design is described here, first published in (Van Duyne
and Smith, 1994). It is based on building up stiffness modeling allpass filters out of first-
order blocks. These filters are designed to be multiply–free when implemented directly in
hardware by virtue of choosing a coefficient which may be computed with a binary shift
and at most one add. Alternatively, when number of multiplies is not a concern, amount
of stiffness in a string model may be controlled in real time by a single filter coefficient.
More recently, the idea of cascaded first-order allpass to model stiffness, which is described
in the following paragraphs, has been extended in (Rauhala and Välimäki, 2006) by iden-
tifying and applying a closed-form expression to determine the filter coefficients based on
a tunable dispersion filter design method. In addition, a novel allpass design method is
described in (Abel and Smith, 2006) where, to match a given high-order group delay re-
sponse curve, the frequency axis is broken up into sections containing 2π total area under
the desired group delay curve, and a pole–zero allpass pair is assigned to each.
We first consider the the qualitative way in which partials are detuned on a stiff string. In
the ideal flexible, i. e., non-stiff, string, the modes are harmonically related. We can say,
where p(1) is the fundamental frequency of the string, n is the harmonic number, and
p(n) is the frequency of the nth harmonic. For the stiff string, however, higher spatial
frequencies travel faster than lower spatial frequencies, causing the higher partials to
become farther apart than the lower. The partial frequencies may be approximated as,
, -
p(n) ≈ n α + βn2 (2.38)
(Morse and Ingard, 1968), where β is a small inharmonicity factor, and the fundamental
frequency is p(1) = α + β. As n gets large, and higher order terms come into play,
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 41
.01
0.01
0.008
0.006
S’(p0)
.005
0.004
0.002
this approximation breaks down. From Equation (2.38), we can say that the frequency
separation between the partials, S(p0 ), at some point in the spectrum, p0 , is approximately,
∆
S(p0 ) = p(n0 + .5) − p(n0 − .5) ≈ p& (n0 ) (2.39)
∆
where p0 = p(n0 ). We defined p& (n) = dp/dn in an earlier section, however it is a function
of partial number, n. In the following analysis we will need the rate of stretching to be a
function of the partial frequency, which is a slightly warped version of this function.
The rate at which the partial frequency separation changes per unit of spectrum height,
i. e., the rate of stretching at a given spectral frequency, p0 , may be defined as the derivative
of S with respect to p0 . Using the chain rule, we have,
! "! "
& dS dS dn0 p&& (n0 )
S (p0 ) = = = & (2.40)
dp0 dn0 dp0 p (n0 )
Figure 2.4 shows a plot of the rate of stretching, S & , for a hypothetical low A0 piano string
with a reasonable inharmonicity factor of β = .001 assumed, and partial frequencies
defined as,
, -
pA0 (n) = n 27.499 + .001n2 (2.41)
If the value of S & were constant at .01, the separation between adjacent partials would
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 42
+ z−N HM
increase at the rate of 10Hz per kHz of spectrum. At the fundamental, the partials would
be about 27.5Hz apart; at 1000Hz they would be about 37.5Hz apart, and so on. Actually,
the plot shows that the rate of stretching is not flat. Rather, it ramps up from zero (rate
of zero meaning the partials are exactly harmonic), reaches a maximum, and drops slowly
as we get higher into the spectrum. It is this qualitative shape of the rate of stretching
curve which leads us to model dispersion in stiff strings with cascaded one-pole allpass
filters.
A resonant loop consisting of a length N delay line and a block of M cascaded one-pole
allpass filters is shown in Figure 2.5. The transfer function one time around the loop is,
∆
L(z) = z −N H(z)M (2.42)
∆
θ(ωT ) = % L(ejωT ) = −N ωT + M φ(ωT ) (2.43)
For frequency ωk T to be supported on this loop, θ(ωk T ) must equal −k2π, for some
positive integer k. In fact, k = 1 implies ωk T is the fundamental, k = 2 implies ωk T is the
second partial, and so forth. Figure 2.6 compares the supported modes for a loop of the
form z −(N +M ) with a loop of the form z −N H(z)M , where N = 8, M = 1, and a0 = −0.8.
The ωi T are the harmonics of the pure delay loop, and the ω̂i T are the inharmonic partials
of the delay plus allpass loop.
Comparing the ω̂i T with the ωi T , it seems clear that ω̂1 T is less than ω1 T , that the
spacing between ω̂1 T and ω̂2 T is about the same as that between ω1 T and ω2 T , and that
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 43
^ T
ω ^ T
ω ^ T
ω ^ T
ω
1 2 3 ω T 4
0 ω1T ω2T 3 ω4T
π
0
−2π
θ(ωΤ)
−4π
−6π
−8π
the spacing between ω̂2 T and ω̂3 T is greater than that between ω2 T and ω3 T . This means
that the ω̂i T are stretching partials. In general, the choice of a0 negative will produce
a stretching in the resonant modes of the loop. The more negative it is, the more the
stretching will be, at least in the lower frequency range.
We can make a qualitative comparison between the kind of stretching in the delay line
loop with that found in stiff strings by computing a rate of stretching function for the
digital loop. We derive Sθ (ωk T ) = −2π/θ & (ωk T ) to be the separation between partials on
the loop at a particular point in the normalized frequency spectrum, ωk T , where ωk is
the kth partial frequency in radians per second. The rate of partial stretching per unit of
spectrum on the digital loop is the derivative of Sθ with respect to ωk T ,
θ && (ωk T )
Sθ & (ωk T ) = −2π (2.44)
θ & (ωk T )2
Figure 2.7 shows a plot of Sθ & for the delay line loop system shown in Figure 2.5
with delay line length,N = 8, number of first-order allpass filters, M = 1, and allpass
coefficient, a0 = −0.25. Comparing the physical rate of stretching, S & , in Figure 2.4 with
the digital loop rate of stretching, Sθ & , one can see a qualitative correspondence: each plot
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 44
.04
0.04
0.03
Sθ’(ωkT)
.02
0.02
0.01
ramps up from zero, reaches a maximum, then falls off. If we choose N , M , and a0 well,
we can approximate partials of a real stiff string.
If we desire to express the general differential equation for a an ideal isotropic string with
arbitrary stiffness and loss, it is convenient to start in the Laplace/Fourier domain defining
the spectral amplification factors. We wish the spectral amplification factors to reflect the
idea that the medium can support 1-D traveling waves in opposite directions which have
a frequency-dependent decay time and a frequency-dependent speed of travel, and which
are symmetric in their speed and decay rates with respect to directions. The wave travel
in this medium may be described with a system, Yω (s), which is characterized by two
damped conjugate poles in the Laplace domain. The two poles correspond to the two
traveling-wave directions, and their magnitudes and phases correspond to the decay rates
and wave speeds of the spatial frequency components.
Let us assume we have continuous differentiable functions describing the time constants
of decay for each ω as τ (ω) and the wave propagation speed for each ω as C(ω). Thus we
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 45
can write the spectral amplification factors for the desired partial differential equation as
Not worrying about the initial conditions for this analysis, this corresponds to the two
pole system,
α+ α−
Yω (s) = * ++ * + (2.46)
−1 −1
s− τ (ω) − jωC(ω) s− τ (ω) + jωC(ω)
A(s)
= * + * + (2.47)
2 1
s2 + τ (ω) s+ τ (ω)2 + ω 2 C(ω)2
Since C(ω) and τ (ω) are even functions with non-negative real values, we can define
∆ √
B(η) = 2/τ ( η) (2.48)
∆ √ √
Γ(η) = 1/τ ( η)2 + ηC( η)2 (2.49)
A(s)
Yω (s) = (2.50)
s2 + B(ω 2 )s + Γ(ω 2 )
or,
s2 Yω (s) + B(ω 2 )sYω (s) + Γ(ω 2 )Yω (s) = A(s) (2.51)
∞
$ ∆ 1 dn B 22
B(ω 2 ) = bn ω 2n , bn = 2 (2.52)
n=0
n! dη n η=0
∞
$ ∆ 1 dn Γ 22
Γ(ω 2 ) = cn ω 2n , cn = 2 (2.53)
n=0
n! dη n η=0
We can re-write B(ω 2 ) and Γ(ω 2 ) as sums of powers of (jω)2 noting that
Noting that A(s) was a first-order polynomial in s corresponding to the initial spatial
spectral conditions, we can now inverse Laplace transform to the time domain, and inverse
Fourier transform to the space dimension to obtain the general differential equation
∞ ∞
∂2y $ n ∂ (2n+1) y $ n ∂ (2n) y
+ (−1) b n + (−1) cn =0 (2.56)
∂t2 n=0 ∂t∂x(2n) n=0 ∂x(2n)
This is an equation whose solutions are a sum of spatial frequency waves which travel
in left and right directions at the same rate of speed, and at only one speed for each
spatial frequency. The wave speed dispersion comes from the even space derivatives, and
the damping comes from the mixed first time derivative and even-ordered space deriva-
tives. The reason that there may only be even-ordered partial space derivatives is that
the frequency-dependent decay rates and wave speed functions are even with respect to
positive and negative values of ω. This means that phase and damping of the roots of
the characteristic polynomial in Equation (2.50) are the same for positive and negative
frequencies. Hence, speed of travel and decay rates are the same for left and right going
waves.
It is also essential the there are no higher-order derivatives of s, since, for example, if
a third-order time derivative were present, resulting in an s3 term in the denominator of
Equation (2.50), then we would have three roots, one of which must be real and, therefore,
non-traveling. If there were a fourth-order time derivative in the wave equation (2.56),
there would be an s4 term in (2.50) resulting in possibly two pairs of conjugate roots,
corresponding to potentially two sets of traveling waves at the same spatial frequency but
traveling at different speeds.
The differential equation (2.56) is the “anatomically correct” class of wave equations
we can model with bidirectional delay lines and allpass filters and low pass filters to model
stiffness and loss.
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 47
In an earlier section, we presented the stiff string equation taken from (Morse and Ingard,
1968). It contained second and fourth order spatial derivatives. This is consistent with
our general wave equation (2.56).
However, the lossy string equation provided in (Morse and Ingard, 1968) is puzzling
at first:
∂2y ∂2y ∂y
- 2
= T 2 − R(ω) (2.57)
∂t ∂x ∂t
- is density per unit length, T is tension, and R(ω) represents the effective frictional
resistance per unit length.
What does it mean to have R(ω) a function in the frequency domain, mixed into the
partial differential equation in x and y?
In fact, we need to view R(ω) as a differential operator on the first partial time deriva-
tive, rather than a function of ω multiplied pointwise by the first time derivative. Thus,
5 6 ∞
∂y ∂y ∆ $ ∂ (2n+1) y
R(ω) −→ Rω =- (−1)n bn (2.58)
∂x ∂x n=0
∂t∂x(2n)
In other words, Morse’s R(ω) frictional resistance term has to be incorporated into the
equation in the frequency domain, and then expanded back out to the time domain.
Another minor detail to keep in mind is that the loss profile impacts the coefficients on
the stiffness-related partial derivatives as well, as we saw above.
Till now we have assumed that the decay rate and wave speed functions have been ideal
continuous differentiable functions. In practice, we may be able to measure actual data
points for decay rate and wave speed at a certain spatial frequency, deduced from string
length, pitch of the vibrating string’s partial frequency, and measured rate of decay in
audio amplitude.
Hence, if we actually know only τ (ωk ) and C(ωk ) for several data points, ωk for k =
1, 2, 3, . . ., then we can compute B(ωk2 ) and Γ(ωk2 ) from Equations (2.48) and (2.49) and
then fit a kth order polynomial through the points, reducing the infinite series of high even
order spatial derivative terms in Equation (2.56) to a finite set of high-order terms.
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 48
∆
R(s) = F (s)/V (s) (2.59)
where F and V are the Laplace transforms of force and velocity, respectively, R(s) is the
impedance ratio, and s is the Laplace frequency variable. Replacing s with jω gives the
frequency response of the system. The magnitude part of R(jω) tells us the magnitude
ratio between force and velocity at some particular frequency ω, and the phase part tells
us the phase difference between force and velocity oscillations at that frequency. For
example, an oscillating mass and spring system will have a zero impedance when driven at
the mass end at its resonant frequency, as it is very content to oscillate at that frequency.
When driven at other frequencies, it has a non-zero impedance. On the other hand, a
purely damped, non-reactive linear system, such as a dashpot or an electrical resistor,
has a constant real impedance (Cruz and Van Valkenburg, 1974), which means force is
in phase with velocity (or voltage is in phase with current) and there is no frequency
dependence on the ratio of force and velocity magnitudes.
A variety of physical variables of the string may be expressed as the sum of traveling
waves in addition to displacement. We will be particularly interested in force and velocity
waves. Transverse velocity waves may be defined by taking the partial derivative of (1.4)
with respect to time.
∆ ∂y ∆
v(t, x) = = −cẏ + (x − ct) + cẏ − (x + ct) = v + + v − , (2.60)
∂t
Wave Impedance R0
fr
fl
k
∆ ∂y ∆
f (t, x) = −K = −K ẏ + (x − ct) − K ẏ − (x + ct) = f + + f − (2.61)
∂x
Combining (2.60) and (2.61), we find a wave impedance relationship between the
traveling components of force and velocity in the string which can be written,
∆ √
where the wave impedance is defined as R0 = K/c = K-. This relationship corresponds
to the wave impedance relation between pressure and flow in acoustic tubes, or between
voltage and current in electrical transmission lines (Magnusson, 1970).
When a string is terminated perfectly rigidly, traveling waves reflect off the termination
and head back the other way without modification, with the exception of possible sign
inversion: velocity and displacement waves reflect with sign inversion, while force waves
reflect without sign inversion. However, there are many ways to terminate a string. Fig-
ure 2.8 shows, for example, the ideal case of a string terminated by a pure lossless spring.
The more likely case in the real world is that a string is terminated at some nearly rigid
bridge which has some resistive damping, some springiness and some mass. The result is
that a given sinusoidal component of a traveling wave is reflected off the yielding termi-
nation with some damping and some phase modification. It is useful to formulate lumped
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 50
systems such as a simple linear string termination in terms of their driving point im-
pedance. Impedance is the complex ratio of force and velocity in the Laplace transform
frequency domain. At the string termination, we have,
∆ F (s)
Rb (s) = , (2.63)
V (s)
where Rb (s) is the driving point impedance function of the string termination (“b” for
“bridge”), and F and V are the Laplace transforms of driving point force and velocity.
For example in the spring termination shown in Figure 2.8, Rb (s) = k/s, where k is the
spring stiffness constant, and s is the Laplace frequency variable.
Using definitions of force and velocity waves on the string, (2.60) and (2.61), and the
wave impedance relation, (2.62), we may derive a force wave transfer function at the string
termination:
To move from the continuous physical system to the discrete digital filter, we use the
conformal bilinear transform from the s-plane to the z-plane,
1 − z −1
s←α (2.67)
1 + z −1
The bilinear transform maps DC in the continuous system to DC in the digital system,
while mapping infinite frequency in the continuous system to half the sampling rate, or
the Nyquist frequency, in the digital system (Nehari, 1952). The parameter α is a degree
of freedom which may be used to control the frequency warping. It is usual to choose
α = 2/T to obtain faithful frequency response at the low end of the frequency range.
We apply the bilinear transform to Equation (2.66) to obtain,
R0
m3
R0
k3
. k5
R0 m1 m4
m2
R0
k1
. k2
k4
k6
M=2 M=4
M=3
M=1
Figure 2.9: Mass/Spring Chain String Terminations
a0 + z −1 k − αR0
Hb (z) = and a0 = (2.69)
1 + a0 z −1 k + αR0
In Section 2.3, we introduced cascaded allpass filters into the delay line loop to create
the effects of stiffness in the medium, which results in higher spatial frequencies traveling
at slightly higher speeds. It is of some interest to “reverse engineer” the process, to find
out what equivalent lumped impedance termination fo the string would produce a similar
impact on an ideal flexible string.
A delay line loop with a one–pole allpass filter in it may be interpreted as an ideal
string terminated with an ideal spring, as is shown in Figure 2.9 for the M = 1 case. The
loop computes traveling force waves, where the allpass filter is a transfer function from the
right–going force wave, F + , to the left–going force wave, F − , at the spring termination.
∆
Given an arbitrary termination impedance, F (s)/V (s) = R(s), the force wave transfer
function is,
F− R(s) − R0
+
= (2.70)
F R(s) + R0
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 52
where R0 is the wave impedance of the string, which is the geometric mean of its ten-
sion and mass density. When two transfer functions corresponding to two termination
impedances, R1 (s) and R2 (s), are cascaded in the loop, we find,
! "! "
F− R1 (s) − R0 R2 (s) − R0 R̃(s) − R0
= = (2.71)
F+ R1 (s) + R0 R2 (s) + R0 R̃(s) + R0
where,
F R1 (s)R2 (s) + R0 2
= R̃(s) = (2.72)
V R1 (s) + R2 (s)
Hence, comparing Equations (2.70) and (2.72), we see that the physical termination im-
pedance actually modeled by the two cascaded wave transfer functions is R̃(s).
We learned in an earlier section that the wave transfer function for a spring termination
corresponded to a first-order allpass function. If we then cascade two equal allpass func-
tions, corresponding to wave transfer functions in the Laplace domain, R1 (s) = R2 (s) =
k/s, we can compute the implied termination impedance as
(k/s)2 + R0 2 k/2 R0
R̃(s) = = + s (2.73)
2(k/s) s 2k
This is just a mass-spring system, where the spring stiffness coefficient is k/2 and the mass
is m = R0 /2k.
Using a similar analysis procedure, we may derive the physical string termination
impedances for the cascaded digital allpass filters, H M , described earlier.
H 1 ⇐⇒ k1 /s (2.74)
H 2 ⇐⇒ m1 s + k2 /s (2.75)
H 3 ⇐⇒ (k3 /s).(m2 s + k4 /s) (2.76)
H 4 ⇐⇒ m3 s + ((k5 /s).(m4 s + k6 /s)) (2.77)
∆
where a.b = ab/(a + b) is a parallel connection of two elements, and all the spring stiffness
constants, ki , and masses, mi , are dependent on k1 and the string wave impedance, R0 .
The physical meanings of these termination impedances are illustrated in Figure 2.9.
We conclude that a delay loop with cascaded one–pole allpass filters corresponds to a
distributed transmission line string model extended by a non-uniform lumped transmission
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 53
z-N/2 H G
T1 T2
G H z-N/2
Figure 2.10: Waveguide String Loop Model Including Loss, Dispersion, and Yielding Ter-
minations
The lossy, stiff string may be modeled as a digital waveguide with termination filters,
internal string loss filters and allpass filters modeling dispersion as shown in Figure 2.10.
In the Figure, z −N/2 represents the basic delay time in in samples for a wave to travel from
one end of the string to the other; H represents the allpass modification to this length
correcting for dispersion in wave speed due to stiffness; G is a low pass filter representing
total energy loss in the traveling wave as it goes from one end of the string to the other; and
T1 and T2 represent digital wave transfer functions corresponding to yielding terminations.
These termination filters may contain a loss part due to damping and a phase modifying
part due to the reactive elements such as springiness in the terminations.
To understand the simplified model, note that a traveling wave, as it makes its way
one complete cycle around the loop in Figure 2.10 sees a total closed loop transfer function
of,
Ltotal (z) = z −N/2 H(z)G(z)T1 (z)z −N/2 H(z)G(z)T2 (z) (2.78)
This may be commuted and refactored into a delay part, a loss part represented by a
lowpass filter, LP (z) and a phase dispersion part represented by an allpass filter, AP (z).
z-N
LP(z) AP(z)
This simplified formulation is shown in Figure 2.11. The problem of model calibration is
now reduced to choosing a delay length, N , and coefficients for the allpass filter AP (z)
to tune the string partials, and designing a lowpass filter, LP (z), which gives the correct
overall exponential decay rates of each partial per loop period.
The actual per period rate of attenuation of this simple string model is determined by
the magnitude response of of the low pass filter in the delay loop. The more severe the
roll-off of the filter over the frequency spectrum, the faster the high frequencies in the
loop will decay compared with the low frequencies. Calibration schemes for the delay line
loop models of strings are generally based on measuring the decay rates of the individual
partials of a real string, and then fitting a filter magnitude response curve through those
data points.
One approach to calibrating a physics based digital waveguide model is to make the
appropriate physical measurements of material properties of the string, namely string ten-
sion and mass density per unit length; to estimate loss from viscous drag in the air we must
know the diameter; to estimate internal damping we must determine the complex Young’s
modulus of the string material; to estimate the wave speed dispersion in a stiff string, we
must determine in addition the radius of gyration which is dependent on the strain in the
string material as it is distributed over the cross-sectional area of the string. To estimate
the termination transfer functions, we must first come up with an impedance function for
the terminations, which may be done either by imagining a lumped system mechanism for
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 55
the termination behavior and computing parameters from information about the materi-
als somehow, or by collecting force response data from measurements taken directly from
the instrumented terminations, and then performing system identification on the data to
obtain a lumped impedance model which can then be mapped to the digital domain and
converted into wave transfer functions.
This is too hard, and fraught with opportunity for error. For our modeling purposes,
we ultimately only care about what it sounds like, so we can use a simpler more direct
calibration approach. The goal of this present work is, not so much to study the details
of the physics of musical instruments, but instead to develop an efficient audio synthesis
model which produces sounds which are psychoacoustically indistinguishable from the real
thing. To this end, a simplified model is proposed which may be directly calibrated from
recorded sound data, without concern about where exactly the system loss and dispersion
is coming from, only what the net effect of all the physical considerations is.
Presentation of techniques and theory for this system identification problem can be
found here and there in the literature. System identification techniques applied to the
bowed string are found in (Smith, 1983). Methods for loop estimation in plucked string
and guitar sounds are described in (Karjalainen et al., 1993). Calibration of the coupling
filter in coupled piano strings is addressed in (Van Duyne and Smith, 1995b). A calibration
method for stiffness in strings is published in (Van Duyne and Smith, 1994). A method to
calculate the coupling filter from measured decay rates for a wave-decomposed coupled os-
cillator system is described in (Van Duyne, 1997). Some clues to the inner workings of the
Korg OASYS synthesizer calibration methods were brought to light during presentation
of (Leary, 1996) and Staccato Systems revealed some of their physical model calibration
techniques while demonstrating (Porcaro et al., 1996).
For our modeling purposes, we require the exact frequencies of the resonant modes on the
string to design the delay loop length and the allpass filter coefficients; and we require the
exponential decay rates of each of the partials in order to design the lowpass loop gain
filter. We can obtain data in this form from a recorded string sound using short time
Fourier analysis and a peak tracking algorithm. Essentially, we may take a representative
clip of the recorded string sound and break it up into sequential time frames separated by
M seconds. We may then perform a peak extraction procedure to identify the frequency
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 56
and magnitude of the partials present in each frame. In general, for a simple linear string
we should expect the partial frequencies in each frame to be the same, or very close.
These partial frequencies may be called, p(n), where n is the partial number, p(1) being
the fundamental frequency, p(2) being the first overtone, i. e., second partial, and so on.
Further, we may track the magnitude evolution of these partial frequencies across
the frames in order to obtain amplitude trajectory envelopes for each of the partials, in
the form An (mM ), where n refers to the nth partial frequency, m is the mth analysis
frame index, mM is the time index of the mth frame in seconds, and An (mM ) is the
measured amplitude of the nth partial at time mM . In this way, we obtain a set of partial
frequencies on the string, p(n) and their amplitude decay trajectories over time, An (mM ).
Fundamental work in this field is reported in (Serra, 1997).
We can fully identify the salient audible parameters needed for calibrating a simple
stiff string model, without resorting to any physical measurements, or calculations.
As noted earlier, new methods of modeling and calibrating dispersion in piano strings have
been described in (Bensa, 2000; Rauhala and Välimäki, 2006; Abel and Smith, 2006). We
turn now to the present task of parameterizing the cascaded allpass model of string stiffness
presented in Section 2.3. To design a resonant loop of the form z −N H M , we must find a
good a0 , M , and N . We present two parameter optimizing methods.
This first method is appropriate for implementation in hardware where multiply operations
are costly to implement in silicon. We reduce the field of search by requiring that the
filter coefficient, a0 , be a power of 2, or 1 minus a power of 2, so that the multiply
may be implemented efficiently in hardware as a binary shift plus at most one addition.
Coefficients closer to zero provide the most even stretching of partials, but the number
of allpasses needed will be greater; whereas, coefficients closer to −1 will necessitate less
filters in the loop, but the effect will be biased in favor of stretching at the lower frequencies.
We can eliminate N as a variable by requiring that one of the partial frequencies on the
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 57
nθ(n) - n
1
0.75
0.5
M=0
0.25
M=1
M=2
5 10 15 20
M=3
-0.25
M=4
-0.5
M=5
-0.75
-1
n
Figure 2.12: First Allpass Parameterization Optimization Method
loop be held constant. The necessary value for N may be computed as,
2πn0 + M φ(2πp(n0 )T )
N= (2.80)
2πp(n0 )T
Choosing n0 = 1 holds the fundamental fixed. In the case of missing data, or in the case
of very low piano strings, where the perceived pitch is more a function of the partials an
octave or two above the fundamental, it may be desirable to hold some other partial fixed.
Assume that we have a set of partial frequency measurements, pi = p(ni ), for a set of
partial indices, ni . Given a0 , we can compute the apparent partial number, nθ (ni ), on the
delay line loop for each of the measured partial frequencies, p(ni ),
and compare it to the actual partial number for that frequency, ni . If the digital loop is a
perfect match for the data, then nθ (ni ) will equal ni . If not, we can nonetheless minimize
a least sum of squares error function,
$
ε(M ) = (nθ (ni ) − ni )2 (2.82)
i
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 58
choices of N (delay line length), when, for each N we choose a corresponding a0 which
fixes some desired partial (usually the fundamental) to be exactly in tune. We can then
obtain a least squares error function dependent on N instead of M , where nθ is dependent
on a0 which depends on N :
$
ε(N ) = (nθ (ni ) − ni )2 (2.83)
i
Given a constant M , and a choice of N , the correct a0 which holds the kth partial fixed
in tune on the loop is:
where,
∆ N 2πp(n0 )T − k2π
κ = tan (2.85)
M
A practical approach in determining the best value of N, delay line length, is to choose a
first guess as
This is the natural delay line length, assuming M allpass filters, each representing a
delay of at least 1 sample. For this value of n, find the best a0 . Then decrement N and
iterate. Stop decrementing N when the sum of squares partial frequency match up error
is at a minimum.
A similar algorithm can be used to sort through non-integer values of N inserting an
allpass fractional delay interpolator into the loop.
Recall, An (tm ) represents the amplitude of the nth partial at time tm , as analyzed from
recorded data. Define
An (tm )
Ãn (tm ) = (2.87)
An (0)
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 60
where tm = mM is the time in seconds of the mth data frame, and Ãn (tm ) is the amplitude
trajectory of the nth partial, normalized so that Ãn (0) = 1. Since we are assuming a linear
system, we expect an exponential decay of the form,
where rn is some decay rate for the nth partial between 0 and 1. Taking the natural log
of both sides, we see that,
log Ãn (tm ) ≈ −rn tm (2.89)
This reduces, therefore, to the task of fitting the log scale amplitude data to a straight line
of some slope, −rn . To find an rn for the measured data, we may use an error criterion
based on the sum of squared differences,
$, -2
ε(rn ) = log Ãn (tm ) + rn tm (2.90)
m
Minimizing this error function over rn , we obtain a decay rate for the nth partial.
In designing the loop loss filter, LP (z), we desire that this filter provide sufficient
frequency-dependent loss to account for the attenuation through one full cycle of the
string loop. Since the essential loop time is N samples, or, N T seconds, where T is the
digital sampling interval, and since the attenuation of the nth partial in N T seconds is
e−rn N T , we may design LP (z) by fitting it to a magnitude spectrum based on the loop
attenuation of the partials,
|LP (ej2πp(n)T )| = e−rn N T (2.91)
As an example, Figure 2.14 shows (above) measured decay rates of a piano note C5
(one octave above middle-C). The lower plot shows the decay rates in units of dB per
string loop period. To model this string, we need to design a loop loss filter which has
this dB magnitude response.
Fitting the data in the log domain is psychoacoustically sensible in view of the ear’s
quasi-logarithmic perception of loudness,
Many design algorithms are more effective if they have a magnitude as well as a phase to
design to. Mathwork’s matlab invfreqz iteratively finds a discrete-time transfer function
that corresponds to a given complex frequency response (Smith and Little, 1994). From
a filter design perspective, invfreqz can be used to convert magnitude and phase data into
transfer functions. The invfreqz algorithm is based on (Levi, 1959).
The desired magnitude spectrum is known, but the natural phase response is unknown
and not really important. The author has found that a practical approach is to set the
phase initially to 0 everywhere, then to take the phase of the transfer function the invfreqz
finds and to replace the phase of the desired magnitude with this new phase; then, iterate
the process. In this way, the natural phase of the desired magnitude response gets closer
and closer to optimum, and the fits provided by invfreqz improve iteratively as the complex
response gets easier for the algorithm to fit. Another natural approach, which may reduce
the number of iterations required to converge to a result, is to compute the minimum-phase
response for the given magnitude response and use that as the starting phase response.
In tuning the delay line length for pitch and stiffness, it was correct to use phase delay
to compute the allowed frequencies in the loop. However, when computing the desired
loop loss filter, while in the presence of significant stiffness effects from cascaded allpass
filters, using phase delay may not be sufficiently accurate. The author has found that
group delay is the correct phase measure to use when computing the decay rates from the
measured data. While the tuning of resonant frequencies in a loop is dependent on exact
multiples of 2π in phase delay through the loop, the decay rates of the modes only depend
on the actual time it takes for the modal frequency band to travel one cycle through the
loop. Hence, the decay rate per period for each measured modal frequency must take into
account a group delay correction associated with the bank of M allpass cascaded allpass
filters before a summary loop loss filter is designed.
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 63
Figure 2.15: Modes of Two Identical Strings Coupled Together by a Bridge: Reactive
Coupling (left graph) and Resistive Coupling (right graph). Adapted from (Fletcher and
Rossing, 1991).
Figure 2.15 compares the behavior of modes of identical strings coupled at a purely re-
active (e.g., springy) bridge and a purely resistive bridge. The parameters ω1 and ω2 are
the unperturbed frequencies of the string modes; Ω+ and Ω− are the frequencies of the
combined coupled system. The solid crisscross lines, one horizontal, one at 45◦ , represent
the string frequencies without coupling. In the left-hand graph, the modes of the system
coupled at a reactive bridge repel each other, as shown by the thinner solid lines. In the
right-hand graph, the modes of the system coupled at a resistive bridge are drawn together
and become the same frequency when the unperturbed mode frequencies are close enough,
as shown by the thinner solid lines. These modes, although they are drawn together to
the same frequency in the resistive bridge case, may develop different exponential decay
rates, creating the effect of two-stage decay.
A very important quality to the piano sound is the characteristic two-stage decay rate.
The first portion of the note decays quickly corresponding to energy being lost into the
soundboard, and subsequently into the air, giving the piano tone loudness. Then as the
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 64
-20
-30
-40
seconds
0.5 1 1.5 2 2.5 3 3.5
Figure 2.16: Decay Trajectories Measured on Piano G4 Tone: Single String vs. Three
String
multiple strings get out of phase, energy is lost into the air more slowly giving the tone
persistence. Behavior of coupled piano strings has been studied in detail in (Weinreich,
1977). The nearly tuned resonating modes typically relocate themselves from two or more
detuned pitches at the same decay rate, into essentially one pitch, with two decay rates.
Excellent insight into this pole migration using root-locus analysis techniques is given in
(Stilson, 1997; Stilson, 2006). The solid line in Figure 2.16 shows the measured amplitude
decay of a G4 piano tone (G above middle-C) when all three strings are struck and decay
together. Note the first-stage decay where the amplitude drops at the rate of 22 dB per
second in the first second, followed by a second-stage decay where the amplitude only drops
1 or 2 dB over the next second. The dashed line is an instrumented measurement where
two of the strings were stopped with a rubber wedge. Note that the decay rate during the
first 2.5 seconds appears to be single stage, are a rate of approximately 13 dB per second.
The musical benefit of two-stage decay is that the impression of a louder attack sound
can be generated with the initial excitation peak. This delivers a lot of energy into the
soundboard (hence loss in the string) in the first stage, then a longer sustained sound is
provided during the second stage (Martin, 1947; Schuck and Young, 1943).
Using the method of coupled string synthesis as described in (Smith, 1993), we may
model the several strings of a piano note coupled at some bridge impedance. Details of
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 65
the piano string model are addressed in a later section. If these multiple strings are tuned
exactly equal in our synthesis model, no two-stage decay occurs (see the dashed line in
Figure 2.17). If these strings are tuned to pitches more that 1 or 2 Hz apart, they sound
simply out of tune and decay separately (not shown). In order to obtain two-stage decay
rate in the piano model output, one must set the tuning of the coupled waveguide strings
to some small fraction of a Hz apart (Kirk, 1959). For example, to properly tune the two-
stage decay in a middle C string, one might most simply couple 3 (or 2) waveguide loops
at a loaded scattering junction and tune one loop 0.4 Hz different than the second loop
(shown are the solid line in Figure 2.17). This synthesized piano model was implemented
in a synthesis modeling tool called SynthBuilder (Porcaro et al., 1998).
To obtain fractional Hz tunings like this, one may use the allpass interpolation method
described earlier and in (Jaffe and Smith, 1983). A linear interpolation method will
probably introduce too much unwanted loss in the string loops. But the allpass method
is very easy to control and very slight pitch modifications are possible.
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 66
v1+ v2+ R0
R0 v1- v2-
Rb
Una Corda
If using the coupled string method described herein below, then the proper excitation
method is to drive all waveguide string loops which are coupled with the hammer excitation
equally. This models the hammer hitting all three (or two) strings simultaneously. On
the piano there is a middle pedal, or una corda pedal, which traditionally is thought to
make the piano tone softer. In reality, on grand pianos it slides the hammers a little to
one side so that only 1 of the 2 or 3 strings is struck, while the remaining string or strings
for each note is not struck. The effect of this is not so much to make the sound softer,
but to introduce the second stage of two-stage decay right at the beginning. This happens
since, through coupling, the strings almost instantly enter into an out of phase mode of
oscillation.
In order to model this effect, one may simply load the excitation signal into only one
string loop of a two strings-coupled model, while leaving the second string loop to take its
energy entirely through the coupling filter, and not through a direct hammer excitation.
This results in the desired simple “second” stage decay occurring right away.
The loaded scattering junction math is derived in (Smith, 1993) and we review it here.
Refer to Figure 2.18 to see the identified forces and velocities in a coupled strings system.
First we decompose the transverse force and velocity at the junction between the strings
into traveling waves on the string:
∆
Fi = Fi+ + Fi− (2.93)
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 67
∆
Vi = Vi+ + Vi− (2.94)
The strings are joined at a series junction so that all the velocities are all equal at the
junction:
∆
V1 = V2 = · · · = V N = VJ (2.97)
The force on the bridge is the sum of all the component string forces:
$
FJ = Fi (2.98)
$, -
= Fi+ + Fi− (2.99)
$, -
= R0 Vi+ − R0 Vi− (2.100)
$* +
= R0 Vi+ − R0 (VJ − Vi+ ) (2.101)
$
= −N R0 VJ + 2 R0 Vi+ (2.102)
∆
Using the bridge impedance relation, FJ = Rb VJ , we may solve for VJ in terms of the
input velocity waves, Vi+ :
7 7
2 R0 Vi+ 2 Vi+
VJ = = (2.103)
N R 0 + Rb N + Rb /R0
We can now integrate this scattering model into a full model of piano strings.
Figure 2.19 illustrates a coupled piano string model for one note of the piano. The coupling
filter represents the loss at the yielding bridge termination, and controls the coupling of
energy between and among the three strings. Each of the three string loops shown contains
two delay elements, the first corresponding to the delay path from the hammer strike point
to the agraffe and back, the second corresponding to the delay path from the hammer strike
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 68
E3
Stiffness Tuning
Delay + Filters Filter
Delay
– C3 *
+
E2
Stiffness Tuning
Delay + Filters Filter
Delay
– C2 *
+
E1
Stiffness Tuning
Delay + Filters Filter
Delay
– C1 *
+
+
Coupling
Filter
Output
point to the bridge and back. The relative delay length ratio for most strings is about
1 to 8, although the relative delay lengths may be set to model any particular piano
string strike position. The input signals E1 , E2 , and E3 are taken from the output of the
hammer filter, which has been driven, in turn, by a soundboard impulse response, or a
nonlinearly filtered noise excitation synthesis. Note that the input signals are introduced
into the string loops at two points, in positive and negative form: this models the spectral
combing effect of the relative strike position of the hammer on the string.
The signals C1 , C2 , and C3 should be set to 1.0 during the sustain portion of the piano
sound, and should be ramped to some appropriate loop attenuation factor, such as .95, at
key release time. Alternatively, some more elaborate release sound model might be used.
Note that, for una corda pedal effects, one or more of the signals E1 , E2 , or E3 , should
be set to zero at key strike time. This causes the coupled string system to move quickly
into its second-stage decay rate, just as is found in real piano sounds when the una corda
pedal is depressed.
In this coupled string model, the delay lengths are fine-tuned such that the effective
pitch of each of the three string loops is very nearly equal, but not exactly equal. This is
the mechanism by which two-stage decay is synthesized in the commuted piano synthesis
model. The stiffness filters, as shown in Figure 2.19, are intended to be an allpass filter
structure which modifies the phase response of the loop so as to create the effect of the
natural inharmonicity of the piano string partials. We recommend a bank of one-pole
allpass filters as described earlier in this chapter and in (Van Duyne and Smith, 1994).
Ideally, from a physical perspective, we would like to measure empirically the bridge
impedance, Rb , and the string impedance, R0 ; and then from these measurements compute
the desired coupling filter. However, following the spirit of the simplified string loop model
presented above, let us say we have already calibrated a single string system and know
LP (z), a lowpass filter modeling the per period attenuation of the tone, and AP (z), an
allpass filter summarizing the dispersion in the string due to stiffness. We have presumably
done this by measuring the partial frequencies and corresponding decay rates of a single
piano string. This may be accomplished by physically damping two of the three piano
strings in a piano note group with felt, rubber, or some such means, and then recording the
sound of the remaining undamped string decaying after it is struck. The decay rate of this
single string should not contain very much two-stage decay interference (Weinreich, 1977)
from the other damped strings, but should, instead, produce a reasonable single stage
decay from which data about the partial frequencies and their individual decay rates may
be extracted.
Loss in a string-bridge system comes almost entirely from the yielding bridge termi-
nation itself. That is, the loss from viscous air drag and internal friction is very small
compared to termination loss. Therefore, let us simply say that LP (z) ≈ Tf (z) is the force
wave transfer function at the bridge, that the string is rigidly terminated at the other end
so that the force wave transfer function there is unity, and that the dispersion, AP (z), is
entirely due to stiffness in the string, and not due to any significant reactive qualities in
the bridge. We may therefore write,
∆ Rb − R0
LP = Tf = (2.104)
Rb + R0
∆ 2 2 2(1 − LP ) N =3 1 − LP
Hb = = = −→ (2.106)
N + Rb /R0 1 + LP (1 + N ) + (1 − N )LP 2 − LP
N+
1 − LP
In summary of this calibration approach, we have measured the sound of a single string
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 71
decaying, derived the loop loss filter from this data, then re-interpreted this to be the force
wave transfer function at the bridge (assuming that almost all of the loss is due to the
yielding bridge); from this point, we derive the bridge impedance and thence the N-string
coupling filter.
In the model shown in Figure 2.19, we have three strings coupled, N = 3. However,
several minus signs have been commuted around in that figure and the Coupling Filter
is actually represented by −Hb . To complete the model, the Tuning Filters should be
tweaked by a good piano tuner to achieve a fine, full-bodied two-stage decay rate (around
0.4–1.7 Hz detuning between strings) (Kirk, 1959).
A much more convenient approach is to deduce the coupling filter directly from a recording
of the piano in its normal mode of operation. We will derive a method to compute the
coupling filter from recorded data from the first-stage decay of the target piano string.
For the purpose of working through the math, let’s assume there is known single-string
decay data summarized in a loop filter, LP (z). Then, per the results of the last section,
this corresponds to a three-strings-coupled coupling filter of
1 − LP
Hb = (2.107)
2 − LP
This again is assuming all the loss is at the bridge, and we then deduce the bridge im-
pedance and compute the coupling filter according to the scattering junction equations.
Now, hypothesize that all three coupled strings start off in phase after struck, and say
they are all identical loops exactly in tune, then, referring to Figure 2.19, we can fold the
three strings loops on top of themselves and reduce the system to a single loop with the
coupling filter operating on 3 times the input,
! "
1 − LP
(3) (2.108)
2 − LP
and the signal fed back into each loop being expressible as the coupling filter minus the
(single) input signal ! "
1 − LP 2LP − 1
(3) −1= (2.109)
2 − LP 2 − LP
This means that if we have measured data for single-string decay rates per period, LP ,
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 72
∆
we can deduce the first-stage triple-string decay rates as LP3 = (2LP − 1)/(2 − LP ). By
inverting this expression, solving for the single-string decay rate, LP , we can the compute
the single-string decay rates form measured three-string decay rates as
2LP3 + 1
LP = (2.110)
2 + LP3
By way of empirical verification, Figure 2.20, shows measured and computed decay rates
of partial frequencies from a real G4 piano tone. The two solid lines running through
x’s are measured data. The dashed lines running through data plotted as circles are
computed data. The upper line of x’s are decay rates measured form a single G4 piano
string, when the other two strings are stopped with a rubber wedge. The lower solid line
runs through measured partial decay rates form the first-stage decay when all three G4
strings are struck. The points plotted as circles connected by a dashed line are triple-string
first-stage decay rates derived from the measured single-string decay rates. The lower set
CHAPTER 2. INHARMONICITY, DECAY AND COUPLING 73
∆ Rb − R0
T 1f = (2.111)
Rb + R0
As a thought experiment, if we think of the three strings as acting on the bridge all
together in phase, in fact, as though they are fused together, then the mass density has
#
in effect tripled; but the wave speed, c = K/-, is the same, so we can see the tension
has also tripled. Therefore, the effective wave impedance on our three fused strings must
# ∆ √
be (3K)(3-) or 3R0 , were R0 = K- is the wave impedance of the single-string. Hence,
the force wave transfer function for the triple fused strings would be computed as
Rb − 3R0
T 3f = (2.112)
Rb + 3R0
2T 1f − 1
T 3f = (2.113)
2 − T 1f
74
CHAPTER 3. THE WAVEGUIDE MESH 75
where t is time, x and y are spatial coordinates on the membrane, u(t, x, y) is transverse
displacement of the membrane as a function of time and spatial position(Morse and Ingard,
1968).
In the one-dimensional string case, we could solve and implement the wave equation as
two bi-directional traveling waves. In the 2-D membrane case, the traveling-wave solution
involves the integral sum of an infinite number of arbitrary plane waves traveling in all
directions, %
u(t, x, y) = gα (xcosα + ysinα − ct)dα (3.2)
α
where gα is the waveshape traveling in the direction α at speed c. In the 1-D case we were
able to assign one delay line to each of two traveling waves. Since assigning one waveguide
to each of the infinite plane waves is not feasible, we need an alternative approach to
model the 2-D wave equation efficiently.
where ωx and ωy are the spatial frequency variables in the x and y directions, respectively.
Since the kernel of this transform is e−jωx x e−jωy y , the particular value uωx ,ωy may be
understood in a polar coordinates interpretation as indicating how much (and at what
phase) there is present in u(x, y) of the plane wave oriented in angular direction α and
spatial frequency ωα , where
∆
tan α = ωy /ωx (3.4)
0
∆
ωα = ωx2 + ωy2 (3.5)
It is trivial that the period of the complex plane wave e−jωx x , traveling in the x
direction is 2π/ωx . However, we derive the period rigorously by solving for the contour
lines,
ejωx x = 1 (3.6)
ωx x = k2π, k = 1, 2, . . . (3.7)
x = k2π/ωx (3.8)
Applying this same technique in a less trivial case, we may derive for the period of the
complex plane wave e−jωx x e−jωy y in a similar fashion:
These are parallel lines of slope −ωx /ωy = −1/ tan α. Hence, these periodic contour lines
are perpendicular to the radial direction α, which corresponds to a plane wave traveling
in the direction α. To see that the spatial frequency of this complex sinusoidal plane wave
CHAPTER 3. THE WAVEGUIDE MESH 77
is ωα , we note that the formula for the perpendicular distance between two parallel lines,
y1 = mx + b1 and y2 = mx + b2 , both of slope m and with y–intercepts b1 and b2 , is as
follows:
|b2 − b1 |
d= √ (3.12)
1 + m2
Therefore, the period of the plane wave is:
2π/ωy
0 = 2π/ωα (3.13)
1 + (ωx /ωy )2
defining uωx ,ωy (t) as the 2-D spatial Fourier transform, and Uωx ,ωy (s) as the Laplace
transform of uωx ,ωy (t) in time, we have
, -
uωx ,ωy (t) = c2 (jωx )2 uωx ,ωy (t) + (jωy )2 uωx ,ωy (t) (3.15)
. /
s2 Uωx ,ωy (s) − su0 − u̇0 = c2 (jωx2 ) Uωx ,ωy (s) + Uωx ,ωy (s) (3.16)
where
∆
u0 = uωx ,ωy (0) (3.17)
∆
u̇0 = u̇ωx ,ωy (0) (3.18)
su0 + u̇0
Uωx ,ωy (s) = , - (3.19)
s2 + c2 ωx2 + ωy2
CHAPTER 3. THE WAVEGUIDE MESH 78
u+
ωx ,ωy u−
ωx ,ωy
= + (3.20)
s + jcωα s − jcωα
Letting u+ −
ωx ,ωy and uωx ,ωy be 0 in turn, we can see the spectral amplification factors as
time goes from t to t + ∆t are
S S S S S
S S S S S
S S S S S
S S S S S
S S S S S
bi-directional delay unit. Figure 3.1 shows such a mesh. In the canonical case, the scatter-
ing junctions are taken to be equal impedance lossless junctions and the interconnecting
waveguides are of unit length.
If we view the mesh as a lattice of interconnected vibrating strings, the displacement
velocities at the four ports of each junction must be equal, and the forces at each junction
must sum to zero; in this case, we have series scattering junctions with force or velocity
waves traveling in the two-port, bi-directional, delay units. Alternatively, if we view the
mesh as a lattice of interconnected acoustic tubes, the pressures at each junction must
be equal, and the flows into each junction must sum to zero; these are parallel scattering
junctions with pressure or volume velocity waves traveling through the delay units.
CHAPTER 3. THE WAVEGUIDE MESH 80
Z2
Z1
S
Z3
Z4
at the junction be equal since they are all moving together at that point,
v1 = v2 = v3 = v4 (3.27)
and (2) that the forces exerted by all the strings must balance each other at that point,
i.e., they must sum to zero,
f1 + f2 + f3 + f4 = 0 (3.28)
Combining the two series junction constraints for strings with the wave variable definitions,
we can derive the lossless scattering equations for the interconnection of several strings,
74 +
2 i=1 Zi vi
vJ = 74 (3.33)
i=1 Zi
vi− = vJ − vi+ (3.34)
vJ represents the junction velocity, the vi+ are the incoming waves at the junction, and
the vi− are the outgoing waves at the junction. These equations say that, as a wave is
coming into a junction along a string, some portion of the wave reflects off the junction
and travels back where it came from, while the rest of it travels into the junction and is
divided among the outgoing waves along the other strings. The relative proportions of
this scattering effect are dependent only on the relative impedances, Zi , of the strings and
not on their lengths.
In the case of the 4-port isotropic waveguide mesh, we take the wave impedances of
all the strings to be equal, and the equations reduce to,
1, + -
vJ = v1 + v2+ + v3+ + v4+ (3.35)
2
vi− = vJ − vi+ (3.36)
CHAPTER 3. THE WAVEGUIDE MESH 82
As a practical concern, we must terminate the mesh in some way. Terminating the mesh
waveguide ends with perfect reflections, that is multiplying the arriving traveling wave by
−1 before sending it back into the mesh, models a membrane clamped rigidly at the edges,
such as a drum head. Figure 3.3 shows this structure. A membrane stretched taut but
floating in space unterminated (or terminated at frictionless guide rods) could be modeled
with a non-reflecting termination, that is multiply by 1 at the terminations. Alternatively,
the rim junctions could be replaced by 3-port and 2-port junctions as shown in Figure 3.4.
More generally, the termination filter could be arbitrary, as shown in Figure 3.5 where the
f’s represent arbitrary wave transfer functions at the terminations. In practical situations,
these filters can be used to introduce summarized loss into the mesh and modify the
apparent wave speed of the modes to simulate stiffness.
-1 -1 -1 -1 -1
-1 S S S S S -1
-1 S S S S S -1
-1 S S S S S -1
-1 S S S S S -1
-1 S S S S S -1
-1 -1 -1 -1 -1
S S S S S
S S S S S
S S S S S
S S S S S
S S S S S
f f f f f
f S S S S S f
f S S S S S f
f S S S S S f
f S S S S S f
f S S S S S f
f f f f f
The network elements in the 2-D digital waveguide mesh are of two types: 4-port scattering
junctions and 2-port bi-directional unit delays. If the unit delays are double buffered, so
that each delay has its own input and output buffers, the computation of all the elements in
the mesh can be segregated and computed in any arbitrary order or in parallel, according
to the following two-pass computation scheme: (1) The scattering junction outputs are
computed from their known inputs and placed at the junction outputs. This constitutes
the scattering pass. (2) The outputs from each scattering junction are placed at the inputs
of the adjacent scattering junctions, thereby implementing the bi-directional delay units.
This constitutes the delay pass.
Due to the possibility of arbitrary ordering of the scattering computations, implemen-
tation on a parallel computing architecture with local four-sided connectivity between
processors is ideal for the mesh algorithm. In this implementation, the junction equations
are computed in the processors; and then the data transfer cycle is used to transfer data
from the outputs of each processor to the appropriate inputs of the adjacent processors.
Since the equal impedance 4-port lossless scattering junction is multiply-free, as pointed
out in Section 4.2, a VLSI implementation may be constructed with a handful of gates
with no need for hardware multipliers. Since the junctions may be computed in parallel,
the whole mesh may be computed in the time it takes to do 7 adds (i.e., 3 adds and 4
subtracts) and one shift. In fact, the four subtracts may be performed in parallel.
When performing the multiply-free junction computation, one divide by two is required. If
a simple sign-preserving right shift and truncation is used for this operation, the junction
value is rounded toward zero in the case of positive numbers and rounded away from zero in
the case of negative numbers. This is a round down in both cases, which could introduce
a negative offset into the values of the mesh which may eventually lead to numerical
instability or reduced dynamic range, if there is no loss in the system somewhere else.
The usual solution to such a problem would be to make a conservative rounding toward
zero in both the positive and negative cases. This way no energy and no DC drift will be
introduced into the system. This method is known to work quite well in one-dimensional
feedback loops. Unfortunately, in the two-dimensional mesh case, there are so many
CHAPTER 3. THE WAVEGUIDE MESH 87
junctions that the cumulative losses in all the junctions add up to a noticeable amount.
An energy preserving method of junction computation may be constructed as follows.
When shifting a binary number to the right, there are exactly two cases: (1) the low-order
bit which is shifted off the end of the word is zero, and the computation is exact, or (2) the
low-order bit is one, and the error is exactly 0.5. When the junction inputs are subtracted
off vJ in computing the scattering junction outputs, this error is magnified by a factor of
4 and the 0.5 error propagates into the four output signals equally. Note that the error is
in the same direction in all four cases so the total error is 4 × 0.5 = 2 full bits. To preserve
energy in the mesh, round two output signals down (i.e., just truncate) and round the
other two output signals up (i.e., add the low-order bit back in after truncating). This
re-distribution of the error produces a numerically exact lossless scattering junction. In
effect, the slight numerical error has been converted into a slight scattering dispersion error.
Whereas the numerical error was problematic, the dispersion adjustment is vanishingly
small.
It is evident that, given an initial excitation at some point on the digital waveguide mesh,
that energy from that excitation will tend to spread out from the excitation point more
and more as the traveling waves scatter through the junctions. It is not, however, easy to
see that the wave propagation on the mesh converges to that on the ideal membrane.
A visual verification of the waveguide mesh algorithm can be seen in Figure 3.6, which
shows three separate time frames of an animation computed directly from the algorithm.
The top frame shows the initial deflection loaded into the mesh. Each intersecting grid
point represents a scattering junction. The next two frames show the circular propagation
outward of the initial excitation in a way consistent with wave propagation on the ideal
membrane.
As another check of the mesh algorithm, we can compare the expected modal frequencies
on an ideal membrane with those generated from the mesh model. The allowed frequencies
CHAPTER 3. THE WAVEGUIDE MESH 88
Figure 3.7: Comparison of Theoretical Modes on a Square Membrane (shown above) and
Measured Modes on a 10 × 10 Waveguide Mesh (shown below)
√
in a theoretical ideal square membrane with clamped edges are proportional to m2 + n 2 ,
for m = 1, 2, . . ., and n = 1, 2, . . . (Morse and Ingard, 1968). These modes may be
labeled (m, n) for any given m and n. In Table 3.4.1 is computed a list of the normalized
frequencies of the first few of these modes given as multiples of the lowest allowed frequency.
(1,1)→1.00 (1,5)→3.60
(1,2)→1.58 (2,5)→3.80
(2,2)→2.00 (4,4)→4.00
(1,3)→2.24 (3,5)→4.12
(2,3)→2.55 (1,6)→4.30
(1,4)→2.92 (2,6)→4.47
(3,3)→3.00 (4,5)→4.50
(2,4)→3.16 (3,6)→4.74
(3,4)→3.54 (5,5)→5.00
Observe the four spectral plots in Figure 3.8. The top plot is an magnitude spectrum
analysis of the output of a square 10x10 mesh running at 22050Hz, horizontal scale marked
in kHz. The spectrum mirrors around one quarter of the sampling rate. This symmetry,
which also occurs in the one dimensional waveguide case, is a result of the fact that,
when the waveguide system is reflectively terminated, all the unit delays on the upper rail
can be commuted down to the lower rail making the system a function of z −2 , in effect,
over-sampling the system by a factor of two.
When the unit bi-directional delays are replaced with longer waveguides, the mirroring
replicates. For example, the second plot in Figure 3.8 shows the magnitude spectrum when
bi-directional delay lines of length 2 are used between the scattering junctions: the entire
mirrored spectrum is compressed by half, and, itself, mirrored around π/4. The third
and fourth plots show the cases where the bi-directional delay lines are length 4 and 8,
respectively.
What this means is you can reduce the number of junctions needed to compute lower
frequency meshes at a given sampling rate by adding more delay between the junctions.
However, you still get the same number of accurate lower modes as when one delay unit
is used, and you get mirrored copies of the base spectrum filling the upper spectrum.
a0 = 0
a0 = −.125
a0 = −.25
a0 = −.5
a0 = −.75
a0 = −.875
Figure 3.10 shows a detail of the 2-D mesh, labeling all the signals in the mesh. We use the
“bridge table” convention of North, South East and West to label the four ports of each
scattering junction and apply N, S, E, and W as superscripts to the traveling-wave signals
J (n) of the junction at position l, m at time n,
as appropriate. The junction velocity, vl,m
N+ S+ E+
may be written as one half the sum of its four input velocity waves, vl,m (n), vl,m (n), vl,m (n),
W+
and vl,m (n) from the north, south, east, and west direction respectively:
J 1 * N+ S+ E+ W+
+
vl,m (n) = vl,m (n) + vl,m (n) + vl,m (n) + vl,m (n) (3.37)
2
N− S− E− W−
The four output waves, vl,m (n), vl,m (n), vl,m (n), and vl,m (n) may be computed as the
junction velocity minus the input wave from the same direction:
N− J N+
vl,m (n) = vl,m (n) − vl,m (n) (3.38)
S− J S+
vl,m (n) = vl,m (n) − vl,m (n) (3.39)
E− J E+
vl,m (n) = vl,m (n) − vl,m (n) (3.40)
W− J W+
vl,m (n) = vl,m (n) − vl,m (n) (3.41)
Further, we may observe that the input to one junction is the output from the adjacent
junction delayed by one time sample:
N+ S−
vl,m (n) = vl,m+1 (n − 1) (3.42)
S+ N−
vl,m (n) = vl,m−1 (n − 1) (3.43)
E+ W−
vl,m (n) = vl+1,m (n − 1) (3.44)
W+ E−
vl,m (n) = vl−1,m (n − 1) (3.45)
N+ S−
vl,m (n) = vl,m+1 (n − 1) (3.46)
J S+
= vl,m+1 (n − 1) − vl,m+1 (n − 1) (3.47)
J N−
= vl,m+1 (n − 1) − vl,m (n − 2) (3.48)
CHAPTER 3. THE WAVEGUIDE MESH 95
* +
J J N+
= vl,m+1 (n − 1) − vl,m (n − 2) − vl,m (n − 2) (3.49)
Returning to the definition of the junction velocity as a sum of the input velocity waves,
we may substitute in these new expressions to find a relation among junction velocities of
adjacent junctions:
J 1 * N+ S+ E+ W+
+
vl,m (n) = vl,m (n) + vl,m (n) + vl,m (n) + vl,m (n) (3.53)
25
1 J *
J N+
+
= vl,m+1 (n − 1) − vl,m (n − 2) − vl,m (n − 2)
2
* +
J J S+
+ vl,m−1 (n − 1) − vl,m (n − 2) − vl,m (n − 2)
* +
J J E+
+ vl+1,m (n − 1) − vl,m (n − 2) − vl,m (n − 2)
* +6
J J W+
+ vl−1,m (n − 1) − vl,m (n − 2) − vl,m (n − 2) (3.54)
Noting that
N+ S+ E+ W+ J
vl,m (n − 2) + vl,m (n − 2) + vl,m (n − 2) + vl,m (n − 2) = 2vl,m (n − 2) (3.55)
n n−2
vl,m + vl,m = (3.57)
CHAPTER 3. THE WAVEGUIDE MESH 96
3 4
1 n−1 n−1 n−1 n−1
v + vl−1,m + vl,m+1 + vl,m−1 (3.58)
2 l+1,m
n−1
we can subtract 2vl,m from both sides to obtain
n n−1 n−2
vl,m − 2vl,m + vl,m = (3.59)
3
1 n−1 n−1 n−1
v − 2vl,m + vl−1,m (3.60)
2 l+1,m
4
n−1 n−1 n−1
+ vl,m+1 − 2vl,m + vl,m−1 (3.61)
This is in fact a standard finite difference approximation of the 2-D wave equation, apply-
ing a second-order backward difference in time, and centered second-order differences in
both space dimensions. By analogy with the 2-D wave equation, c2 corresponds to 1/2,
#
so the apparent wave speed, c that this difference should be approximating is 1/2
As we did with the 1-D waveguide difference, we will be able to replace the discrete time
and space variables with continuous time and space variables, and replace the unit spatial
and time sample shifts in the finite difference with an ε. We can then apply a multi-
dimensional Taylor’s series expansion around an arbitrary point in all directions, and let
ε converge to 0.
1
u(t, x, y) + u(t − 2ε, x, y) = [u(t − ε, x + ε, y) + u(t − ε, x − ε, y) (3.62)
2
+ u(t − ε, x, y + ε) + u(t − ε, x, y − ε)] (3.63)
∞ $
∞ $
∞
∆ $ u(nt ,nx ,ny ) (t, x, y)∆tnt ∆xnx ∆y ny
u(t + ∆t, x + ∆x, y + ∆y) = (3.64)
nt nx ny nt !nx !ny !
We can replace each term with a full Taylor’s expansion around the point (t, x, y). The
symbol manipulation is tedious and is omitted here. In any case, the use of a symbolic
mathematics processing tool such as Mathematica (Wolfram, 1999) is recommended.
After replacing each term with a Taylor’s series expansion, canceling and gathering
terms, everything reduces to
ε2 * (0,2,0) +
ε2 u(2,0,0) = u + u(0,0,2) + O{ε3 } (3.65)
2
Dividing through by ε2 , and taking the limit as ε −→ 0, we arrive at the standard 2-D
isotropic wave equation,
, -
u(2,0,0) = c2 u(0,2,0) + u(0,0,2) (3.66)
#
where, the wave speed c = 1/2.
This technique is fairly heavy handed to determine something which is reasonably obvious
#
from the difference equation itself, that the wave speed is c = 1/2. Now that it has been
applied to the 1-D waveguide difference and the 2-D mesh difference, it should be getting
more comfortable. In the next chapter we will apply this technique on mesh structures
which are non-rectilinear, to compute wave speeds simply and efficiently. Determining
wave speed in the hexagonal and tetrahedral mesh structures is not obvious from the
resultant mesh differences.
#
Recall that the wave speed derived for the physical wave equation is proportional to K/ε,
or the square root of tension over density (Morse and Ingard, 1968). Imagine a layer of
parallel waveguide strings, and a “plane wave” traveling down parallel strings together.
The speed of this wave would of course be one space sample per time sample, because
that is the speed in each of the parallel waveguides. Intuitively, when creating the 4-port
mesh, we have superimposed one layer of parallel wave guide strings over a second layer
of parallel waveguide strings, at right angles, and soldered them together at the junctions
to form the mesh. In effect, we have doubled the number of waveguide strings in the same
plane area, which therefore doubled the density of the material. If we doubled the mass
#
density per unit area, and the wave speed is proportional to K/ε, then we should expect
√
the traveling-wave speed to be reduced by a factor or 1/ 2, which is in fact the case.
Defining λ = T /X, where T is the time sampling interval, and X is the spatial sampling
interval, the Courant-Friedrichs-Lewy stability condition states that, for explicit computa-
tional schemes for hyperbolic difference equations to be numerically stable, it is necessary
that, for a difference scheme to track the solution of a hyperbolic equation with two space
dimensions, the cone of dependence for each point of the continuous wave equation solution
must lie within the discrete pyramid of dependence for each point of the difference scheme
solution (Courant et al., 1956; Strikwerda, 1989). The waveguide mesh difference equiva-
lent clearly expands at the rate of one half grid diagonal per time step, which corresponds
to the relation, 8
1
|cλ| ≤ (3.67)
2
Since the Courant-Friedrichs-Lewy condition is satisfied in the equality, the lowest possible
dissipation and dispersion error for this particular scheme is obtained.
The numerical approximation schemes for initial value problems involving second-
order hyperbolic partial difference equations usually require a multi-step time scheme
which retains values for at least two previous time frames. This is to cope with the
second partial time derivative in the equation. The waveguide mesh structure reduces
this time dependence to a novel one-step time scheme where each new time frame may be
computed wholly from the previous time frame. This is made possible by the use of the
bi-directional traveling-wave components in place of physical wave variables. In a sense,
CHAPTER 3. THE WAVEGUIDE MESH 99
the bi-directional traveling-wave structure contains the past history of the traveling waves
right in the delay line contents.
We have already shown that the 2-D digital waveguide mesh is equivalent to the following
difference scheme,
5
1
vl,m (n) + vl,m (n − 2) = [vl+1,m (n − 1) + vl−1,m (n − 1)]
2
6
+ [vl,m+1 (n − 1) + vl,m−1 (n − 1)] (3.68)
In the case of the finite difference scheme, a two-dimensional discrete-space Fourier trans-
form may be performed over the spatial grid to yield,
1
vξ1 ,ξ2 (n + 1) + vξ1 ,ξ2 (n − 1) = vξ ,ξ (n)(ejξ1 + e−jξ1 + ejξ2 + e−jξ2 ) (3.69)
2 1 2
where
∆ 1 , jξ1 -
b=− e + e−jξ1 + ejξ2 + e−jξ2 = − cos ξ1 − cos ξ2 (3.71)
2
This is just a second-order recursion equation in n, with a solution easily obtainable via
the Z-transform in the time dimension.
We delay the system one time sample to make the difference causal, and make the
CHAPTER 3. THE WAVEGUIDE MESH 100
Applying the Z-transform in the time dimension, and using the shift theorem which maps
Z
y(n − 1) ←→ z −1 Y (z) + y(−1) (3.73)
Z
y(n − 2) ←→ z −2 Y (z) + z −1 y(−1) + y(−2) (3.74)
we get,
, -
Vξ1 ,ξ2 (z) + b z −1 Vξ1 ,ξ2 (z) + vξ1 ,ξ2 (−1) (3.75)
, -
+ z −2 Vξ1 ,ξ2 (z) + z −1 vξ1 ,ξ2 (−1) + vξ1 ,ξ2 (−2) = 0 (3.76)
where vξ1 ,ξ2 (−1) and vξ1 ,ξ2 (−2) are the initial spatial spectra at times −1 and −2. Gath-
ering terms and solving for Vξ1 ,ξ2 (z), we have
1 Z
−1
←→ pn (3.78)
1 − pz
we then arrive at
Vξ1 ,ξ2 (n) = Aξ1 ,ξ2 (p+ )n + Bξ1 ,ξ2 (p− )n (3.79)
where Aξ1 ,ξ2 and Bξ1 ,ξ2 are simple combinations of the initial spatial spectra at time
samples −1 and −2 and where
√ √
± −b ± b2 − 4 −b ± j 4 − b2
p = = (3.80)
2 2
These are the discrete-time spectral amplification factors for the 2-D 4-port digital
waveguide mesh.
CHAPTER 3. THE WAVEGUIDE MESH 101
c′(ξ1, ξ2)
c
1.01
0.9
0.9
0.8
0.8 π
Pi
--
2
2
0.7
0.7
0
0
−π
-Pi
---
ξ2T
2
2 0
0 -Pi
−π
---
2
π
Pi
--
2
2
ξ1T 2
There is evidently no magnitude dissipation loss in the finite difference scheme, just as
there is none in the ideal membrane, since,
9
:! "2 ( √ )
2 ±2 : b 4 − b 2 2
2p 2 = ; + =1 (3.81)
2 2
This is as expected, since all the junctions in the mesh are lossless and energy is conserved.
On the other hand, there is some phase dispersion error in the high frequencies. Re-
#
calling c = 1/2 in the model, we see the ratio of actual wave propagation speed in the
mesh to desired speed is,
√ √
c& (ξ1 , ξ2 ) 2 4 − b2
= arctan (3.82)
c ξ −b
of this plot is difficult at first. Please note that there is no dispersion error in the wave
travel in the diagonal directions (that is, when |ξ1 | = |ξ2 |, and the direction angle α points
in one of the four diagonal directions). However, there is some loss of speed in the higher
spatial frequencies traveling along the mesh axes (when one of the component frequencies
is zero). The data points near the center of the plot represent the near full speed of travel
for plane waves of low (large period) spatial frequency, and the data points further out
from the center of the plot indicate the fractions of full speed that the plane waves of
higher spatial frequency travel at in their particular directions of travel.
In a terminated mesh, speed distortion results in a mistuning of resonant modes. This
distortion can be reduced by allpass filtering and/or warping of the membrane boundary in
a compensating manner. We note that the high-frequency modes of a membrane become
so dense that, in audio contexts, this error may not be important.
Figure 3.12 shows the same dispersion information on a contour plot, with 1% contour
lines, which we shall adopt as our standard presentation form factor for dispersion data.
We also show only up to one-quarter the spatial sampling rate, as beyond this frequency,
the output spectrum is not physically valid as it is mirrored around π/2 as the entire
system is a multiple of z −2 . Comparing Figures 3.11 and 3.12 may be helpful.
In another view, we can see dispersion in time/space domain in Figure 3.13. The effect
of dispersion in the higher spatial frequencies is visible as the wavefront smoothes out as
it travels along the axes. On the other hand, if you look closely, you can see it remains
sharp as it travels along the diagonal directions of the mesh (showing no dispersion in wave
speeds), that is, the wave shape remains coherent while traveling in the diagonal directions.
What is happening in the wave front as it is traveling in the directions of the axes, is that
the low spatial frequencies are rolling out ahead of the high spatial frequencies, and the
wavefront smoothes out, while the high spatial frequencies traveling the direction of the
axes lag behind and cause the rippling in the center of the membrane as the wavefront
moves out.
CHAPTER 3. THE WAVEGUIDE MESH 103
1.5
0.5
-0.5
-1
-1.5
Referring to Figure 4.1, let N be the number of strings connected together at a single
junction in a series manner. Let F and V represent the force and velocity at the junction
and F γ and V γ the transverse force and velocity of the N strings where they interconnect,
taking γ = 1, 2, 3, . . . , N . Then we define the wave variable relationships for each string,
F γ = F γ+ + F γ− V γ = V γ+ + V γ− (4.1)
105
CHAPTER 4. OTHER MESH STRUCTURES 106
V
1+
V
1–
V
2+
V
2–
… V
Ν+ Ν–
V
where F γ+ and V γ+ are the incoming waves on each string, and F γ− and V γ− are the
outgoing wave on each string at the point where they connect at the junction.
Now, taking the wave impedance of the all the interconnecting strings to be uniform,
R0 , we have the wave impedance relations:
F γ+ = R0 V γ+ F γ− = −R0 V γ− (4.2)
The series junction constraints say that the transverse string velocities at the junction
are all equal, and they equal the junction velocity (because they are all moving together
at the point where they are connected). The force constraint is that all the transverse
forces on the strings at the junction balance each other so that the junction force, which
is the sum of the string forces, is 0.
N
V =Vγ $
Fγ = 0 (4.3)
γ = 1, 2, . . . , N γ=1
Combining the wave variable definition, the wave impedance relationships, and the
series junctions constraints, we can derive the general scattering equations for the N-port
losses scattering junction (Smith, 1987; Smith, 1993):
N
2 $
V = V γ+ V γ− = V − V γ+ (4.4)
N γ=1
VAB– VBA+
z-1
Scattering Scattering
Junction Junction
A z-1 B
VAB+ VBA–
by the bidirectional unit delay. We will call the transverse velocity on the string which
connects from junction A to junction B, measured at A , VAB . Similarly, we define VBA
to be the transverse velocity on the string which connects from junction B to junction A,
measured at B. Thus we have the wave variable decompositions,
∆
VA = VAB = VAB+ + VAB− (4.5)
∆
VB = VBA = VBA+ + VBA− (4.6)
So, VAB+ is the incoming wave from B to A as it arrives at A, and VAB− is the outgoing
wave from A to B as it leaves A.
The time-domain equations of the bidirectional delay are
B+ A− A+ B−
vA (n) = vB (n − 1) vB (n) = vA (n − 1) (4.7)
Using these relationships, we can derive an expression for the incoming wave at junction
A from junction B in terms of the junction velocities of A and B only:
* , -+
= z −1 VB − z −1 VA − VAB+ (4.11)
Remember that these are N-port junctions, so that we can express the junction velocity
at A in terms the sum of its input waves from the N surrounding junctions,
N
2 $ J +
VA = VA γ (4.13)
N γ=1
J +
where VA γ represents the incoming wave from junction J as it arrives at A.
Generalizing Equation (4.12), we can write the N wave input velocities at the central
junction, VAJγ+ , in terms of the central junction velocity, VA , and the surrounding N
junction velocities, VJγ ,
( )
J + z −1 , -
VA γ = VJγ − z −1 VA (4.14)
1 − z −2
Plugging (4.14) into (4.13) we can eliminate the wave input variables, and write an ex-
pression for the junction velocity at A in terms of only the velocities at the N surrounding
junctions: ( ) N
2 z −1 $
VA = VJ γ (4.15)
N 1 + z −2 γ=1
Apply the inverse Z-transform to arrive at the time-domain finite difference equation for
a waveguide mesh built of symmetrical N-port junctions.
N
2 $
vA (n) + vA (n − 2) = vJ (n − 1) (4.16)
N γ=1 γ
These equations apply to the cases N = 4, which was the subject of the last chapter.
It can also be applied to the 2-D case N = 6, and N = 8 which we show next. It also
applies to the 3-D rectilinear mesh case, when N = 6. The 2-D N = 3 triangular case
is problematic, since the symmetry at the junction-to-junction level alternates. A similar
CHAPTER 4. OTHER MESH STRUCTURES 109
problem arises in the 3-D N = 4 tetrahedral case, which we will address later in the
chapter.
In Equation (4.16), the vJγ are the junction velocities at the N spatial points, Jγ . These
points can lie in a plane, or in 3-D space around the central junction, vA . Let’s assume
3-D, just to be more general. Taking the points Jγ to be (xγ , yγ , zγ ), we can state the 3-D
shift theorem in the Fourier domain as
DFT IS
vk+xγ ,l+yγ ,m+zγ ←→ ejωk xγ ejωl yγ ejωm zγ vωk ,ωl ,ωm (4.17)
N
2 $
vA (n) + vA (n − 2) = vJ (n − 1) (4.18)
N γ=1 γ
we apply the Z-transform in the time domain, and the discrete-time Fourier transform on
the infinite 3-D spatial series,
to obtain:
1 + bz −1 + z −2 = 0 (4.19)
where,
N
2 $
b=− ejωk xγ ejωl yγ ejωm zγ (4.20)
N γ=1
% G
C(ωk , ωl , ωm ) = 0 (4.22)
ωk2 + ωl2 + ωm
2
CHAPTER 4. OTHER MESH STRUCTURES 110
S S S S S
S S S S S
S S S S S
S S S S S
S S S S S
Taking the limit as the sampling intervals approach 0, we find that this difference
CHAPTER 4. OTHER MESH STRUCTURES 112
S S S S S
S S S S S
S S S S S
S S S S S
3
utt = (uxx + uyy ) (4.24)
4
#
Hence, the ideal wave speed, c = 3/4.
2
utt = (uxx + uyy ) (4.25)
3
#
with the wave propagation speed, c = 2/3.
Computing wave propagation speed for the 6-port triangular mesh (see Equation
(4.22)), we find the dispersion is quite uniform in all directions and small compared to
other formations, as shown in Figure 4.6.
CHAPTER 4. OTHER MESH STRUCTURES 113
Z2 Z2 Z2 Z2 Z2 Z2
S S S S S
Z2 Z2 Z2 Z2 Z2 Z2
S S S S S
Z2 Z2 Z2 Z2 Z2 Z2
S S S S S
Z2 Z2 Z2 Z2 Z2 Z2
S S S S S
Tim Stilson implemented a full 3-D mesh bent cylindrical tube simulation (Stilson, 1994),
first published in (Van Duyne and Smith, 1996). Figure 4.10 shows the 3-D wave front
making its way around the turn of a U-shaped tube. This structure was used to study
room acoustics modeling in (Savioja et al., 1995).
We show dispersion plots for the 6-port rectilinear 3-D waveguide mesh with the same 1%
contour line settings. Figure 4.11 shows a horizontal slice through the origin, and Figure
4.12 shows a diagonal slice through ωx = ωz . Figure 4.13, again, shows the response on
the hemispherical surface, |ω| = π/2.
For potential full-silicon implementations, a no-multiply solution for the rectilinear mesh
is available by setting the wave impedances in one direction equal to twice the wave
CHAPTER 4. OTHER MESH STRUCTURES 116
Figure 4.10: Animation of the 3-D Rectilinear Mesh Modeling Compression Wave Through
a Tube
CHAPTER 4. OTHER MESH STRUCTURES 117
1.5
0.5
-0.5
-1
ωy
-1.5
1.5
0.5
-0.5
-1
ωy
-1.5
-1 -0.5 0 0.5 1
ωx,ωz
1.5
0.5
-0.5
-1
ωy
-1.5
impedances in the other directions, and making the necessary adjustments to grid size in
that direction.
1/2
1
√3
6 B 2 2
D A
C 3
5
To address the alternating symmetry of the junctions and simplify the math, we expand
the analysis by one more time step. Note that the positions of the junctions around
Junction A two steps out, Junctions 1,2,3,4,5 and 6, are actually symmetrical no matter
which junction we put at the center. In this way we can get a general computation of
dispersion in the difference:
( )( )
2 z −1
VA = VB + VC + VD (4.27)
3 1 + z −2
3 ( )42 6
2 z −1 $
= −2
3VA + Vγ (4.28)
3 1+z γ=1
( ) 6
4 z −2 $
VA = Vγ (4.29)
9 1 + (2/3)z −2 + z −4 γ=1
CHAPTER 4. OTHER MESH STRUCTURES 121
√
(x1 , y1 ) = (0, 3) (4.31)
√
(x2 , y2 ) = (3/2, 3/2) (4.32)
√
(x3 , y3 ) = (3/2, − 3/2) (4.33)
√
(x4 , y4 ) = (0, − 3) (4.34)
√
(x5 , y5 ) = (−3/2, − 3/2) (4.35)
√
(x6 , y6 ) = (−3/2, 3/2) (4.36)
F(x, y, t, ε) = (4.37)
2
u(x, y, t) + u(x, y, t − 2ε) + u(x, y, t − 4ε) (4.38)
3
6
4$
− u(x + xγ ε, y + yγ ε, t − 2ε) (4.39)
9 γ=1
Plugging in the 3-D Taylor’s Series Expansion, we compute the limit as grid size shrinks:
( )
F 1
lim = utt − uxx + uyy (4.40)
ε→∞ (2ε)2 2
Dispersion for the three-port mesh is fairly uniform, as shown in Figure 4.16.
The 2-D digital waveguide mesh (Van Duyne and Smith, 1993a; Van Duyne and Smith,
1993b) has proven to be effective and efficient in the modeling of musical membranes
and plates, particularly in combination with recent simplifications in modeling stiffness
(Van Duyne and Smith, 1994), nonlinearities (Van Duyne et al., 1994), and felt mallet
excitations (Van Duyne et al., 1994). The rectilinear 3-D extension to the mesh had
been suggested (Van Duyne and Smith, 1993b), and has been applied to the case of room
acoustics (Savioja et al., 1995). However, it requires the use of 6-port scattering junctions,
which make a multiply-free implementation impossible in the isotropic case. The 4-port
scattering junctions of the 2-D mesh required only an internal divide by 2, which could be
implemented as a right shift in binary arithmetic. However, the 6-port junction requires
a divide by 3. The multiply-free cases occur for N -port junctions in which N is a power
of two (Smith, 1987).
We propose here a tetrahedral distribution of multiply-free 4-port scattering junctions,
with junction port placement analogous to the 4-bond carbon atom shown in Figure 4.18.
CHAPTER 4. OTHER MESH STRUCTURES 123
These four-port junctions may fill space tetrahedrally analogous to the molecular structure
of the diamond crystal shown in Figure 4.19, where the placement of the scattering junc-
tions corresponds to the placement of the carbon nuclei, and the bi-directional delay units
correspond to the four tetrahedrally-spaced single bonds between each pair of nuclei. We
show that the tetrahedral mesh is mathematically equivalent to a finite difference scheme
which approximates the 3-D lossless wave equation. We further compute the frequency-
and direction-dependent plane wave propagation speed dispersion error.
Figure 4.20 shows a small chunk of the tetrahedral mesh. We take the distance be-
tween adjacent junctions to be 1, and the junction point marked A to lie at the origin
√
of an (x, y, z) cartesian coordinate system. We arrange the junctions B(0, 2 2/3, 1/3),
# √ # √
C( 2/3, − 2/3, 1/3), D(0, 0, −1), and E(− 2/3, − 2/3, 1/3) tetrahedrally about point
A(0, 0, 0). The line segments between these junction points represent bi-directional delay
units of the form shown in Figure 4.21.
The equations describing the computation of the lossless 4-port scattering junctions
are (Smith, 1987; Van Duyne and Smith, 1993a; Van Duyne and Smith, 1993b),
1 $ Γ+
VA = V (4.41)
2 Γ A
VAΓ− = VA − VAΓ+ (4.42)
CHAPTER 4. OTHER MESH STRUCTURES 125
-2 0 2
2
1 3
B
8 9 C
4
7 E A
5
6
D
10
12
11
VAB– VBA+
z-1
Scattering Scattering
Junction Junction
A z-1 B
VAB+ VBA–
where Γ ranges over the four junction points surrounding A, namely Γ ∈ {B, C, D, E}.
VA represents the junction velocity at junction A. VAΓ+ and VAΓ− represent the input and
output signals, respectively, of junction A in the direction of junction Γ.
Since the junctions are interconnected with bi-directional delay units, the input to
junction A from the direction of Γ is equal to the output from Γ delayed by one sample.
In the Z-transform domain we my write this relationships as,
Using (4.42) and (4.43), we obtain an expression for the input signal to junction A from
the Γ direction in terms of the junction velocities A and Γ only,
, -
VAΓ+ = z −1 VΓA− = z −1 VΓ − VΓA+ (4.44)
* , -+
= z −1 VΓ − z −1 VA − VAΓ+ (4.45)
which implies, ( )
z −1 , -
VAΓ+ = VΓ − z −1 VA (4.46)
1 − z −2
We substitute (4.46) into (4.41) to get an expression for the junction velocity VA in terms
of the four surrounding junction velocities VΓ ,
( )
1 z −1 $
VA = VΓ (4.47)
2 1 + z −2 Γ
Unfortunately, the orientations of the tetrahedra vary from point to point. Notice in
Figure 4.20 that the tetrahedron around point A and that around point B are in vertically
opposite orientations. However, consider the relationship between the center point A and
the twelve equally-spaced junctions marked 1 through 12, which are all equidistant from
A, and which are two time steps away from A. With some imagination, one can see that
the directional relationships between point A and the outer twelve points repeats itself
around every point in the mesh, regardless of orientation of the inner four points, B, C,
D, and E.
Therefore, we take note of the following relationships, which may be derived in a
CHAPTER 4. OTHER MESH STRUCTURES 128
where Γ ∈ {B, C, D, E} and γB ∈ {2, 8, 9}, γC ∈ {3, 4, 5}, γD ∈ {10, 11, 12} and γE ∈
{1, 6, 7}. Plugging (4.48) back into (4.47), we get an expression for VA in terms of the
junction velocities of the twelve junctions, Vi :
( ) 12
1 z −2 $
VA = Vi (4.49)
4 1 + z + z −4
−2
i=1
To see that this partial difference equation approximates the continuous time wave
equation, we first multiply through by the denominator in (4.49), inverse Z-transform, and
gather all the terms onto the left-hand side. Then, we view the equation as a continuous
time and space expression of the form F(t, p) = 0, where F(t, p) is,
2 12
$ 1$
v(t − 2kε, p) − v(t − 2ε, p + P i ε) (4.50)
k=0
4 i=1
and p is now the arbitrary spatial position of junction A, and the P i represent the twelve
directional vectors from point A to the junction points marked 1 through 12 in Figure
4.20, respectively. The unit time and space steps are taken to be ε.
We may expand (4.50) in a four dimensional Taylor series about the point p = (0, 0, 0) at
time t = 0, replacing each term of (4.50) with something of the form,
∞ $
∞ $
∞ $
∞ v (nt ,nx ,ny ,nz ) nt nx ny nz
$ 0 t x y z
(4.51)
nt nx ny nz nt !nx !ny !nz !
F 1
lim 2
= utt − [uxx + uyy + uzz ] (4.52)
ε→0 (2ε) 3
CHAPTER 4. OTHER MESH STRUCTURES 129
1.5
0.5
-0.5
-1
ωz
-1.5
To quantify dispersion error in the tetrahedral mesh, we apply a von Neumann analysis
directly on the FDS (Strikwerda, 1989; Van Duyne and Smith, 1993a). Essentially, we
transform the FDS into the frequency domain in both time and space, replacing spatial
shifts with their corresponding spatial linear phase terms. Then we observe how the
spatial spectrum updates after one time sample. With this information, we can determine
how fast the various plane waves travel in the mesh at each frequency. There can be no
attenuation since the mesh is constructed from lossless scattering junctions. Therefore, the
only departure from ideal behavior, aside from round-off error, is traveling-wave dispersion.
CHAPTER 4. OTHER MESH STRUCTURES 130
1.5
0.5
-0.5
-1
ωz
-1.5
1.5
0.5
-0.5
-1
ωy
-1.5
1.5
0.5
-0.5
-1
ωy
-1.5
In order to avoid the difficulty of defining a discrete Fourier transform over a tetra-
hedrally sampled space, we consider the discrete-time/discrete-space difference scheme to
be in continuous space by replacing the sample points in space by their corresponding
generalized impulse functions, filling the regions in between them with zeros. In this for-
mulation, the tetrahedral difference scheme applies to all points in space continuously;
however, since there shall only be initial conditions at the tetrahedral mesh sampling
points, the zero regions will remain at zero as the difference scheme progresses through
time.
We may now take the spatial Fourier transform of (4.49) and replace the spatial po-
sitions of the twelve outer junction points with their corresponding linear phase terms,
T
Vi ←→ V (ω)ejP i ·ω , where ω is the three-dimensional spatial frequency vector, to obtain
the following quadratic expression in z −2 :
12
∆ 1$ T
1 + bz −2 + z −4 = 0, b=1− ejP i ·ω (4.53)
4 i=1
where z −2 represents two time samples of delay. Due to the symmetrical orientation of
CHAPTER 4. OTHER MESH STRUCTURES 132
vectors P i , as indicated in Figure 4.20, it may be shown, rather remarkably, that the value
of b remains a real number between −2 and 2 for all values of ω. Hence, we may define
√
2 ∆ b 4 − b2
G (ω) = − ± j (4.54)
2 2
where G is the spectral amplification factor of the spatial spectrum after one time sample.
It is easy to show that |G| ≡ 1, hence plane waves propagate losslessly. We note that
the phase of G corresponds to the spatial phase shift of a plane wave in the direction of
travel in one time sample, where
√
1 ± 4 − b2
% G = arctan (4.55)
2 b
Hence, the phase distance traveled in one time sample by a spatial plane wave of frequency
|ω| and direction ω is c& (ω) = % G/|ω|, where c& (ω) is the frequency dependent speed of
plane wave travel measured in space samples per time sample. (Phase distance corresponds
to phase advance in time domain language.)
Dispersion Results
Figures 4.22, 4.23 and 4.24 show contour plot slices along the planes ωx = 0, ωy = 0,
and ωz = 0, respectively, of the normalized plane wave speed c& (ω)/c in the tetrahedral
mesh. The innermost contour line is drawn at 99% of full speed and subsequent lines
are drawn at 1% intervals. Because of the spatial sampling interval, there is a Nyquist
limit on the spatial frequencies which may be supported on the mesh, namely |ω| < π. In
addition, all transfer functions definable at any one junction, and the denominators of all
transfer functions definable between any pair of junctions, are functions of z −2 , as may
be seen from Figure 4.21. Therefore, frequencies above π/2 are not independent, and are
constrained to be a copy of the frequencies below π/2. We have superimposed a circle
marking this limit in the contour plots. The central area of each plot corresponds to lower
spatial frequencies, and the outer regions correspond to higher spatial frequency. The
angular position of a point on each plot indicates the direction of the wave travel in the
planar slice being shown. Figure 4.25 shows the response on the hemispherical surface,
0
|ω| = π/2, where ωz = (π/2)2 − ωx2 − ωy2 .
CHAPTER 4. OTHER MESH STRUCTURES 133
Both the rectilinear and the tetrahedral mesh have reasonable dispersion characteris-
#
tics. And both model a wave speed of c = 1/3 space samples per time sample.
Practical benefits of using the tetrahedral 4-port mesh over using the rectilinear 6-port 3-D
mesh can be summarized as follows: The tetrahedral mesh uses 35% fewer junctions than
the rectilinear mesh per unit volume. It also uses 57% less delay memory. The rectilinear
mesh uses 1 multiply per junction, whereas the tetrahedral mesh is multiply-free. The
rectilinear mesh uses 11 adds per junction, whereas the tetrahedral mesh uses 7 adds per
junction.
Although the bookkeeping required to develop code or silicon to implement the tetrahe-
dral mesh requires some clever indexing, overall the extra effort may be worth the trouble
in large systems.
Chapter 5
134
CHAPTER 5. THE PASSIVE NONLINEAR FILTER 135
Beyond this, Lagge and Fletcher (Lagge and Fletcher, 1984) have shown that small non-
linearities in the compliance of a bridge supporting one end of a vibrating string can cause
the transfer of energy among modes of vibration. Thus, nonlinearities may have a smaller
but nonetheless important effect on the tones of some stringed instruments.
We have found that the addition of passive nonlinearities to an otherwise linear digital
synthesis algorithm can cause the transfer of energy among modes, and can lead to large
and interesting alterations and evolutionary changes in timbre. In physical instruments
nonlinearities are necessarily passive because physical nonlinearities cannot cause an in-
crease in total energy, but can only transfer energy among modes. The use of nonlinearities
that are inherently passive in digital sound synthesis is important because other ways of
adding nonlinearity can result in instability or oscillation. If our passive nonlinearity is
also lossless, we can avoid unwanted, or unpredictable loss in our system as well.
The means we have used for adding nonlinearities is to incorporate a “circuit element”
that is necessarily passive. The circuit element we have used is a spring that is stiffer
for deflection in one direction than in the other, or a capacitance that has a different
value for positive than for negative voltages. Such an element stores no energy at zero
deflection (spring) or at zero voltage (capacitor). Any energy that is stored by an increase
or decrease in deflection or voltage will be given up as the voltage goes to zero. The
element can store and release energy, but it cannot produce energy. We have found that
the use or addition of this simple element is economical in computation and effective in
causing energy transfer among otherwise linear modes. It can lead to a substantial and
pleasing alteration in the sound produced.
Our addition of passive nonlinearities is different from the use of nonlinearities to
excite or maintain oscillations of blown or bowed instruments (Smith, 1987). The purpose
of the passive nonlinearities we have used is not to initiate or maintain oscillation, but
to modify the spectrum naturally over time by transferring energy among modes. The
research presented in this chapter was developed in collaboration with John R. Pierce,
and was first published in (Pierce and Van Duyne, 1997a; Van Duyne et al., 1994) and
(Pierce and Van Duyne, 1997b).
CHAPTER 5. THE PASSIVE NONLINEAR FILTER 136
ε
+ delay line * +
1−ε
lowpass filter
The first attempt was to develop a model of a string terminated with a bent springy
bridge (Pierce, 1993a). Figure 5.2 shows an artist’s rendering of this above, and a gong
viewed as a bent plate below. The idea is that the essential functional aspect of the gong
is the presence of many bends in the plate which function in a manner similar to the bent
termination of the string.
John R. Pierce actually constructed a physical monochord made of wood and metal
with a single string with such a termination and was able to demonstrate, by plucking the
string, the energy in the fundamental was being transferred nonlinearly into the second
mode an octave above. We can understand the mechanism of this transfer as follows: As
the string vibrates in its pure first mode up and down at frequency f0 , it pulls on the
springy termination twice per period (once at the upper extremity of its excursion, and
once at the lower extremity. Because the springy termination is at a 45◦ angle, as it gets
pulled in twice per period, it also bends up and down twice per period, thus driving the
string at transverse frequency 2f0 .
While this model provided excellent intuition, it proved difficult to find a mathemat-
ically efficient digital filtering model of the physics. The following nonlinear mass-spring
circuit offered more opportunities to the wave-theoretic physical modeling techniques.
Figure 5.2: String with Bent Springy Termination and Gong Viewed as Bent Plate
CHAPTER 5. THE PASSIVE NONLINEAR FILTER 139
lower frequency
greater maximum displacement
k1
k1 m k1 k1 k1
m m m
m
k2 k2 k2 k2 k2
half of the cycle. When k1 and k2 are nearly equal, but different, this nonlinear oscillator
has an essentially sinusoidal response, but with a rolling–off set of harmonic overtones due
to the slight discontinuity at displacement zero–crossings.
i
+
v
–
C=
{C1, v ≥ 0
C2, v < 0
i
+
v
–
L=
{ L1,
L2,
i≥0
i<0
This nonlinear spring circuit can be viewed in the electrical domain as shown in Figure
5.4: The nonlinear spring is mathematically equivalent to a nonlinear capacitor whose
capacitance value depends on the sign of the voltage across it (Pierce, 1993b). Voltage, v,
replaces mechanical force, f ; and current, i, replaces mechanical displacement velocity, v.
Figure 5.5 shows the dual circuit with voltage and current interchanged. In this case, the
inductance value depends on the direction of the current flow through the circuit. Exam-
ples of electrically equivalent circuits of physical impedances found in musical instruments
can be found in (Fletcher and Rossing, 1991). More on linear electrical circuits can be
found in (Cruz and Van Valkenburg, 1974).
Consider a string terminated by a double spring apparatus as shown in Figure 5.6. Three
states of the system are shown in the figure: First, the lower spring is compressed, while
the upper spring is at rest; second, both springs are at rest; and, third, the upper spring is
compressed, while the lower spring is at rest. In effect, the spring termination apparatus is
equivalent to a single nonlinear spring whose stiffness constant is k1 when the displacement
is positive and k2 when the displacement is negative.
Now consider what is happening to the energy in the system. When the lower spring
is compressed, some energy from the string is converted to potential energy stored in the
spring. When the lower spring returns to its rest state, the stored spring energy is entirely
returned to the string, and the spring contains no stored energy. When the upper spring
is then compressed, exactly the same kind of energy exchange occurs. This ideal system
CHAPTER 5. THE PASSIVE NONLINEAR FILTER 141
at rest k1
compressed k2
at rest k1
at rest k2
compressed k1
at rest k2
i
+ +
–
R0 v
–
C= { C1, v ≥ 0
C2, v < 0
Transmission line or other resonant system Passive Non-Linear Capacitor
is physically passive and lossless since energy is neither created nor destroyed.
If the spring stiffness constant had changed while stored potential energy was still in
the spring, i. e., when one of the springs was still compressed, the stored energy would be
scaled by the new relative stiffness of the spring. In this case, the stored energy before
the stiffness change would be different from the stored energy after the stiffness change,
leading to the creation or loss of energy, possibly resulting in a non-passive system. In our
model of this physical system, we must be careful to change the spring stiffness coefficient
at the right time, to preserve passivity and losslessness.
Passivity is the requirement that no energy be created by the system. When energy
is created in a feedback loop, stability problems may ensue. We have specifically tried to
discover a nonlinear system which is passive, and which is lossless, so the system loss may
be decoupled from the nonlinear effect, and designed separately.
Figure 5.7 shows a transmission line (Kock, 1937; Magnusson, 1970) terminated with
a nonlinear capacitance circuit. This is an electrically equivalent circuit to the string
terminated by nonlinear spring shown in Figure 5.6. Here, the electrical characteristic
impedance of the transmission line corresponds to the mechanical wave impedance of the
string, R0 .
k
f
x
Figure 5.8: Simple Linear Spring System
The force equation for the ideal linear spring shown in Figure 5.8 is,
where f (t) is the force applied on the spring, x(t) is the compression distance of the spring,
v(t) is the velocity of compression, and k is the spring stiffness constant.
Taking the Laplace transform, and assuming no initial force on the spring, we get,
Here, k/s is the lumped impedance of the spring. Setting s = jω will give the frequency
response of this system.
Figure 5.9 shows a string terminated by a spring. The physical force at the string termi-
nation is the sum of the transverse force waves on the string at that point, f = fr + fl ,
while the physical velocity at the termination is the difference between the force waves
scaled by 1/R0 , v = (1/R0 )(fr − fl ). We may, therefore, re-formulate Equation (5.2) as a
transfer function from Fr to Fl ,
Wave Impedance R0
fr
fl
k
k/s − R0
Fl (s) = Fr (s) (5.5)
k/s + R0
The force wave transfer function is stable and allpass since its pole is at s = −k/R0 and
its zero is s = k/R0 , where k and R0 are defined to be positive real numbers.
To move from the continuous physical system to the discrete digital filter, we use the
conformal bilinear transform from the s-plane to the z-plane (Nehari, 1952),
1 − z −1
s←α (5.6)
1 + z −1
The bilinear transform maps DC in the continuous system to DC in the digital system,
while mapping infinite frequency in the continuous system to half the sampling rate, or the
Nyquist frequency, in the digital system. α is a degree of freedom which may be used to
control the frequency warping. It is usual to choose α = 2/T to obtain faithful frequency
response at the low end of the frequency range.
We apply the bilinear transform to Equation (5.5) to obtain,
where,
a0 + z −1 k − αR0
H(z) = and a0 = (5.8)
1 + a0 z −1 k + αR0
CHAPTER 5. THE PASSIVE NONLINEAR FILTER 145
z-1
u(n) a0
fr(n) + + fl(n)
−
z-1
Figure 5.10 shows a system diagram of the spring termination, H(z), using the force wave
construction given in Equations (5.7) and (5.8).
Since the filter coefficient, a0 , represents the spring stiffness, we need only change a0 to
effect a change in the stiffness of the spring termination. We must, however, effect the
change just at the point where the spring is at rest to preserve physical and digital passivity
and losslessness.
Referring to Figure 5.10, consider the case where the input signal to the filter is always
∆
zero, fr (n) ≡ 0, but where there is some internal state value, namely, let u(−1) = u0 .
Since, we see from the system diagram,
we can, then, write the filter output signal, due only to the internal filter energy state
ringing out, as,
If we change the filter coefficient, a0 , it is clear that the internal state energy will ring
out of the filter with a different decay rate than if the coefficient had not been changed.
Such coefficient changes, if made arbitrarily, may lead to instability in a feedback loop.
However, if u0 is zero or near zero, we change the coefficient with relative impunity, since
the resultant discontinuity in the state energy will be minimal or zero. Therefore, we
choose to gate the filter coefficient change on the sign of u(n), to maintain passivity in the
nonlinear allpass filter.
As noted, there may necessarily be some small state energy in the filter at the time
that the coefficient changes. In nonlinear string modeling for the purposes of musical
instrument sound synthesis, there is generally a frequency-dependent summary loss filter
in the loop making the small energy variation insignificant. However, there are a number
of things that can be done to mitigate this small error further. One simple thing would be
to compute the allpass filter one sample ahead with the first coefficient to see if the state
will change signs. If it does change signs, then re-compute the filter with an intermediate
interpolated filter coefficient for just one sample before switching to the second coefficient
(Abel and Van Duyne, 2007). In addition, ways to eliminate allpass transients have been
described in (Välimäki et al., 1995).
From the allpass filter implementation in Figure 5.10, we may observe that,
Also we have,
Since, the actual physical force applied to the spring termination is equal to the sum of
the input and output force waves, we may derive an expression of the actual force on the
spring, f (n), from (5.16) and (5.17),
∆
f (n) = fr (n) + fl (n) (5.18)
= [u(n) + a0 u(n − 1)] + [a0 u(n) + u(n − 1)] (5.19)
= (1 + a0 )[u(n) + u(n − 1)] (5.20)
Equation (5.20) says that the actual physical force on the spring is proportional to a
linearly interpolated value of signal u at time n − 0.5. From Equation (6.22), displacement
of the spring termination is zero when force is zero, and f (n) is zero when u(n)+u(n−1) is
zero. Therefore, when u changes sign between times n − 1 and n, the spring displacement
is closest to zero. This is the physically correct time to let the spring stiffness coefficient
change for the nonlinear spring termination system given in Figure 5.6.
Digital Interpretation
The internal filter state signal, u(n), represents the energy stored in the filter. Assuming
no input signal, i. e., fr (n) ≡ 0, and some internal state value at time n = −1, namely,
∆
u(−1) = u0 , we may then compute the output of the filter caused only by this internal
energy state value as,
fl (n) = (1 − a0 2 )(−a0 )n u0 (5.21)
This method of gating the coefficient change is both physically correct and digitally correct.
5.4.6 Implementation
Figure 5.11 shows a digital system diagram for the nonlinear string/spring system of
Figure 5.6. Note that, for convenience, we use a look–up table notation to show how
u(n) gates the coefficient change; but, in general, this would be implemented in simple
conditional logic. Note that the rate of spreading, and the spectral region where it is most
CHAPTER 5. THE PASSIVE NONLINEAR FILTER 148
z-1
∗
fl(n) z-1
output
Loss De-tuning +
Figure 5.11: Nonlinear String/Spring System
2
∠H(ejω)
1
ω
0.5 1 1.5 2 2.5 3
a0 = .8
-1
a0 = -.8
-2
-3
Figure 5.12: Phase Response of the One–Pole Allpass Filter
Consider the force wave transfer function given in Equation (5.8). This is a one–pole
allpass filter. Its gain is unity and, in general, its phase response, % H(ejω ), decreases
monotonically from 0 to −π/2 as ω goes from 0 (DC) to π (Nyquist frequency). Figure
5.12 shows several overlaid phase response plots for this filter with different coefficient
values, a0 ranging from −0.8 to 0.8.
Now, consider two allpass filters, H1 (z) and H2 (z) which have two different coefficients,
a1 and a2 , respectively. Let a1 = acenter + ∆a/2 and a2 = acenter − ∆a/2, where acenter
is the center of variation (acenter = (a1 + a2 )/2), and ∆a is the maximum deviation
(∆a = a2 − a1 ). Figure 5.13 shows the difference in phase responses of the two filters,
% H1 (ejω ) − % H2 (ejω ), for a series of coefficient pairs generated by letting acenter range
from −0.8 to 0.8, and holding ∆a constant at 0.3. What the plot shows is that acenter
determines which region of the spectrum has the greatest phase response variation for a
given ∆a.
Figure 5.14 shows the phase response difference for a series of coefficient pairs generated
by holding acenter constant at −0.5 and letting ∆a range from 0.1 to 0.6. This plot shows
CHAPTER 5. THE PASSIVE NONLINEAR FILTER 150
2
∠H1(ejω) – ∠H2(ejω)
1
ω
0.5 1 1.5 2 2.5 3
-1
-3
Figure 5.13: Effect of Varying acenter
how ∆a determines the amount of phase response variation for a given acenter .
If we drive the one–pole allpass filter, H(z), with a sinusoid of frequency f1 , and vary
the coefficient, a0 , sinusoidally at frequency f2 around some center value, acenter , with
deviation ∆a, we should expect the filter to apply a quasi–sinusoidal phase modulation to
the input signal due to the phase response variation predicted in the preceding paragraphs.
The resultant output signal of the filter should contain sidebands around the driving
frequency, f1 , separated by the coefficient modulating frequency, f2 . Furthermore, the
deviation, ∆a, should determine the “index” of modulation, in the FM sense, and thus,
the amount of energy in the sidebands. Figure 5.15 shows the magnitude response on
a dB scale of H(z), with sinusoidally varying coefficient, a0 (n) = −0.7 − cos(2πf2 nT ),
driven by an input sinusoid, cos(2πf1 nT ), where f1 = 8000 Hz, f2 = 2000 Hz, and the
sampling interval, T = 1/44100 seconds. Figure 5.15 verifies that the filter output is
very near to the predicted phase modulation, containing a set of sidebands of the form,
cos(2πf1 T ± k2πf2 T ).
CHAPTER 5. THE PASSIVE NONLINEAR FILTER 151
2
∠H1(ejω) – ∠H2(ejω)
1
a1,2 = -.5 ± .05 ω
0.5 1 1.5 2 2.5 3
-1
-2 a1,2 = -.5 ± .3
-3
Figure 5.14: Effect of Varying ∆a
75
50
25
-50
-75
In general, if we flip the coefficient of a one–pole allpass filter between two values peri-
odically, the coefficient signal, a0 (n), is then a square wave with a spectrum containing
rolling–off odd harmonics. The output signal spectrum produced by this kind of coefficient
modulation will contain greater emphasis in the odd sidebands than a simple sinusoidally-
modulated filter, due to the odd harmonics in the coefficient modulation signal.
For coupling to occur in the resonant system, the sidebands produced by the modulated
allpass filter must fall on supported modes of the system. When a sideband coincides with
a supported mode, that mode will be driven by the energy in the appropriate sideband.
Energy from sidebands which do not fall on supported modes will not drive any particular
mode and will simply be absorbed back into the system.
In the passive nonlinear filter structure, we choose to gate the coefficient alternations
on the state signal u(n) as shown in Figure 5.11. Since the coefficient signal will have
the same effective fundamental as the driving input signal, we can expect the resultant
sidebands to fall on multiples of the effective fundamental of the input signal, thereby
driving at least some supported modes of the system. The sidebands are, therefore, tuned
well for energy spreading to occur into nearby system modes on a string.
Figure 5.16 shows the gradual spreading out of spectral energy of a waveguide string
system terminated with the passive nonlinear filter.
CHAPTER 5. THE PASSIVE NONLINEAR FILTER 153
kHz
4
0
0 2.5 5.0 7.5 10.0 sec
Figure 5.17: Harmonic Loop with Lowpass Filter
kHz
4
0
0 2.5 5.0 7.5 10.0 sec
Figure 5.18: Harmonic Loop with Lowpass Filter and Passive Nonlinear Filter
CHAPTER 5. THE PASSIVE NONLINEAR FILTER 154
kHz
4
0
0 5.0 10.0 15.0 20.0 sec
Figure 5.19: Inharmonic Loop with Lowpass Filter
kHz
4
0
0 5.0 10.0 15.0 20.0 sec
Figure 5.20: Inharmonic Loop with Lowpass Filter and Passive Nonlinear Filter
In the second example, the same system is used with the addition of an allpass filter
in the loop to detune the modes slightly giving it a more bell-like tone. Figure 5.19 shows
the spectral evolution when the nonlinear filter is de-activated. Figure 5.20 shows the
result when the nonlinear filter is operating. Note that the modes exchange energy among
themselves in a more dynamic manner in this inharmonic case.
In addition to these simple loop cases, we have produced promising gong sounds
by incorporating passive nonlinearities into the 2-D digital waveguide mesh membrane
model (Van Duyne and Smith, 1993b; Van Duyne et al., 1994). Figure 6.14 in the next
chapter shows the structure of the waveguide mesh gong model, with passive nonlinear
filters terminating the sides.
5.7 Summary
The passive nonlinear filter structure has many musically useful features:
2. The coefficient variation is specialized: we change the coefficient only when the stored
energy in the internal state is crossing zero. When the energy state is building up
or dissipating, we hold the coefficient constant. Therefore, there is neither creation
nor loss of energy. The result is that we may introduce a filter of this type into
a feedback loop with no worries about system stability; and the nonlinear effect is
completely decoupled from system loss considerations.
3. The coefficient variation is independent of the overall evolution of the musical tone.
This means that multiple attack transients may be introduced into the system while
it is still running without having to reset the parameters. The variation control
parameters are constant for a given physical model.
4. The nonlinear filter is actually a correct physical model of a real passive nonlin-
ear physical system. It may, therefore, be connected into any physical model in a
physically intuitive way.
CHAPTER 5. THE PASSIVE NONLINEAR FILTER 156
(a) The rate of spreading may be adjusted continuously from very slow to very fast
with one parameter.
(b) The region of the spectrum affected by the nonlinearity may be tuned, so that
energy in modes of a particular region of the spectrum will spread more quickly
than energy in other regions.
(c) Combining these control parameters, one may construct a group of cascaded,
or individually attached filters tuned to particular regions of the spectrum,
and given specific spreading–rate parameters, thereby, shape the way in which
energy will spread through the various regions of the spectrum over time.
6. We have been able to create gong-like sounds, easily and intuitively, using a tuned set
of nonlinear filters attached to the boundary terminations of a 2–D Digital Waveguide
Mesh. The addition of the nonlinear filters changed the mesh sound from that of a
spoon hitting a tin plate, to that of a smoothly evolving large cymbal crash.
7. The structure can be generalized. We use a one–pole allpass formulation here, be-
cause it is easy to understand; it is efficient; and it works well enough for our im-
mediate purposes. However, the passivity–preserving method of coefficient variation
we use may be applied to any filter with an internal feedback state.
Chapter 6
The Wave-Decomposed
Mass-Spring
157
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 158
+ z-1
–
Thus far we have worked with the digital waveguide modeling of distributed systems,
using delay lines to model the time delay in the system, and we have converted lumped
impedances at string terminations into traveling wave transfer functions. In this chapter,
we will re-interpret lumped systems as distributed systems a through change of variables.
This will allow us to combine lumped systems in modular ways, and to access specialized
internal state signals within the wave-decomposed lumped impedances.
In the first part of the chapter, we will study a small tunable feedback loop, and
re-interpret it as a wave-decomposed model of a mass-spring oscillator. We will then
couple several of these mass-spring systems together in a wave-decomposed manner at
a scattering junction. This work was first published in (Van Duyne, 1997; Van Duyne,
1998). In the remainder of the chapter, we will use these basic concepts and re-derive a
nonlinear mass-spring system as a piano hammer or felt mallet and couple it to a string
or a membrane. The piano hammer work was first published in (Van Duyne et al., 1994;
Van Duyne and Smith, 1995d)
the allpass filter. This will result in a delay loop that oscillates at that frequency. That
is, we want,
H(ejθT ) = ejθT (6.1)
a0 + z −1
H(z) = , (6.2)
1 + a0 z −1
there is in fact no solution for a0 given arbitrary θ. This should be obvious since the phase
response of a one-pole allpass is a phase delay, not an advance, ranging from 0 to −π.
Hence, we put a sign inversion in the loop, as in Figure 6.1 to introduce a phase shift of
π which makes the equation solvable in the following form,
An alternative view of this loop is shown in Figure 6.2. It can be viewed as a waveguide of
half-sample length, terminated on one end reflectively and on the other end by an allpass
filter representing some purely reactive mass- or spring-like termination.
Since the feedback loop in Figure 6.2 is a waveguide, and therefore a traveling wave
structure of some kind, and since it only oscillates at one frequency, it is natural to imagine
that it may be some kind of a traveling wave decomposition of a second-order mass-spring
(inductor-capacitor) oscillator. If we open up the loop in Figure 6.2 into the form shown
in Figure 6.3, and assign traveling velocity wave variables to it, we may write,
V − = z −1 HV + (6.5)
If we interpret the input and output signals to be a velocity wave decomposition, then we
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 160
z-1/2
–1 H
z-1/2
v+(n) z-1
v–(n) H
z-plane 1 + ejθTH
1 2
1 – ejθT H
V =V++V− (6.6)
Similarly, we may choose an arbitrary reference impedance, R0 , and form the following
force wave relation,
F = F+ + F− (6.7)
F+ + F−
R(z) = (6.8)
V++V−
V+−V−
= R0 + (6.9)
V +V−
1 − z −1 H
= R0 (6.10)
1 + z −1 H
Using a geometric argument, it can be seen from Figure 6.4 that the numerator and
denominator of R(ejθT ) lie on a diameter of a unit radius circle with center z = 1. By the
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 162
k
f
m
v
basic geometrical theorem, the numerator and denominator vectors form a right angle at
the origin, and their phase difference is therefore −π/2. R(ejθT ) must be purely imaginary,
i.e., it represents a purely reactive mass-spring-like system.
Making the bilinear transformation to the s-plane,
α−s
z −1 −→ (6.11)
α+s
we obtain, , -
2R0α
(1−a0) s
R(s) = , - (6.12)
1+a0
s2 + α2 1−a0
Noting that the impedance function of the mass-spring system in Figure 6.5 system can
be described as F (s)/V (s) = ks/(s2 + k/m), we see that a convenient interpretation of
Equation 6.12 is to take
2R0 α
k= , (6.13)
1 − a0
and,
2R0
m= . (6.14)
α(1 + a0 )
Recalling that a0 = − cos θ, we have,
2R0 α
k= , (6.15)
1 + cos θ
and,
2R0
m= . (6.16)
α(1 − cos θ)
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 163
m4
m1
m2
m3
k1 k4
k2 k3
kL
As θ approaches DC, m becomes larger and larger. And as θ approaches π, or the Nyquist
frequency (which maps onto infinite frequency in the s-plane), k becomes stiffer and stiffer.
This is consistent with real mass and spring systems.
Now that we have the mass-spring oscillator in a wave decomposed form, we can couple
them together via the standard sort of scattering junctions used in digital waveguide
modeling or transmission line theory. Figure 6.6 shows a set of N mass-spring oscillators
(in this case N = 4) joined together at a massless rigid rod which is in turn connected
to a coupling impedance, in this case a stiff spring with stiffness coefficient, kL . We can
see that this is a series junction since the velocity of the individual mass-spring systems,
measured at the spring end of the system, are constrained to equal junction velocity, VJ .
Further, the sum of the mass-spring forces balance the junction force, FJ . We have the
equations,
Vi = VJ , i = 1, 2, . . . , N (6.17)
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 164
Vi+
Hi
~ 2 Σ Ri Vi+
Σ
–
VJ 1
z–1 Σ RL + Σ Ri
Vi–
−Σ Ri
+
FJ
and,
N
$
Fi = FJ (6.18)
i=1
Note that this system is equivalent to a set of parallel LC-circuit oscillators connected
in series and terminated with a capacitor load, also in series. For the sake of understanding
the load element, if the mass-spring system is terminated with a very stiff spring, that is
kL is very large, then the system behaves much as if the four spring oscillators were just
nailed to the floor. There would be very slight coupling and the modes of the coupled
system would be essentially the same as the modes of the independent oscillators. In
the electrical domain, this would be equivalent to terminating the loop with a very small
capacitance, which would be much like opening up the circuit.
Now the modes of interest in such systems are the poles of the impedance function.
These poles are at frequencies where a driving force produces a zero velocity. Or, saying it
the other way, these are the natural frequencies in the force signal felt at the driving point
when the driving point is constrained to very slight motion (or held fixed in position).
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 165
Figure 6.7 shows a digital implementation of this mildly coupled system. Since the VJ
signal is so close to zero in the very stiff spring junction loading case (in which we are
interested), it is therefore a useless output signal. Instead, FJ may be easily computed as
shown. The multi-dimensional signal on the left is just a set of one-multiply oscillators
as described earlier (which may be implemented in parallel if desired). The summation
element without a tilde computes the values, vi− = vJ − vi+ . The summation element with
the tilde computes a scaled sum as shown in the diagram. If the number of mass-springs
in the system, N , is chosen as some power of 2, and the arbitrary reference impedances
of the wave-decomposed mass-spring systems are all taken to be equal to one over the
7
number of mass-springs (so that Ri = 1), then the number of multiplies can be reduced
7
to one per mode plus possibly two more for the first-order junction filter, 1/(RL + Ri ).
While it is easy to tune the oscillating loop, it is a little tricky to see what to do with
the coupling filter. However, it seems that an approach such as that described in Chap-
ter 2 for coupled strings, previously published in (Van Duyne and Smith, 1995b), can be
applied here, since the coupling of wave-decomposed mass-spring systems and the cou-
pling of waveguide string systems are anatomically identical from the scattering junction
perspective. This calibration approach was first published in (Van Duyne, 1997).
A theoretical single mode loop filter, L(z), may be found whose magnitude response
at the various targeted modal frequencies is equal to the per sample attenuation rate of
the respective modes; then, by manipulating the loaded scattering junction equations, it
7
can be seen that the coupling filter, 1/(RL + Ri ), may be expressed as a function of
L(z) as follows:
2 (1 − L(z))
CouplingF ilter = (6.19)
1 + N + (1 − N )L(z)
where N is the number of modes in the coupled mode system. Note that the order of the
coupling filters is the same as the order of L(z).
Since the frequency-dependent decay rate profile of the coupled mode filter is localized
in one coupling filter, it is easy to make qualitative modifications to the sound color.
It is usual in most materials that high frequencies tend to die out more quickly, than
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 166
lower frequencies. Therefore, the theoretical loop filter L(z) described in the preceding
paragraph, which represents the frequency dependent decay rate profile, is lowpass in
nature. Since high frequencies in metal tend to resonate a little longer than they do in
wood, it is also straightforward to control the metallic vs. wood-like quality of the sound
generated by this coupled mode model with a single slider which adjusts the amount of
lowpass characteristic in the L(z) filter. Calibrated examples of this were presented in
(Porcaro et al., 1996).
initial
HAMMER v0δ(n) hammer
m, k, µ velocity
WAVEGUIDE
STRING Rh(n)
velocity waves
delay A1(z) L2(z) delay
R0 SCATTERING R0
−1 −1
JUNCTION
delay L1(z) A2(z) delay
purpose of real-time sound synthesis. We have therefore sought to find an efficient and
natural wave theoretic model of the piano hammer, or felt mallet, which may be attached
to the digital waveguide string model and to the 2-D digital waveguide mesh membrane
model.
The hammer system is decomposed into wave variables to simplify computation and to
expedite interconnection with the traveling wave string model. The hammer felt is viewed
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 169
vk
f m
k
v vm
First we consider a linear mass and spring system, as shown in Figure 6.9. We wish to
define the equations of motion for a mass and spring system driven at the spring end by
an external force, where the mass has an initial velocity at time zero. Since the mass and
spring are in parallel, we may observe that the driving point force applied to the left side
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 170
of the spring, f , is equally applied to the spring compression and to the mass,
f = fk = fm (6.20)
Also, the driving point velocity, v, is equal to the sum of the spring compression velocity
and the mass velocity,
v = vk + vm (6.21)
where f (t) is the force applied on the spring, x(t) is the compression distance of the
spring, v(t) is the velocity of compression, and k is the spring stiffness constant. Taking
the Laplace transform of (6.22), we can find an expression for Vk (s),
dvm (t)
fm (t) = m − mv0 δ(t) (6.24)
dt
where mv0 δ(t) represents an initial momentum impulse setting the mass in motion at
velocity v0 , we may find an expression for Vm (s),
Combining Equations (6.20), (6.21), (6.23) (6.25), we compute the driving point admit-
tance relation for the mass and spring system in Figure 6.9,
f(t) s2 + k/m
ks
v(t)
v0δ(t) 1/s
The admittance function, (s2 + k/m)/ks, is the steady state response of this second-
#
order system. Note the admittance zeros are at ±j k/m, and the system oscillates at
that frequency. The v0 /s term represents the transient effect of the time zero momentum
impulse on the mass.
Figure 6.10 interprets Equation (6.28) as a system with one output, V (s), and two
inputs, F (s) and ∆(s): F (s) drives the steady state part of the system, while ∆(s) drives
the transient part.
Earlier in the chapter, we applied a more intuitive approach to deriving the wave variable
decomposition for a mass and spring oscillator. Here, we apply more rigor, in order to
carry forward the physical variables, and apply a momentum pulse excitation, and to
model the nonlinear hammer/string interactions.
We begin by defining wave variables for the lumped impedance in a manner analogous
to distributed systems (Kuo, 1966; Fettweis, 1986). We may define F = Fin + Fout , where
Fin is viewed as a force wave traveling into the impedance, and Fout is viewed as a force
wave traveling out of the impedance. Similarly, we may define V = Vin + Vout . In the
distributed case, waves actually travel a distance over time; and there is a wave impedance
relation between the force and velocity waves traveling in the same direction determined
by the parameters of the medium in which the waves are traveling. In the lumped case,
the waves may only be understood to be traveling instantaneously; and the waves are
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 172
not traveling in any particular medium. However, we may still apply distributed system
analysis methods to the system to obtain a wave-decomposed interpretation of the lumped
impedance.
We may define an arbitrary reference impedance, Rh , and obtain a wave impedance rela-
tion between force and velocity waves,
Note that Rh is truly arbitrary, aside from being a positive real number. We will make
good use of this fact later on. Making the change of variables from F and V to Vin and
Vout , we obtain a velocity wave transfer function from Equation (6.28),
s2 − (k/Rh )s + k/m
Vout (s) = Vin (s)
s2 + (k/Rh )s + k/m
v0 k/Rh
+ 2 (6.30)
s + (k/Rh )s + k/m
To move from the continuous physical system to the discrete digital filter, we again use
the bilinear transform from the s-plane to the z-plane,
1 − z −1
s←α (6.31)
1 + z −1
taking α = 2/T , where T is the sampling interval, to obtain best frequency response at
the low end of the frequency range.
Converting a continuous time system to the digital domain often involves excitation im-
pulses, which are infinite bandwidth in the continuous domain. The internal force or
velocity wave signals within the digital system, after a band-limited conversion using the
bilinear transform will be inherently band limited since they will be coming from some
other well-defined digital system. However, the impulse signal which drives the transient
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 173
portion of the system response had been defined in continuous time. ∆(s) (defined as the
Laplace transform of the continuous impulse function) has infinite frequency bandwidth,
but a digital impulse may only have bandwidth up to half the sampling rate, π/T , where
T is the sampling interval. To make a proper conversion from the continuous time impulse
to the discrete time impulse, we must first band limit the continuous time impulse to π/T
and then sample it at T .
% ∞
F ∆
δ(t) −→ ∆(jω) = δ(t)e−jωt dt ≡ 1, ∀ω
−∞
∆(jω) = 1, |ω| ≤ π/T
Band Limit ∆
−→ ∆T (jω) =
0, |ω| > π/T
% ∞ % π/T
F −1 ∆ 1 iωt 1
−→ δT (t) = ∆T (jω)e dω = eiωt dω
2π −∞ 2π −π/T (6.32)
Sample 1
−→ δd (n)
T
where,
1, n=0
∆
δd (n) = (6.33)
0, n "= 0
This result says that when we move the impulse function from continuous time to discrete
time, we must scale it by the sampling rate.
Band Limit
∆(s) −→ (1/T )∆(z) (6.34)
This makes intuitive sense, since we would desire integration over a continuous impulse
function to be equivalent to making a weighted rectangular sum over the digital impulse.
% ∞ ∞ ! "
$ δd (n)
δa (t) dt = 1 = T (6.35)
−∞ n=−∞
T
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 174
(Rh) H(z)
Picking up the argument from Equation 6.30, we must apply the bilinear transform and
we must also band limit the continuous time impulse function mapping δ(t) → δ(n)/T .
This leads to the correct second-order digital transfer function,
b0 + b1 z −1 + z −2
Vout (z) = Vin (z)
1 + b1 z −1 + b0 z −2
(v0 /2αT )(1 + 2z −1 + z −2 )
+ (6.36)
1 + b1 z −1 + b0 z −2
∆ 2(kRh − mRh α2 )
b1 = (6.38)
mRh α2 + mkα + kRh
mkα
Rh = , (6.39)
mα2 + k
a unit of delay may be factored out of the second-order transfer function. The result is
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 175
m v0
k(x)
R0
where
a0 + z −1
H(z) = (6.41)
1 + a0 z −1
! "
1 1 + 2z −1 + z −2
G(z) = (6.42)
2αT 1 + a0 z −1
with a0 defined as
k − mα2
a0 = (6.43)
k + mα2
Combining Equations (6.39) and (6.43), we arrive at a simple relationship between Rh
and a0 :
mα
Rh = (1 + a0 ) (6.44)
2
The next step is to connect the mass and spring system to a string, as shown in Figure 6.12.
Since we have decomposed the lumped mass and spring system into traveling waves, and
have picked an associated wave impedance, Rh , we may join the system to the string
system at a lossless 3–port scattering junction as shown in Figure 6.13.
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 176
vh− vh+
v1+ v2−
z−Μ z−Ν
v1−
S v2+
z−Μ z−Ν
∆ ∆
We define vout = vh + and vin = vh − , as is shown in Figure 6.11, so that traveling wave
signals entering the scattering junction are superscripted with a plus sign, and traveling
wave signals leaving the junction are superscripted with a minus sign. At the junction
point where the mass and spring system connects to the string, the velocity of both sides
of the string, v1 and v2 , and the driving point velocity of the spring, vh , must all equal
vJ , the junction velocity.
∆
v1 = v2 = vh = vJ (6.45)
In addition, the sum of the forces exerted by the string halves and the mass and spring at
that point must be zero, since it is a massless point,
∆
f1 + f2 + fh = fJ = 0 (6.46)
Combining the two series junction constraints given in (6.45) and (6.46) with the wave
variable definitions and wave impedance relations, we can derive the lossless scattering
equations for the interconnection of the wave decomposed mass and spring with the string
halves:
2 (R0 v1 + + R0 v2 + + Rh vh + )
vJ = (6.47)
2R0 + Rh
v1 − = vJ − v1 + (6.48)
v2 − = vJ − v2 + (6.49)
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 177
vh − = vJ − vh + (6.50)
These equations indicate that, as a wave is coming into a junction, some portion of the
wave reflects off the junction and travels back where it came from, while the rest of it
travels into the junction and is divided among the other outgoing waves. The relative
proportions of this scattering effect is dependent only on the relative wave impedances of
the interconnected elements.
Figure 6.14 shows how the mass and spring system may be attached to a membrane
modeled using the 2-D digital waveguide mesh. Junctions marked J are lossless 4-port
junctions. The mass and spring system is attached at the 5-port scattering junction
marked S. Equations (6.47) through (6.50) must be modified appropriately to compute
the 5-port junction. Note ”PNF”, or passive nonlinear filter components as described in
the last chapter are attached at the edges of the 2-D mesh. This is a basic structure to
model a gong with energy spreading through the modes using the 2-D mesh, the passive
nonlinear filter and the wave-decomposed hammer models together. That felt hammer, or
mallet, will sink into the membrane until it is thrown away by sufficiently strong returning
force waves.
xk = (1/k)(fh − + fh + ) (6.51)
= (Rh /k)(vh − − vh + ). (6.52)
vh–
z-1 z-1 z-1 z-1 WDH z-1 z-1
v1– +
v1+ vh
v2+
z-1 z-1 z-1
z-1
J v2– S v4– J
z-1 z-1 z-1
-1
v4+ z
v3– v3+
Figure 6.14: Attaching the Wave Digital Hammer to a 2-D Digital Waveguide Mesh
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 179
vh−(n) vh−(n−1)
v1+(n) z–1
v1−(n) + a0(n)
S H
v2+(n) − u1(n)
vh+(n)
v2−(n)
u2(n)
a0(n)
Rh(n) u3(n) vI(n) G
a0(n)
R X
u4(n)
a0(n) xk(n) L
u5(n) a0(n+1) a0(n)
K z–1
Referring to Figure 6.15, the system loop containing S, H, and one unit of delay, z −1 ,
performs the essential mass and spring modeling. S is the scattering junction defined by
Equations (6.47) through (6.50). H is the time–varying allpass filter defined by Equa-
tion (6.41). This loop oscillates at an instantaneous frequency of arccos(−a0 (n)) and
models the second-order mass and spring system. Incidentally, if the computation of S is
replaced with,
vh − (n) = −vh + (n), (6.54)
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 180
which is physically equivalent to replacing the string or membrane portion of the system
with a rigid wall, then the S—z −1 —H loop stands alone as an efficient, one-multiply
sinusoidal oscillator.
G is the modified integrator defined by Equation (6.42) which integrates the incoming
initial hammer velocity impulse signal, vI (n), taking into account the wave decomposition
and the nonlinear effects of the hammer felt. Signal u3 (n) is a combination of the velocity
waves traveling in the hammer system which represents a normalized force of compression
on the hammer felt. X computes the actual felt compression according to Equation (6.53),
taking advantage of the fact that the force of compression on the felt is instantaneously
proportional to the felt compression. K is a look–up table for the stiffness coefficient,
a0 (n), indexed by felt compression, which may be defined by (6.43), replacing k with
the compression dependent stiffness function, k(xk ). R computes the time–varying wave
impedance of the hammer system from a0 according to Equation (6.44). Note that Rh (n)
is zero when the hammer is not touching the string, that is when k(xk ) = 0, which means
that there is no effect on the rest of the system when the hammer is not in contact with the
string, although the motion of the hammer is still computed by the loop. As the hammer
felt compresses, Rh (n) ramps up, representing the increased impedance of the compressed
felt on the string.
For the moment, assume L multiplies by 0, so that u4 (n) ≡ 0. This represents the full
lossless hammer model. We will return to the definition of L after studying the effect of
loss in the felt in the following section.
Hysteresis has been identified as an important factor in the piano tone (Boutillon, 1988;
Stulov, 1995). Consider a model of the piano hammer where the felt is represented as a
nonlinear spring in series with a nonlinear dashpot whose loss coefficient, µ, is dependent
on felt compression, as shown in Figure 6.16.
In the linear case we may say,
where f (t) is the force on the felt, x(t) is the felt compression, and v(t) = ẋ(t) is the
velocity of compression. In the nonlinear case, we take the spring stiffness coefficient and
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 181
m
x(t), v(t)
k(x) µ(x)
the resistive loss coefficient for the dashpot both to be compression dependent giving us
k(x) and µ(x). For times t near t0 , defining x(t0 ) = x0 and v(t0 ) = v0 , we may say that
the force on the felt is,
where we have defined the equivalent nonlinear spring as shown in Figure 6.17 to have a
stiffness function which accounts for both the springiness and the loss in the felt model
thus,
∆ µ(x0 )
k̃(x0 , v0 ) = lim k(x0 ) + v(t) (6.59)
t→t0 x(t)
Our first assumption must be that we can define a k̃(x0 , v0 ) at all. The fundamental
nonlinear assumption is that both k(x) and µ(x) are zero when the hammer is not in
contact with the string. Since we take t = 0 to be the time of initial contact, x(0) is zero,
but v(0) may be anything. We therefore require µ(x0 )/x0 to be defined at x0 = 0. We
have
µ(x0 ) ∆ &
lim = µ (0) (6.60)
x0 →0 x0
Therefore, we require now that µ(x) be continuous at x0 and have a first derivative there.
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 182
m
x(t), v(t)
∼
k(x,v)
Now k̃(x0 , v0 ) is well defined, but it is still a function of both displacement and velocity,
requiring a two-dimensional look-up table to implement. It would be convenient if we could
find a way to compute it by consulting two one-dimensional tables in sequence, instead of
indexing a true two-dimensional table.
Let us assume that we could find k̃(x0 , v0 ) by adjusting the indexing of k(x0 ) according
to some function of velocity,
for some small–valued function, ε(x0 ). If this is possible, we can compute k̃ by adjusting
x0 according to the ε table and velocity, and then index the k table. If ε(x0 ) v0 is small,
we may approximate k(x0 + ε(x0 ) v0 ) by a truncated Taylor series expansion as
Plugging (6.59) into the left hand side of Equation (6.61) and (6.62) into the right
hand side, we can solve for ε(x0 ):
µ(x0 )
ε(x0 ) ≈ (6.63)
x0 k& (x0 )
∆ µ(x0 )
ε(0) = lim
x0 →0 x0 k & (x0 )
µ& (x0 )
= lim
x0 →0 x0 k && (x0 ) + k & (x0 )
µ&& (x0 )
= lim
x0 →0 x0 k &&& (x0 ) + 2k && (x0 )
..
.
µ(n) (x0 )
= lim (6.64)
x0 →0 x0 k (n+1) (x0 ) + nk (n) (x0 )
where (xk (n)−xk (n−1))/T approximates the velocity of felt compression. We have derived
the mathematical justification for this offset, along with its basic limitations. However,
we may understand this offset to the stiffness table index as a direct implementation of
felt hysteresis by realizing that a resistive loss in the felt will cause the felt to feel stiffer
when being compressed and to feel less stiff when decompressing. The springiness of the
felt is proportional to the felt compression, whereas the effect of loss is in the direction of
felt compression velocity. Therefore, (6.65) offsets the index to the stiffness look-up table,
K, such that, when the felt is compressing, the spring “constant” is greater, and when the
felt is relaxing, the spring “constant” is smaller. ε(xk ) should be zero when the hammer
is not in contact with the string and should ramp up smoothly from zero as defined in
(6.63).
CHAPTER 6. THE WAVE-DECOMPOSED MASS-SPRING 184
20
18
16
14
Hammer Force (N)
12
10
0
0 0.5 1 1.5 2 2.5 3
Time from Impact (ms)
Figure 6.18: Calculated Forces on Hammer Felt for v0 = 1,2,3, and 4 m/s
Figure 6.18 shows the hammer force response curves, computed at an audio sampling rate
of 1/T = 44100 samples per second, given initial hammer strike velocities of v0 = 1, 2, 3,
and 4 m/sec. Note the multiple force peaks which are caused by hammer interaction with
return waves from the agraffe. In this case, we used the lossless version of our model and
ignored felt hysteresis; in addition, we did not account for loss and stiffness in the string
itself; further, we let the hammer interaction be localized at one point, rather than use a
weighting function to spread the force interaction over a finite area. In these respects, we
differ from Chaigne and Askenfelt. Nevertheless, despite these variations, our results are
qualitatively similar, and fairly close in magnitude. Our model generated slightly lower
hammer forces and slightly longer interaction times.
Further work will include the careful measurement of piano hammer and string data,
and the calibration of our models to the full extent permitted within the digital waveguide
approach. In addition, we plan to develop physically correct calibrated 2-D waveguide
mesh drum and mallet models.
Chapter 7
Much effort has been undertaken in the automated but musical performance of acoustic
piano (Risset and Van Duyne, 1996; Risset and Van Duyne, 1992), and in the development
of new microtonal keyboards (Van Duyne, 1990) supporting up 72 notes per octave (Maneri
and Van Duyne, 1986). In addition, work has been done on modeling the haptic interface
(Gillespie, 1996). We present here several developments for piano synthesis using digital
waveguides and a commuted body response. The musical use of commuted body response
filter structures appears to have been first published independently in (Karjalainen et al.,
1993) and (Smith, 1993). The basic commuted synthesis for piano approach is described
in (Smith and Van Duyne, 1995) and (Van Duyne and Smith, 1998). Work presented in
this chapter was originally published in (Van Duyne and Smith, 1995b).
7.1 Background
The piano and its parts have long been a topic of study, with an eye toward better un-
derstanding of the acoustics (Weinreich, 1977), toward more reliable numerical modeling
of the piano physics (Chaigne and Askenfelt, 1994a; Chaigne and Askenfelt, 1994b) and
understanding the piano hammer (Boutillon, 1988; Zhu and Mote, 1994; Stulov, 1995;
Suzuki, 1987; Hall, 1986; Hall, 1987a; Hall, 1987b; Hall, 1987c; Hall, 1988; Hall, 1992), to-
ward the development of high-quality sound synthesis (Van Duyne et al., 1994; Van Duyne
and Smith, 1993b), and toward the development of cost-effective sound synthesis (Kar-
jalainen et al., 1993; Smith, 1993; Smith and Van Duyne, 1995; Van Duyne and Smith,
1992; Van Duyne and Smith, 1994). Our interest in this chapter is in the category of sound
186
CHAPTER 7. THE COMMUTABLE PIANO HAMMER 187
V
(R0) (R0)
FS
important respects: First, the felt itself is nonlinear in that it gets stiffer the more it is
compressed (Chaigne and Askenfelt, 1994a). Second, the hammer leaves the string at
some point, which corresponds to a shift in the models from a string interacting with a
hammer to a string vibrating freely. A “linearized” analysis of the piano hammer-string
system follows.
∆
RS = FS /V = 2R0 , (7.1)
where FS and V are the Laplace transforms of force and velocity at the driving point
and R0 is the wave impedance of the string, which is dependent on the square root of
string tension times string density. The 2R0 in the above equation results from taking
into account the impedance of both halves of the string, as seen at the driving point.
In the case of the piano hammer-string interaction, waves from the agraffe return and
interact with the hammer before it leaves the string for most notes. However, the return
waves from the bridge end of the string do not make it back before the hammer leaves the
string, except in the very highest notes. Therefore, we formulate a half-terminated string
impedance taking into account a one-sided termination at the agraffe end, as shown in
Figure 7.2. The velocity response of a force impulse at the strike position is an impulse
followed by an inverted impulse which returns reflected off the essentially rigid agraffe end
CHAPTER 7. THE COMMUTABLE PIANO HAMMER 190
RH
v0
m
k
V FH
FS , -
∆ FS 2R0
V = 1 − e−sT =⇒ RS = = (7.2)
2R0 V 1 − e−sT
Let us assume that the hammer is of the form shown in Figure 7.3, essentially a mass and
spring system, where the spring represents the felt portion of the hammer. We find that
the impedance relation is:
! "
v0 ∆ ks
FH = RH V − where RH = (7.3)
s s2 + k/m
and where v0 /s represents the step input of the initial striking velocity. RH has a zero at
#
DC and two conjugate poles indicating an oscillation frequency of k/m.
When the hammer is in contact with the string, we take the velocity of the string equal
to the velocity of the spring end of the hammer, and the force on the string equal and
opposite to the force on the spring, FS = −FH . Plugging in the string impedance relation,
CHAPTER 7. THE COMMUTABLE PIANO HAMMER 191
V = FS /RS , we find:
! " ! "
∆ v0 FS v0
FS = −FH = −RH V − = −RH − (7.4)
s RS s
! "
RH RS v0 ∆ , E -v
E 0
=⇒ FS = = RH ERS (7.5)
RH + RS s s
In the un-terminated string case, we define H∞ as the transfer function from the
initial striking velocity step to the force experienced by the string (and, equivalently, by
the hammer felt). Taking the hammer to be a simple mass-spring system, we find that the
H∞ transfer function is now a damped second-order system, which looks just like the RH
except for the under-bracketed damping term (7.6). For practical physical parameters,
this is an over-damped system with real poles.
! "E
∆
E
E ks E ks
H∞ = RH ERS = E 2R0 = (7.6)
s2 + k/m s + 2Rk 0 s + m
2 k
F GH I
For the one side terminated string case, we define HT . Again, we find HT is like RH but
for the under-bracketed damping term, which in this case contains an interesting time
delay part.
! "E! "
∆
E
E ks E 2R0 ks
HT = RH ERS = E = , - (7.7)
s2 + k/m 1 − e−sT s2 + k k
1 − e−sT s + m
2R0
F GH I
7.2.5 Implementation
H∞
HT = (7.8)
1 − e−sT H∞
This allows a simple recursive hammer filter implementation of the form in Figure 7.4.
Since, in this case, the hammer never leaves the string (from the linear system assump-
tion), we may prefer to include a cutoff envelope in the feedback loop to terminate the
reflections from the agraffe at some point, or better, break out the first few reflections in
a feed-forward formulation as in Figure 7.5.
CHAPTER 7. THE COMMUTABLE PIANO HAMMER 192
v0
s + H∞ FS
Delay
v0
s H∞
Delay H∞ + FS
Delay H∞
ks ∆
H∞ = k k
= sLp , (7.9)
s2 + 2R0 s + m
v0δ + Lp FS
s Delay
0.6
-50
amp
0.4
dB
-100
0.2 -150
0 -200
0 1 2 3 0 5 10
ms kHz
DECONVOLUTION RATIO SPECTRUM
40
0.4
20
amp
dB
0.2 0
-20
0
-40
0 1 2 3 0 5 10
ms kHz
Figure 7.7: Middle-C (261 Hz) Struck Hard: Force Signals Computed Using the WDH
Parameterized with Physical Data Taken from (Chaigne and Askenfelt, 1994b)
CHAPTER 7. THE COMMUTABLE PIANO HAMMER 195
ms kHz
MULTI-PULSE RESULT RATIO SPECTRUM FIT
20
0.6
10
amp
0.4
dB
0
0.2 -10
0 -20
0 1 2 3 0 5 10
ms kHz
force signal out of it. It appears to be a recursively damped impulse train, with some DC
blocking, eventually centering the signal around zero. This is what was predicted by the
linear hammer analysis as shown in Figure 7.6.
Digital Hammer and the solid lines are the result of the filter fits. Note that the phase
information in the sixth-order ratio spectrum fit results in a very good time domain ap-
proximation. In general, the coefficients of the lowpass filter part of this structure will be
highly dependent on strike velocity, the harder the strike, the wider the bandwidth. How-
ever, the equalization part of this structure is reasonably consistent over strike velocity,
and, in the simplified model, may be held constant over strike velocity, although it will
vary with piano key number.
NOISE
brightness control
TIME VARYING ENV1
gain control
FILTER ENV2
NOISE
x(n)
EXCITATION SIGNAL
+ Hammer String
Filter Model
Low band excitation pulse Low Mode
for low mode resonator Soundboard
Resonator
0
dB
-50
-100
0 2000 4000 6000 8000 10000
Hz
40
20
dB
-20
-40
0 200 400 600 800 1000
Hz
Figure 7.13: dB Frequency Response of a Recorded Piano Soundboard Tap (above) and a
Close-Up of the Lower Frequencies (below)
CHAPTER 7. THE COMMUTABLE PIANO HAMMER 199
20
dB
-20
-40
0 2000 4000 6000 8000 10000
Hz
40
30
20
dB
10
-10
0 200 400 600 800 1000
Hz
Figure 7.14: Synthetic Soundboard Tap Using a Swept 1-Pole and Noise
CHAPTER 7. THE COMMUTABLE PIANO HAMMER 200
NOISE
Figure 7.15: “Pedal-Down” Synthesis of Dry Soundboard Tap Plus “Wet” Open Strings
Tap
In Figure 7.10 we show such a soundboard impulse response synthesis system. White
noise is being fed into a time-varying lowpass filter whose gain and bandwidth are both
being controlled by envelopes. One possible implementation of this would use a one-pole
lowpass filter whose denominator coefficient is being swept toward −1, thereby shrinking
the bandwidth. If the numerator coefficient is modified to keep gain at DC constant,
the amplitude envelope might even be dispensed with in a simplified system as shown
in Figure 7.11. Alternatively, more elaborate noise filtering systems may be developed,
possibly breaking the noise into frequency bands which could be treated independently to
model to some particular impulse response. Figure 7.12 shows such an example. Figures
7.13 and 7.14 compare the dB frequency response of a real measured piano soundboard
tap and a synthesized soundboard tap based on the algorithm in Figure 7.11.
One of the signature sound effects of piano performance is carefully articulated use of
the sustain pedal, i.e. raising and lowering the string dampers. A full set of pen strings
coupled into the soundboard obviously increases the resonator complexity. However, just
as the dry soundboard impulse response may be commuted to the point of excitation,
similarly we may commute the entire sampled impulse response of the soundboard plus
open strings with dampers raised to the point of excitation to obtain the resonant effect
of the sustain pedal. Further, since there are so many resonating partials, the spectral
CHAPTER 7. THE COMMUTABLE PIANO HAMMER 201
response is essentially flat and filtered white noise with a long slow decay rate makes a
good synthetic approximation. Figure 7.15 Shows a simple implementation taking the dry
soundboard tap to have a T60 decay time of 1/3 second, and taking the decay time of the
open strings to be approximately 15 seconds.
Other Applications
The piano excitation model described above, comprising the linear hammer filter in con-
junction with the dry and wet soundboard synthesis methods, makes a very efficient way to
enhance other percussive instrument models ranging from simple modal synthesis, modal
stochastic event modeling (Cook, 1996) or the coupled mode synthesis (Chapter 6), to the
waveguide mesh models in Chapters 3 and 4. Numerous examples were demonstrated live
at (Porcaro et al., 1996).
7.6 Wrap Up
We have wandered through the wave equations, difference representations and multi-
dimensional waveguide mesh representations, applications of traveling wave decomposition
of lumped impedances, nonlinearities and coupled systems. This last chapter investigated
some simplified approaches to piano sound synthesis. The Appendices will outline several
synthesis techniques tangentially related to and extending the work presented in the main
body of this thesis. Much of this work has been published already in separate conference
proceedings and journal articles in the 1990s; follow-on work is addressed only lightly
herein. It is my hope that the presentation of the material in this form may be helpful to
readers just entering the field to give them a flavor of the tools, techniques, and potential
applications.
Appendix A
202
APPENDIX A. PICK-UP POINT MODULATION 203
y+(n)
−1 −1
y−(n)
0 xp 1
y(n)
Figure A.1: Terminated String and Pick-up Placement Model
is straightforward. For our purposes, we would like to place a pick-up at any continuous
point along the string. This necessitates an interpolation of some kind. If the pick-up is
placed exactly at a sample point, the values of the upper and lower delay lines at that
point are simply added. If the pick-up is to be placed at a fractional distance, α, between
two sample points, then a weighted average of the two adjacent sample values must be
performed. In these preliminary inquiries, linear interpolation is used. The results are
excellent, but there is room for a better interpolation method in extreme cases of pick-
up point motion. Figure A.2 shows a close-up of the implementation of an interpolated
pick-up point.
... Z
-1
Z
-1
Z
-1 ...
α 1−α
y+(n)
y(n)
y-(n)
α 1−α
... Z
-1
Z
-1
Z
-1 ...
Figure A.2: Close-up of the Interpolated Position of the Pick-up
Figure A.3: Slow Continuous Pick-up Point Motion Over the String Length
APPENDIX A. PICK-UP POINT MODULATION 206
y(1 + δ) = y + (1 + δ) + y − (1 + δ) (A.1)
= −y − (1 − δ) − y + (1 − δ) (A.2)
= −y(1 − δ) (A.3)
In other words, to obtain a hypothetical displacement beyond the end of the string, just
flip the sign and read backwards along the string.
Now that we can maintain a continuous motion of the pick-up in one direction indef-
initely, we may introduce the notion of acceleration as well as speed of the pick-up point
along the string. Figure A.5 shows a string loaded with two harmonics at I kHz and 5 kHz
with an accelerating pick-up point to produce expanding glissandi. In this four-second ex-
ample, the pick-up point speed accelerates from 0 to 1000 string lengths per second. Since
a string length is half the wavelength of the string fundamental, the downward gliding
frequencies make it half the way to DC. Note there are also some aliasing sidebands in the
picture relating to the error of linear interpolation. In the four seconds of sound depicted
in Figure A.6, the pick-up point position is being modulated sinusoidally at a rate of 5 Hz,
but its deviation from center is 10 string lengths. Where the double vibratos are at their
furthest separation is when the pick-up point is flying past its center point of modulation
at its greatest speed. Notice that the double vibratos in the upper harmonics cross over
each other.
APPENDIX A. PICK-UP POINT MODULATION 208
∆
xp (t) = xp0 + d sin ωxp t, (A.4)
where xp (t) is the resultant pick-up point placement measured in string lengths, xp0 is the
center point of modulation, d is the deviation measured in string lengths, and ωxp is the
frequency of the pick-up point modulation in radians.
An excellent presentation of how standard FM math works can be found in (Schottstaedt,
1992). With some follow on analysis, a closed form expression for the resultant spectrum
heard from this modulating pick-up can be found as follows:
$
y(t) = yk (t), where (A.5)
kεH
yk (t) = Ak J0 (Ik ) sin φk cos ωk t (A.6)
∞
$
+ Ak Ji (Ik ) cos φk (sin (ωk + iωxp )t + sin ωk = iωxp t) (A.7)
i=odd
∞
$
+ Ak Ji (Ik ) sin φk (cos (ωk + iωxp )t + cos ωk = iωxp t), (A.8)
i=even
(A.9)
where k is the harmonic number, H is the set of harmonics on the string, yk is the
∆
contribution to the total spectrum resulting from the kth harmonic, Ik = πkd is the
∆
modulation index, φk = πkxp0 is the phase offset determined by the position of the
modulation center point, ωk is the frequency of the kth harmonic in radians, and ωxp is
the radian frequency of the pick-up point placement modulation.
This expression indicates that around each of the harmonics on the string, ωk , side-
bands are produced at plus and minus multiples of the pick-up modulation frequency, ωxp ,
and that their magnitudes are dependent on Bessel functions of the first kind operating
on an index based on d, the deviation of pick-up point modulation. These equations differ
from ordinary FM, however, in that the odd sidebands are scaled by cos φk and the even
APPENDIX A. PICK-UP POINT MODULATION 211
Figure A.7: Effects of Constant Speed Plus Modulation Modulating on Pick-up Position
sidebands are scaled by sin φk , where φk is, in effect, the relative position of the pick-up
point modulation center point measured along the standing wave components of each of
the harmonics on the string. When xp0 is at a harmonic node, that is at a position n/k
on the string where n is an integer and k is the harmonic number, then sin φk evaluates
to zero and the even harmonics are zeroed out. On the other hand, when xp0 is at an
anti-node of a harmonic, that is, at a position (n + .5)/k along the string, cosφk evaluates
to zero and the odd harmonics are zeroed out. Sliding the center point between a node
and an anti-node produces a gradual exchange of energy from the even sidebands to the
odd sidebands.
Figure A.7 illustrates a four-second sound created by sliding the center point of pick-
up modulation from one end of the string to the other over the duration of the tone.
The fundamental frequency of the string is 1000 Hz. Four harmonics were loaded onto
the string, at start up. The modulation frequency was 100 Hz and the deviation was 0.1
string lengths. There are more side bands around the upper harmonics due to the greater
effect of the deviation distance on the shorter wavelengths. Observe how the odd and even
sidebands fade in and out as the center point of pick-up modulation glides over the nodes
APPENDIX A. PICK-UP POINT MODULATION 212
A.5 Conclusion
While it is true that the results in the simple case of the ideal string with perfect reflec-
tions at the end points could be duplicated with traditional FM means, nonetheless, the
interesting synthesis area that this opens up is combining FM and physical modeling tech-
niques. There are many possibilities when a low pass or other system filter is placed at the
APPENDIX A. PICK-UP POINT MODULATION 213
end of the string instead of the perfect reflection. Waveguide models can be enriched by
a modulating pick-up point, while on the other hand, traditional FM instruments can be
rejuvenated by the loop filtering methods of physical modeling and waveguide synthesis.
Appendix B
Pitchbendable Allpass
Interpolation
214
APPENDIX B. PITCHBENDABLE ALLPASS INTERPOLATION 215
By combining work done in legato crossfading (Jaffe and Smith, 1995), allpass co-
efficient analysis (Välimäki et al., 1995), and taking note of some basic psychoacoustic
research in just noticeable differences in pitch (Olson, 1967), we find a solution to the
problem.
ad ≈ (1 − d)/(1 − d) (B.1)
So, if an output, y(n), is desired from a fractional point d fractional samples between
samples x(n − 1) and x(n), the output signal can be written:
The discontinuity resulting from changing the coefficient, a0 , can be minimized by keeping
the coefficient value as close to zero as possible. The transient effect of changing the
coefficient rings out at a rate proportional to the series: a, a2 , a3 , . . . We note that if the
fraction delay, d, is kept within the unit range, 0.618 to 1.618, then the corresponding
allpass coefficient, ad remains between −0.236 and +0.236. This means that, with d in
this range, the transient effect of a discontinuity in the coefficient after 5 samples is a
maximum of 0.2365 , of about 62 dB down. In effect, the allpass interpolation filter may
be held to a 5 sample ”warm up” time.
If a delay line length within a feedback loop changes suddenly, there will be a discontinuity
in the signal. If the delay line length is changed gradually or smoothly (using fractional
interpolation of some kind), audio artifacts may not result, but a glissando effect will
result, which may not be desired. An algorithm to create a legitimate legato crossfade
APPENDIX B. PITCHBENDABLE ALLPASS INTERPOLATION 216
DLEN_INT
DLEN
Parameter
AP_COEF Generator
Timing AP_COEF2
Controller 1
AP_COEF1
0
DLEN_INT2 index
DLEN_INT1
AUDIO IN u2(n)
Reader 1 AP 1
u1(n)
… … u3(n)
AUDIO OUT
… … Alternating
Delay Line … Crossfader u6(n)
direction of … …
signal flow u4(n) u5(n)
Reader 2 AP 2
effect is proposed in (Jaffe and Smith, 1995) to solve this problem: Delay line memory is
allocated using a circular buffer and setting up two delay line outputs, or read pointers and
crossfading the output signal between them over a period of 15-30 milliseconds to produce
a realistic legato (not glissando). This works with such a long crossfade time because the
circular buffer is already filled naturally with appropriate waveform material for the 15-30
milliseconds of the crossfade.
B.3 Implementation
By combining the allpass interpolation method, and the legato crossfade method, we can
find a practical structure for a flexible lossless fractional delay line implementation. The
basic principle is to view glissando as lots and lots of very fast, tiny, legato crossfades.
Construct a circular buffer delay line with two allpass interpolated read point outputs;
APPENDIX B. PITCHBENDABLE ALLPASS INTERPOLATION 217
Warm-up Time
Pan Position Function
AP1
Cross Fade pan postion
between AP1 and AP2
AP2
Time
Figure B.2: Timing Diagram for the Alternating Crossfade Between Read Point Outputs
then send updated allpass interpolation coefficients to the allpass every 16 samples and
begin a crossfade. Figure B.1 shows a block diagram of this structure.
The problem with this, as it stands, is that the allpass interpolation filters will be
producing clicks every time a reader is set to a new position. However, the transient
effect lasts only 5 samples if the fractional delay range is maintained between 0618 and
1.618, as we have shown. The 5 sample warm up period can be ignored by using a special
crossfading function which waits 5 samples before beginning the crossfade over to the
newly set allpass reader. When using a 16 sample alternation rate, this leaves 11 samples
to do the actual crossfade, which in practice, is enough. Figure B.2 shows the critical
timing of setting the new allpass coefficients and performing the delayed crossfade.
The human hearing system is only able to detect a finite number of different pitches. Two
tones which are sufficiently close together in pitch become indistinguishable. There is a
just noticeable difference (JND) threshold for human pitch differentiation. The number
of JNDs per octave varies with register, but a representative worst case for our problem
is that there are approximately 280 JNDs between 1000 Hz and 2000Hz. (or, in musical
pitch, this it the approximate range, c6 to c7). (Olson, 1967). A JND in this worst case
range comes out to be about 0.1 samples in a Karplus-Strong feedback loop delay line
APPENDIX B. PITCHBENDABLE ALLPASS INTERPOLATION 218
length for a 1000 Hz tone being computed at a sampling rate of 44.1kHz. It is easy to
show that running the alternating crossfader at a rate of once per clock tick of 16 samples,
and using a maximum glissando rate of one JND per clock tick, that we can gliss an octave
from C6 to C7 in about one tenth of a second (280 × 16/44100 ≈ 0.1). Moreover we do
this very quick glissando crossfading between tones different by one JND, and we wait 5
samples for each new allpass state to settle down before crossfading.
Many fixed-point DSP chips can perform very fast multiply-add operations but do not
support fast divide operations. So computing the allpass coefficient, ad , is hard. On the
other hand, building an interpolation table is also fraught with the trade off between error
and memory wastage. Fortunately, expanding ad in a Taylor’s Series around the point
d = 1 (which is in the middle of its working range, 06.18 to 1.618) provides a solution:
This is a very efficient implementation using only a few multiplies, adds, and possibly,
right shifts. Maximum error in three terms is 0.024 samples. Recall a JND in our worst
case range, 1000Hz, is 0.1 samples. The allpass error using three terms of the expansion
is on the order of a quarter of a JND (meaning it is not noticeable standing alone).
Appendix C
The second element of the spectral structure is that the harmonics of the low piano
string are in fact not harmonic, but instead stretched at a fairly linear rate throughout the
spectrum. The stiffness of thick piano strings in the lowest register causes the sinusoidal
components of the traveling wave on the string to travel faster when at higher frequencies,
thereby spawning harmonic resonances in the string at ever increasing partial spacings
through the spectrum. Stretching was measured for A0 (the lowest note on a conventional
piano) at a rate of 10 Hz over 1000 Hz of spectrum. For example, near the A0 fundamental,
219
APPENDIX C. STIFFNESS USING REGIONS OF FM 220
2000
1500
1000
500
0 10 20 30 40 50 60
Figure C.3: Measured Partial Frequencies in Hz for A0
the separations between partials are near 27.5 Hz. At a height of 1000 Hz in the spectrum,
the separations are near 37.5 Hz, and so on. For the note A1, one octave above A0, the
rate of stretching was considerably lower: about 3 Hz per 1000 Hz. These rates, of course,
vary from piano to piano. Figure C.3 shows the stretching for A0.
The synthesis of low piano tones has been a complex problem due to stretching har-
monics. However we can take advantage of the spectral groupings in the piano spectrum
to build an FM model (Chowning, 1973) of piecewise linear partial separations. To model
a string with fundamental f0 , assign one FM carrier/modulator pair to each of the group-
ings. Let the carrier and modulator frequencies for the ith FM pair be given as ci and mi .
Choose m1 to be f0 and c1 to be 5f0 . With the proper choice of FM Index, this pair can
be used to model a grouping of eight or nine partials. To obtain a piecewise stretching
of the partials, select the parameters of the second FM pair to have a modulator slightly
larger than m1, and a carrier c2 placed eight partials above c1 . Continuing this way with
as many pairs as desired, we can construct a piecewise stretched spectrum arranged in
groupings. We just require m1 < m2 < m3 < . . . < mn to model the stretching rate.
Care must be taken to dovetail the pairs together with a proper choice of the carrier fre-
quencies. We need ci = ci−1 + 4mi−1 + 4mi to insure that the fourth sidebands of each
pair match frequency with the adjacent pair. Note that there is no longer any meaningful
APPENDIX C. STIFFNESS USING REGIONS OF FM 223
c1 m1 c2 m2 cn mn
...
c : m ratio for pairs above the first. The Index should be chosen not too large, to avoid
de-tuned overlap of sidebands from adjacent pairs, and, on the other hand, not too small,
in order to produce enough sideband presence to maintain a coherence of the spectrum.
Mapping the amplitude envelope to the Index envelope seems a good first approximation
here. Figure C.4 shows an outline schematic of the instrument.
The experimental results show that a very good low piano tone can be made using
only four or five of these additive FM pairs. Even with no stretching, i.e. with f0 = m1 =
m2 = . . . = mn , a reasonable approximation of a piano is possible. However, with just the
slightest piecewise stretching introduced, a naturalness and life is infused into the tone
color which is hard to come by in an exactly harmonic spectrum.
where t is time, τ1 and τ2 are the time constants of decay, and α1 and α2 are the relative
scalings of each envelope component. We use a relatively short τ1 to model the decay rate
in the first one or two seconds after the attack, and a longer τ2 to model the second stage
decay rate.
There are several other considerations in the construction of appropriate envelopes: (1)
Higher frequency components of the piano tone die out more quickly than lower frequency
components, necessitating separate parameters for each of the FM pairs used. Also, (2)
louder attacked notes begin with a brighter spectrum, requiring more energy in the higher
pairs at the attack. In addition to the decay envelope differences, (3) the cut-off release
time is much longer for A0 than for A1. The slow release time of the lowest piano notes
is an important part of their timbral signature. (4) The attack portion of the amplitude
envelope of each FM pair is constructed using a rise-rate method where the actual time
before the highest amplitude is reached depends on how high the envelope must rise.
This naturally rounds out the attack a little by de-synchronizing the attack time over the
spectrum. In addition, (5) a constant speaking-threshold segment is introduced before the
rise time portion to bring the amplitude up from 0 to just audible. This segment, if the
parameters are chosen right, produces a characteristic thump and broadens the attack.
C.4 Conclusion
It is now evident that excellent models of nearly harmonic spectra can be built by sepa-
rating the spectrum into piecewise regions of equally spaced partials, each region modeled
with a carefully tuned FM pair. Using the same procedures, an entire class of synthe-
sis algorithms become available for musical timbres with slowly changing rates of partial
stretching or partial contracting over the spectrum.
Bibliography
Abel, J. and Smith, J. O. (2006). Robust design of very high-order allpass dispersion
filters. In Proceedings of the 9th Int. Conf. on Digital Audio Effects (DAFX-06),
Montreal.
Abel, J. and Van Duyne, S. A. (May 30, 2007). Discussion on passive nonliner filters.
Personal communication.
Bensa, J. (2000). Analysis and synthesis of piano sounds using physical and signal models.
PhD thesis, Université de la Méditerranée.
Berners, D. P. (1999). Acoustics and Signal Processing Techniques for Physical Model-
ing of Brass Instruments. PhD thesis, Electrical Engineering Department, Stanford
University.
Bilbao, S. (2001). Wave and Scattering Methods for the Numerical Integration of Par-
tial Differential Equations. PhD thesis, Electrical Engineering Department, Stanford
University.
Bilbao, S. (2004). Wave and Scattering Methods for Numerical Simulation. John Wiley
and Sons, Chichester.
Boutillon, X. (1988). Model for piano hammers: Experimental determination and digital
simulation. Journal of the Acoustical Society of America, 83(2):746–754.
Carrier, G. F. (1945). On the non-linear vibration problem of the elastic string. Quarterly
of Applied Mathematics, 3:157–165.
226
BIBLIOGRAPHY 227
Chaigne, A. and Askenfelt, A. (1994b). Numerical simulations of piano strings. II. com-
parisons with measurements and systematic exploration of some hammer-string pa-
rameters. Journal of the Acoustical Society of America, 95(3):1631–1640.
Courant, R., Friedrichs, K., and Lewy, H. (1956). On the partial difference equations
of mathematical physics. Contract AT(30-1)-1480, United States Atomic Energy
Commission.
Courant, R. and John, F. (1974). Introduction to Calculus and Analysis, volume 2. John
Wiley & Sons, New York.
Cruz, J. and Van Valkenburg, M. (1974). Signals in Linear Circuits. Houghton Mifflin,
Boston.
d’Alembert, J. L. R. (1749). Recherches sur la courbe que forme une corde tendue mise en
vibration. From series Memoires de l’Academie royale des sciences et belles lettres.
Classe de mathematique. Annee 1747, t.3.
Dodge, C. and Jerse, T. A. (1985). Computer Music Synthesis, Composition, and Perfor-
mance. Schirmer Books, New York.
BIBLIOGRAPHY 228
Elmore, W. C. and Heald, M. A. (1985). Physics of Waves. Dover Publications, Inc., Ney
York. First publication by McGraw-Hill Book Company, New York, in 1969.
Fettweis, A. (1986). Wave digital filters: Theory and practice. Proceedings of the IEEE,
74(2):270–327.
Fontana, F. and Serefin, S. (2003). Modeling Savart’s trapezoidal violin using a digital
waveduide mesh. In Proceedings Stockholm Music Acoustic Conference (SMAC03).
Hall, D. E. (1986). Piano string excitation in the case of small hammer mass. Journal of
the Acoustical Society of America, 79(1):141–147.
Hall, D. E. (1987a). Piano string excitation II: General solution for a hard narrow hammer.
Journal of the Acoustical Society of America, 81(2):535–546.
Hall, D. E. (1987b). Piano string excitation III: General solution for a soft narrow hammer.
Journal of the Acoustical Society of America, 81(2):547–555.
Hall, D. E. (1987c). Piano string excitation IV: The question of missing modes. Journal
of the Acoustical Society of America, 82(6):1913–1918.
Hall, D. E. (1988). Piano string excitation V: Spectra for real hammers and strings.
Journal of the Acoustical Society of America, 83(4):1627–1638.
Hall, D. E. (1992). Piano string excitation. VI: Nonlinear modeling. Journal of the
Acoustical Society of America, 92(1):95–105.
Hsu, H. P. (1984). Applied Fourier Analysis. Harcourt Brace Jovanovich, Publishers, New
York. In Harcourt Brace Jonanovich College Outline Series.
Huang, P., Serafin, S., and Smith, J. O. (2000). A 3d waveguide mesh model of high-
frequency violin body resonances. In Proceedings International Computer Music Con-
ference, Berlin.
Karjalainen, M., Välimäki, V., and Janosy, Z. (1993). Towards high-quality sound synthe-
sis of the guitar and string instruments. In Proceedings of the International Computer
Music Conference, Tokyo.
Karjalainen, M., Välimäki, V., and Tolonen, T. (1998). Plucked-string models: from the
karplus-strong algorithm to digital waveguides and beyond. Computer Music Journal,
22(3).
Karplus, K. and Strong, A. (1983). Digital synthesis of plucked string and drum timbres.
Computer Music Journal, 7(2):43–55.
Kelloniemi, A. (2006). Frequency-dependent boundary conditions for the 3-d digital wave-
guide mesh. In Proceedings International Conference of Digital Audio Effects (DAFX-
06), Montreal.
Kelloniemi, A., Välimäki, V., Huang, P., and Savioja, L. (2005). Artificial reverberation
using a hyper-dimensional FDTD mesh. In Proceedings European Signal Processing
Conference (EUSIPCO).
Kelloniemi, A., Välimäki, V., and Savioja, L. (2006). Simulation of room acoustices using
2-d digital waveguide meshes. In Proceedings IEEE Workshop on Acoustics, Speech
and Signal Processing (ICASSP), Toulouse.
Kindel, J. and Wang, I.-C. (1987). Modal analysis and finite element analysis of a piano
soundboard. In Proceedings of the 5th Modal Analysis Conference, London, pages
1545–1549.
BIBLIOGRAPHY 230
Kirk, R. E. (1959). Tuning preferences for piano unison groups. Journal of the Acoustical
Society of America, 31(12):1644–1648.
Kuo, F. (1966). Network Analysis and Synthesis. John Wiley & Sons, New York.
Ludeman, L. C. (1986). Fundamentals of Digital Signal Processing. John Wiley & Sons,
Inc., New York. Chapter 2 on the Z–Transform.
Magnusson, P. (1970). Transmission Lines and Wave Propagation. Allyn and Bacon,
Boston.
Maneri, J. G. and Van Duyne, S. A. (1986). Preliminary Studies in the Virtual Pitch
Continuum. Accentuate Music, Plainview, New York.
Martin, D. W. (1947). Decay rates of piano tones. Journal of the Acoustical Society of
America, 19(4):535–541.
Morse, P. M. (1976). Vibration and Sound. American Institute of Physics, for the Acous-
tical Society of America, (516)349-7800 x 481. (1st ed. 1936, 2nd ed. 1948.).
Murphy, D., Newton, C., and Howard, D. (2001). Digital waveguide mesh modeling of
room acoustics: Surround-sound, boundaries and plug-in implementation. In Pro-
ceedings of the Conference on Digital Audio Effects (DAFX-01), Limerick.
Paladin, A. and Rocchesso, D. (1992). A dispersive resonator in real time on mars work-
station. In Proceedings of the 1992 International Computer Music Conference, San
Jose.
Parks, T. W. and Burrus, C. S. (1987). Digital Filter Design. John Wiley & Sons, Inc.,
New York.
Pierce, J. P. (1974). Almost All About Waves. The MIT Press, Cambridge, Massachusetts.
Pierce, J. P. and Van Duyne, S. A. (1997a). A passive nonlinear digital filter design
which facilitates physics-based sound synthesis of highly nonlinear musical instru-
ments. Journal of the Acoustical Society of America, 101(2):1120–1126.
Pierce, J. R. and Van Duyne, S. A. (Filed: May 10, 1994; Issued: December 30, 1997b).
Passive nonlinear filter for digital musical sound synthesizer and method. United
States Patent No. 5,703,313.
Porcaro, N., Jaffe, D., Scandalis, P., Smith, J. O., Stilson, T., and Van Duyne, S. A.
(1998). SynthBuilder: A graphical rapid-prototyping tool for the development of
music synthesis and effects patches on multiple platforms. Computer Music Journal,
22(2):35–43.
Porcaro, N., Scandalis, G. P., Jaffe, D., and Smith, J. O. (1996). Demonstration: Using
SynthBuilder for the creation of physical models. In Proceedings of the International
Computer Music Conference, Hong Kong.
BIBLIOGRAPHY 232
Risset, J.-C. and Van Duyne, S. A. (1992). Duetto per un pianista: Realizzazione dal
vivo di un’interazione tra pianoforte e computer. I Quaderni della Civica Scuola di
Musica, 10(21-22).
Risset, J.-C. and Van Duyne, S. A. (1996). Real-time performance interaction with a
computer-controlled acoustic piano. Computer Music Journal, 20(1).
Savioja, L., Backman, J., Järvinen, A., and Takala, T. (1995). Waveguide mesh method
for low-frequency simulation of room acoustics. Proceedings of the 15th International
Conference on Acoustics (ICA-95), Trondheim, Norway, pages 637–640.
Savioja, L., Rinne, T. J., and Takala, T. (1994). Simulation of room acoustics with
a 3-d finite difference mesh. In Proceedings of the International Computer Music
Conference, Arhus.
Serafin, S., Huang, P., and Smith, J. (2001). The banded digital waveguide mesh. In
Proceedings Mosart Meeting, Barcelona.
Serra, X. (1997). Musical sound modeling with sinusoids plus noise. In Roads, C., Pope, S.,
Picialli, A., and Poli, G. D., editors, Musical Signal Processing. Swets and Zwitlinger
Publishers.
BIBLIOGRAPHY 233
Smith, J. O. (1983). Techniques for Digital Filter Design and System Identification with
Application to the Violin. PhD thesis, Stanford University.
Smith, J. O. (1992). Physical modeling using digital waveguides. Computer Music Journal,
16(4):74–91.
Stilson, T. (1994). Simulations of a pressue wave in a bent tube using 3-d waveguide
mesh. c-code simulations and animation plots of 6-port rectilinear mesh with reflective
terminations filling the space in a bent tube shape.
Stulov, A. (1995). Hysteretic model of the grand piano hammer felt. Journal of the
Acoustical Society of America, 97(4):2577–2585.
Suzuki, H. (1986). Vibration and sound radiation of a piano soundboard. Journal of the
Acoustical Society of America, 80(6):1573–1582.
BIBLIOGRAPHY 234
Välimäki, V., Laasko, T., and Mackenzie, J. (1995). Elimination of transients in time-
varying allpass fractional delay filters with applications to digital waveguide modeling.
Proceedings ICMC.
Van Duyne, S. A. (1992). Low piano tones: Modeling nearly harmonic spectra with regions
of FM. In Proceedings of the International Computer Music Conference, San Jose.
Van Duyne, S. A. (Filed: August 16, 1996; Issued: May 5, 1998). Method for inhar-
monic tone generation using a coupled mode digital filter. United States Patent No.
5,748,513.
Van Duyne, S. A. (Filed: March 21, 1989; Issues: November 27, 1990). Microtonal key
module and system. United States Patent No. 4,972,752.
Van Duyne, S. A., Jaffe, D., Scandalis, G. P., and Stilson, T. (1997). A lossless, click-free,
pitchbend-able, delay line loop imterpolation scheme. Proceedings ICMC, Thessa-
loniki.
Van Duyne, S. A., Jaffe, D. A., Scandalis, G. P., and Stilson, T. S. (Filed: May 9, 1996;
Issued: April 21, 1998). System and method for generating fractional length delay
lines in a digital signal processing system. United States Patent No. 5,742,532.
Van Duyne, S. A., Pierce, J. R., and Smith, J. O. (1994). Traveling wave implementation
of a lossless mode–coupling filter and the wave digital hammer. In Proceedings of the
International Computer Music Conference, Århus.
Van Duyne, S. A. and Smith, J. O. (1993a). The 2–d digital waveguide mesh. In Pro-
ceedings of the IEEE Workshop on Applications of Signal Processing to Audio and
Acoustics, New Paltz, NY.
Van Duyne, S. A. and Smith, J. O. (1993b). Physical modeling with the 2–D digital
waveguide mesh. In Proceedings of the International Computer Music Conference,
Tokyo.
Van Duyne, S. A. and Smith, J. O. (1995a). The 3–d tetrahedral digital waveguide mesh.
In Proceedings of the IEEE Workshop on Applications of Signal Processing to Audio
and Acoustics, New Paltz, NY.
Van Duyne, S. A. and Smith, J. O. (1995b). Developments for the commuted piano. In
Proceedings of the International Computer Music Conference, Banff.
Van Duyne, S. A. and Smith, J. O. (1996). The 3d tetrahedral digital waveguide mesh with
musical applications. In Proceedings of the International Computer Music Conference,
Hong Kong.
Van Duyne, S. A. and Smith, J. O. (Filed: May 10, 1994; Issued: November 14, 1995d).
Music synthesizer system and method for simulating response of resonant digital
waveguide struck by felt covered hammer. United States Patent No. 5,466,884.
Van Duyne, S. A. and Smith, J. O. (Filed: May 2, 1997: Issued: July 7, 1998). Efficient
synthesis of musical tones having nonlinear excitations. United States Patent No.
5,777,255.
Van Duyne, S. A. and Smith, J. O. (Filed: May 4, 1993; Issued: November 28, 1995c). Mul-
tidimensional digital waveguide signal synthesis system and method. United States
Patent No 5,471,007.
Van Duyne, S. A. and Smith, J. O. (Filed: November 27, 1995: Issued: March 25, 1997).
Multidimensional digital waveguide signal synthesis system and method (tetrahedral
extension). United States Patent No. 5,614,686.
BIBLIOGRAPHY 236
Weinreich, G. (1977). Coupled piano strings. Journal of the Acoustical Society of America,
62(6):1474–1484.
Zhu, W. D. and Mote, Jr., C. D. (1994). Dynamics of the pianoforte string and narrow
hammers. Journal of the Acoustical Society of America, 96(4):1999–2007.