Page  00000045 From the Physics of Piano Strings to Digital Waveguides Julien BensaT Stefan Bilbao, Richard Kronland-Martinet* and Julius O. Smith III Center for Computer Research in Music and Acoustics (CCRMA) Stanford University email:bilbao@ccrma. stanford. edu Abstract A new modelfor transverse piano string vibration, second order in time, which models frequency-dependent loss and dispersion effects is presented here. It is then shown how a digital waveguide structure may be related directly to this model. Finally, the model parameters are fit to experimental data from a grand piano. 1 Introduction Several models of transverse wave propagation on a piano string have appeared in the literature (Chaigne and Askenfelt 1994a; Chaigne and Askenfelt 1994b; Chaigne 1992). These models are always framed in terms of a partial differential equation (PDE); usually, the starting point for such a model is the wave equation (Fletcher and Rossing 1991), and more realistic features, such as dispersion and frequency-dependent loss are incorporated through several perturbation terms. The most advanced such model (Chaigne and Askenfelt 1994a) has been used as the basis for a high-fidelity sound synthesis technique (Chaigne and Askenfelt 1994b). Digital waveguides (Smith 1987; Karjalainen, Vilim~ki, and Tolonen 1998) are filter-like structures which model wave propagation as purely lossless throughout the length of the string, with loss and dispersion lumped in terminating filters. They are thus simulations of modified physical systems, but are very efficient in the context of musical sound synthesis. The aim of this paper is to link PDE models and digital waveguides, and to explicitly show the relationship between the lumped filters used to model loss and dispersion and the parameters which define our PDE, which is a variant of Chaigne and Askenfelt's system. Calibration of the filters to measured data is also discussed. 2 PDE model of a stiff string, with frequency-dependent loss In this section, we present a new model of piano string vibration, which can be written as 9Y2 2 ly4 y 9y w3y = Otc2 _x S2 -2b1-+25bx2 t (1) *Normally affiliated with S2M-LMA-CNRS, Marseille, France. Here, y(x, t) is the transverse displacement of the string in a single plane, as a function of time t > 0 and position x E [0, L] where L is the string length. The first term on the right-hand side of the equation, in the absence of the others, gives rise to wave like motion, with speed c. The second "ideal bar" term introduces dispersion, or frequency-dependent wave velocity, and is parametrized by a stiffness coefficient,. The third and fourth terms allow for loss, and if b2 # 0, decay rates will be frequency-dependent. A complete model is obtained by including a hammer excitation term f(x, t), possibly including nonlinear effects, on the right-hand side, and supplying a realistic set of initial and boundary conditions. If the term 2b2 o is replaced by 2b3 ý, we then arrive at the Chaigne and Askenfelt model, and thus the distinction is solely in the modeling of frequencydependent loss. In a subsequent paper, we will describe in detail the reasons why the model presented here is preferable, but we briefly summarize them here: First, the restriction to second order of the time derivatives greatly simplifies analysis and allows the construction of more efficient finite difference schemes for which numerical stability is easily verifiable. Second, because the number of independent wave-like solutions is reduced to two, it becomes possible to identify this equation directly with digital waveguide models which are based on the use of bidirectional delay lines which propagate traveling waves in opposite directions; for the Chaigne model, third order in time, there are three independent solutions. Finally, for a second-order equation such as (1), generalization to more accurate models of dispersion and loss (through the addition of more terms to the PDE) can be achieved without disrupting the well-posedness of the system (Strikwerda 1989), provided certain very simple conditions are respected. We note that in a later publication (Chaigne and Doutaut 1997), a second-order model similar to the above was presented in the context of finite difference schemes for xylophone bar vibration. It is also important to mention that the model (1), though convenient in that it allows very simple control over the loss and dispersive characteristics of wave propagation, is not completely sufficient for modeling real piano tones, which are, for much of the range of the piano keyboard, the result of two or three strings struck 45

Page  00000046 simultaneously. Even as a representation of a single string, the term which models frequency-dependent loss does not, as far as we know, have a solid physical justification. The Chaigne and Askenfelt model, however, suffers from the same lack of physical underpinnings, and we will take the same attitude as these authors by treating it as a model which summarizes various physical processes (in particular loss), and which may be usefully be applied to the analysis and synthesis of musical tones. 3 An associated waveguide model 3.1 Dispersion and loss For the purpose of examining the dispersion and loss characteristics of the traveling-wave solutions, the assumption of a string of infinite length is permissible and simplifies the analysis; boundary conditions may be reintroduced subsequently. Because the PDE (1) is linear and shift-invariant with respect to both time and space, it can be analyzed by considering wave-like solutions of the form y(x, t) - est+~j (2) Here, /3 is the real spatial wavenumber, and s is a complex frequency variable. If such a solution is inserted in (1), then a dispersion relation (Elmore and Heald 1969) results: s2 + 2(bi + b2/2)s + C22 2/32 = 0 (3) (The analysis of the propagation characteristics of a single wave-like solution can be considered to be a shortcut to the full Fourier and Laplace analysis, which yields the same resulting equation.) The roots of this equation, s+ and s_, are thus s+ = -bl - b2/2 ~ p/(bi + b2 2)2 - c2/32 - 2 4 (4) Over the range of /3 for which the quantity under the radical is negative (for bl and b2 small, this will be true for a substantial range of wavenumbers), s~ form a complex conjugate pair, and it is then possible to separate the real and imaginary parts in terms of /3 by writing s8 = 1r ~ jw, with r7 = -bi - b2/2 (5a) a = v/c2/2 + 2/34 - (b + b2/32)2 (5b) r7 is to be interpreted as a frequency-dependent loss parameter (notice that for bl and b2 chosen non-negative, we have r <_ 0 for all /3, so exponential solutions are always damped), and w is a real frequency variable. 3.2 The corresponding waveguide filter We now turn to the problem of relating digital waveguide parameters (to be discussed shortly) to the loss and inharmonicity parameters discussed in Section 3.1. To this end, we now return to the string of length L, under fixed boundary conditions. A simplified digital waveguide structure which can be used for piano synthesis is as shown in Figure 1. O Figure 1: Waveguide filter structure. The excitation I corresponds to the energy supplied to the string initially at one endpoint (by the hammer). The output O will then represent the time waveform of the string's motion at the bridge, or perhaps a unidirectional traveling-wave component at a selected point along the string. We will denote by D the time taken for energy in the lowest mode to complete a round-trip passage of distance 2L over the string; this minimum delay is simulated by a digital delay line of duration Do (as shown in Figure 1). The lumped digital filter F simulates the remaining accumulated lossy and dispersive effects over the same round-trip propagation distance; in particular it accounts for losses in the string itself (from air friction, and viscoelastic effects), as well as losses at the endpoints (where energy is transmitted into the soundboard). Consider an exponential wave solution propagating along the string, over a time duration D. From the definition of the exponential solution from (2), the propagation can be represented by a multiplicative phase factor exp(sD + 2j/3L). The modulus and phase of this factor are thus related to the filter F by IFI = enD - e-blD-b2Do2 (6) (7) arg(F) = wD - 2/3L Thus the phase of F is that of the multiplicative phase factor, except for the removal of the constant delay In order to rewrite this filter in terms of the frequency w, it is necessary to express the wavenumber /3 in terms of w. From (5b), and solving for /3, the required expression will be - 2-q +/q r(b +2 2r (8) with q = c2 - 2bb2 r = r2 - b2 (9) Given that, for realistic piano string modeling, bl - 1 and b2 ~ 10-4, we make the simplifying assumptions bib2 < C2 b < t2 b? < cw2 (10) 46

Page  00000047 which permit the following approximation of 3: Fc2" where 1 = 1 + 422/c4 - 1 (11) (12).) 3 Finally, we arrive at approximate expressions for the modulus and phase of the filter F as a function of frequency w, F exp( -D bi +bj2 ]) arg(F) 2 wD - Lc Kt (13a) (13b) 7 6 5 S 4 E 3 2 1 4 Calibration of loss and inharmonicity parameters from experimental data Because this model is intended for use in the context of musical sound synthesis, we here discuss the calibration of bl and b2, and the determination of the stiffness parameter. To this end, many measurements were taken, using a Yamaha Disklavier; for each note, the vibration of the string at the bridge was measured (using an accelerometer), for a hammer speed of 2.1 m/s. Using signal processing techniques (Aramaki, Bensa, Daudet, Guillemain, and Kronland-Martinet 2002), the damping coefficients were then determined. Over most of the piano range, however, the hammer strikes not one, but two or three strings simultaneously. The coupling gives rise to perceptually significant phenomena such as beating and two-stage decay; these effects are not taken into account in model (1). For these multistring notes, the calculated damping coefficients can be thought of describing the global perceived decay of the sound. For each note, bl and b2 were calculated from (13a). The evolution of these parameters as a function of MIDI note number is shown in Figure 2. bl and b2 are both increasing functions of MIDI note number, indicating increasing loss as one approaches the treble range. The physical characteristics of strings themselves, however, vary only slightly for wrapped strings, and thus the variations in the loss parameters would appear to be due to boundary termination. In the simple model we have presented, boundary conditions were assumed to be lossless, but in a real piano, the loss is extremely important, as it is the mechanism by which energy is transferred to the soundboard, and, ultimately to the listener as a musical sound. These losses will be greater in the treble range than in the bass, because strings are shorter, and waves are able to complete more round-trip passages in a given time. Thus, although our model does not fully describe string vibration in a true piano, we have calculated "equivalent" parameters b1 and 62. 30 40 50 60 70 note (MIDI) Figure 2: Values of bi and b2 fitted from measured data as a function of MIDI note number In Figure 2, we have also fit simple curves to the loss parameter data. The fits are linear as a function of the fundamental frequency, and are given by bl = 7.4 x 10-3f0 - 4.49 x 10-2 b2 = 1.0 x 10-6fo + 1.07 x 10-5 (14a) (14b) These simple empirical descriptions of bl and b2 allow the reproduction of piano tones whose damping will be identical to that of the perceived acoustic note. The study of more detailed models of multi-string coupling is currently in progress; a multi-string waveguide model was presented in (Aramaki, Bensa, Daudet, Guillemain, and Kronland-Martinet 2002). In practice, it is helpful to work with more perceptually significant parameters. We may express the phase of the filter F in terms of the inharmonicity coefficient B (H. Fletcher and Stratton 1962) and the fundamental frequency wo by B = K2w/C4 c = woL/r (15) from which, the phase of F may be rewritten as arg(F) - wD - V -1 + 1 + 4Bu2/w (16) This expression for the phase allows the estimation of wo and B for each note. The inharmonicity factor B is plotted as a function of MIDI note number in Figure 3; B is an increasing function of the note number, except over the bass range, where the strings are doublewrapped. The determination of bl, b2, B and wo for each note allows us, then, an explicit expression of the behavior of the filter F as a function of note number. In order 47

Page  00000048 x103 5 Conclusions 20 30 40 ne 50 60 70 Figure 3: The measured inharmonicity factor B. to represent the evolution of the loop filter in terms of notes, we show in Figure 4 the modulus and phase of the elementary filter 6F, normalized with respect to the filter D: 5F = F1/D (17) The modulus, which also takes into account the losses at the endpoints, is decreasing with the note number. But we can notice that this behavior is slightly different for the wrapped strings (AO, Al) than for the other strings (A2, E3, A3). It is worth noting that although B is an increasing function of note number, the phase of the filters 6F grows less rapidly. This is due to the fact that the phase of the filter depends not only on B, but also the fundamental frequency. This effect can be understood by expanding the expression for the phase of F for 4B(w/wo) near zero; one gets We have presented in this paper a new model of piano string vibration, which takes into account effects of stiffness and frequency-dependent loss. This model can be considered to be a variant of the model of Chaigne and Askenfelt which possesses the advantage that explicit solutions may be derived and related to a digital waveguide structure, to be used for musical sound synthesis purposes. We also have shown how the parameters which define the model may be calibrated to experimental data and have provided a simple description of the variation of these parameters over the musical range of the piano. Future work will involve extending the identification with a PDE to the multi-string framework. References Aramaki, M., J. Bensa, L. Daudet, P. Guillemain, and R. Kronland-Martinet (2002). Resynthesis of coupled piano string vibrations based on physical modeling. Journal of New Music Research 30(3), 213-26. Chaigne, A. (1992). On the use of finite differences for musical synthesis. Application to plucked stringed instruments. J. d'Acoust. 5(2), 181-211. Chaigne, A. and A. Askenfelt (1994a, Feb.). Numerical simulations of struck strings. I. A physical model for a struck string using finite difference methods. J. Acoust. Soc. Amer 95(2), 1112-8. Chaigne, A. and A. Askenfelt (1994b, Mar.). Numerical simulations of struck strings. I. Comparisons with measurements and systematic exploration of some hammer-string parameters. J. Acoust. Soc. Amer 95(3), 1631-40. Chaigne, A. and V. Doutaut (1997). Numerical simulations of xylophones. II. Time-domain modeling of the resonator and of the radiated sound pressure. J. Acoust. Soc. Amer. 101(1), 539-57. Elmore, W. and M. Heald (1969). Physics of Waves. New York: McGraw-Hill. Fletcher, N. and T. Rossing (1991). The Physics of Musical Instruments. New York: Springer-Verlag. H. Fletcher, E. D. B. and R. Stratton (1962). Quality of piano tones. J. Acoust. Soc. Amer. 34(6), 749-61. Karjalainen, M., V. Vilimaki, and T. Tolonen (1998, Fall). Plucked string models: From the karplus-strong algorithm to digital waveguides and beyond. Computer Music Journal 22(3), 17-32. Smith, J. 0. (1987). Music applications of digital waveguides. Technical Report STAN-M-39, Center for Computer Research in Music and Acoustics (CCRMA), Department of Music, Stanford University. See also http: / /www-ccrma. Strikwerda, J. (1989). Finite Difference Schemes and Partial Differential Equations. Pacific Grove, Calif.: Wadsworth and Brooks/Cole Advanced Books and Software. w2B arg(F) 2w 0o (18) Though meaningful only for the first few partials, one can clearly see the dependence which is decreasing with the fundamental frequency. normalized modulus of the filter 0 2000 4000 6000 8000 x 104 normalized phase of the filter 3 r 10000 2 0 00 0 2000 4000 6000 frequency (Hz) 8000 10000 Figure 4: Normalized modulus and phase of F for selected pitches. 48