Page  00000001 A Physical Piano Model for Music Performance Gianpaolo Borin (1), Davide Rocchesso (1) and Francesco Scalcon (2) (1) CSC, Dip. di Elettronica e Informatica, Universita di Padova, Italy borin,roc@dei.unipd.it; http://www.dei.unipd.it/english/csc (2) Generalmusic S.p.A., S. Giovanni in Marignano (RN), Italy scalcon@generalmusic.com; http://www.generalmusic.com Abstract The implementation of a complete physical model of the piano is demonstrated. It includes 88 lossy and dispersive strings (with full polyphony), hammers and dampers, and a soundboard load/radiation. 1 Introduction Physical modeling of musical instruments is rapidly becoming a viable technique for generating highquality musical tones with an unmatched naturalness of parametric control. Real-time implementations have been developed for several instruments, and commercial products have been available for a few years [17]. However, certain instrument families seem to be more difficult to simulate with a physical model, due to the complexity of their physical mechanisms. Among these "hard" instruments, the piano is particularly important for its prominence in western music. Convincing piano tones have been synthesized by Smith and Van Duyne [11] using a technique which is a hybrid between physical modeling and sample playback. This technique, called commuted synthesis, linearizes the behavior of the hammer and uses an excitation table for feeding a string waveguide model. Moreover, it commutes the radiation properties of the soundboard back to the excitation point, thus including the complicated soundboard response in the excitation table. Commuted synthesis shares some of the benefits and drawbacks of physical modeling and sampling. Especially its dynamic behavior in response to the player's actions is difficult to tune (e.g. repeated strokes tend to sound artificial). On the other hand, we found that the heaviest computational burden of a piano model resides in the strings, and there is no way to trade it with a precomputed table. Namely, at least the first two octaves of the piano exhibit a severe inharmonicity due to string dispersion, and this effect requires high-order filters to be simulated in a string model. Even a component such as the soundboard, whose impulse response is usu ally sampled and included in the excitation in some way, acts as a load for the strings thus changing their time-frequency behavior significantly. Such a load can not be easily took out of the waveguide network as a pre- or post-processing effect. With these considerations in mind, we started implementing a complete physical model of the piano, and we can now demonstrate an 88-notes polyphonic realization running on a Pentium-Pro with clock rate 200MHz at a sample rate of 22KHz. This implementation turns out to be only twice as slow as real time, and therefore we are confident that a real-time playable instrument will be available soon. So far, commercial digital pianos have been influenced by physical modeling only marginally. For example, the resonance effect given by the damper pedal was simulated by means of a network of simplified string models and included in a PCM digital piano as a post-processing effect [1]. Since the dynamic behavior of physical models is considered more realistic than sampling techniques, we expect that digital piano makers will replace more and more components of their sound generators with physical models. 2 Model Architecture Our piano model is based on the decomposition of the actual instrument into functional blocks. Each block is either simulated by a physical model or replaced by an "equivalent" signal processing module. For each note, an explicit physical model of the hammer-string interaction is implemented. The string is simulated by a digital waveguide structure [10] having loop filters accounting for dispersion and losses. Starting from measured distributions of partials and decay rates, the coefficients of these filters are identified by

Page  00000002 means of filter design techniques. As far as the losses are concerned, only a smooth lowpass component is ascribed to the string, the remaining ripples being due to the non-resistive load of the soundboard and to string coupling [15, 16]. Therefore, we connect the strings at a loaded junction [9], where the load is implemented as an irregularly-rippled digital filter. 3 Hammer-String Interaction Classical models of piano hammer are based on the parallel connection of a mass and a nonlinear spring which accounts for the felt compression characteristics [4, 5, 12, 13]. The continuous-time equations for these models are * (n) = v(n - 1) - (f(n) + f(n - 1)) 2mh A A where vh is the hammer velocity, a kTa, b S2rnh - 2 Ay Yh - Y, vi is the incoming string velocity, Zo is the string impedance, and 1(.) is the unit step function. As it was shown in [3], the felt hysteresis can be included in the model by cascading a high-pass filter to the nonlinear map. The filter can be designed by bilinear transformation of the continuous-time relations proposed by Stulov [12]. The method proposed in [3] rearranges the equations in such a way that instantaneous dependencies across the nonlinearity are dropped. As it is shown in fig. 1, the insertion of a fictitious delay element has severe consequences on the simulation of high-pitched notes at reasonable sample rates. This implementation avoids artificial instabilities and reproduces a reliable force signal, thus producing a much more natural sound. f(t) f(t) k (yh(t) - y(t)) d2yh dt2 where f(t), mh, Yh(t) are respectively the hammer force, mass and displacement, k is the spring stiffness, a is a constant used to tune the nonlinearity, and y(t) is the string displacement. Several problems arise when translating this class of models into a discrete-time implementation. A first difficulty is maintaining the possibility of felt adjustment by tuning k and a [5]. A second challenge is implementing an efficient hysteretic mechanism, as it is found in actual hammer felts [12]. A third, more fundamental problem arises when the equations of the hammer are translated into discrete-time form and coupled to a string model, such as a digital waveguide. In such a case we come up to an implicit system relating the force f(n) and the string velocity y(n). This implicit relationship can be made explicit by assuming that f(n) f(n - 1), thus inserting a fictitious delay element in a delay-free path. This approximation may introduce instabilities when the sample rate is not very high and high-pitched notes are played. In the solution proposed in [2, 3], a discrete-time realization is found by using the bilinear-transform approximation for time derivatives, and by solving the implicit nonlinear function of f(n). This latter step can be carried out in closed form if we use a = 2, a value found to be good in practice. The following steps result: A Ay(n - 1) * w(n) T +vh(n - 1) + (vi(n) + vi(n - 1)) 2 1 + 2abw(n) - 1+ 4abw(n) * f(n) =2ab2 1w(n2)) 1.5 t(ms) Figure 1: Time evolution of the hammer force for a C6 (fund. 1046.5 Hz) with F, = 44100Hz, h = 6.8m/s (iff), mn = 0.0066Kg, a = 3.0, k = 200 109N/m3. The wave impedance of the string is set to Zo = 2.88Kg/s. Delay-free loop resolution with (solid line) and without (dashed line) a fictitious delay element. 4 Lossy and Dispersive Strings Piano strings exhibit frequency-dependent losses and dispersion, which have to be simulated in order to attain realistic sounds. According to a well-established tradition brought by the literature of digital waveguides [10, 11], losses and dispersions are lumped for the whole string, and simulated, respectively, by lowpass and allpass filters.

Page  00000003 In our experience, the problem of simulating string dispersion is the most demanding in terms of computations. Even though a simple technique based on a cascade of equal first-order allpass filters was proposed [14], it is necessary to use generalpurpose design techniques for designing the allpass filters for low-pitched notes. We adapted to our needs the design method proposed by Lang and Laakso [7], which is fast and provides a weighted least-squares phase error approximation. With this method [8] it is possible to set a frequency-dependent weight, in such a way that the partials in low frequency are more accurately put on their exact (inharmonic) positions. If n is the allpass filter order to be designed, the method computes the quantities Fig. 3 depicts the results of the design proposed in [14] using 18 first-order filters. Informal listening tests seem to show that in the far left of the piano range the upper bound of correct positioning of partials is around 2KHz, and that it increases more slowly than the fundamental frequency, so that the largest effort has to be put in low-pitched notes, where about sixty partials have to be accurately positioned. S= - 2 (spre$(wi) + nWi) for each partial positioned at wi, where pre, is prescribed response of the allpass filter. Then following overdetermined system is solved using Least-Squared Equation Error (LSEE) criterion: (3) the the the a j sin (ý + ji) - sin i; 1... 1; I > n (4) j=1 The key point for approximating dispersion in piano strings is that we can choose the I points of evaluation of (4) exactly where the partials of the string should lie. Moreover, the initial weights can be chosen according to various criteria, for example following a curve of the ear frequency sensitivity. Fig. 2 depicts the results of a design for a C2 string, where three equal sixth-order filters are used. A vertical line shows where the approximation interval chosen for the LSEE method ends. The two bounds around the center line on the right of the figure indicate the frequency limen, and we can see that the first 60 designed partial positions are within the bounds. The steep dashed line on the right figure represents the distribution of partials in a non-dispersive string. Figure 2: Synthesis of dispersive filters: C2. LSEE method. Fundamental: 65.406 Hz. Delay: 512 samples. 3 sixth-order filters. Figure 3: Synthesis of dispersive filters: C2. Method by Van Duyne and Smith. Fundamental: 65.406 Hz. Delay: 533 samples. 18 first-order filters. In the literature of digital waveguide networks, the problem of approximating losses in a resonator is often considered easy, and this is justified by the fact that losses vary smoothly with frequency. Even high-quality models such as [6] used a first-order IIR filter. However, any analysis of piano sounds shows that the decay rate varies widely for different partials and, often, within a single partial. Most of these variations can be ascribed to the load of the soundboard and to string coupling at the bridge [15, 16]. According to these studies, we put only a smooth lowpass filter within every string, and simulated the other effects by a lumped load. For representing the string losses, we chose a second-order linear-phase FIR filter whose coefficients are designed by a Least-Squares Error criterion. Fig. 4 depicts a target loss filter, computed by measuring the initial decay rates of the partials of a C1 string, and its approximation by a second-order FIR filter. It is worth noting that this filter has linear phase response, and therefore it does not affect the behavior of the allpass dispersion filters. The ripples in the target response of fig. 4 can be attributed to coupling effects among the strings and the soundboard. A lumped load [9], inserted in a series waveguide junction, can account for these effects. The resulting scheme is depicted in fig. 5, where S = (Ei Zi + ZL)-1, being Zi the wave impedance for the i-th string, ZL the impedance of the load, vi+ and vi- the velocity waves respectively incoming and outgoing from the bridge.

Page  00000004 0.995 -0.99 0 1000 2000 3000 4000 5000 6000 Figure 4: Target response of a loss filter and approximation by a second-order linear-phase FIR filter. C1 string (Schultze-Pollmann, C190) Figure 5: Connecting n strings at the soundboard 5 Aknowledgments This work has been developed at C.S.C.-D.E.I., Universita di Padova, under a Research Contract with Generalmusic S.p.A. References [1] M. Ambrosini and F. Campetella and F. Scalcon and G. Borin, "Simulazione dell'Effetto del Pedale di Risonanza nei Pianoforti Digitali," in Proc. Int. Conf. on Acoustics and Musical Research, Ferrara, Italy, pp. 101-106, 1995. [2] G. Borin and G. De Poli, "A Hammer-String Interaction Model for Physical Model Synthesis," in Proc. XI Colloquium on Musical Informatics, Bologna, Italy, pp. 89-92, 1995. [3] G. Borin and G. De Poli, "A Hysteretic HammerString Interaction Model for Physical Model Synthesis," in Proc. Nordic Acoustical Meeting, Helsinki, Finland, pp. 399-406, 1996. [4] A. Chaigne and A. Askenfelt, "Numerical Simulation of Piano Strings I. A Physical Model for a Struck String using Finite Difference Method," J. Acoust. Soc. Am., vol. 95, num. 2, pp. 1112 -1118, 1994. [5] D. Hall, "Piano String Excitation VI: Nonlinear Modelling," J. Acoustical Soc. of America, vol. 92, pp. 95-105, Jan 1992. [6] M. Karjalainen and V. Vilimiki and Z. Janosy, "Towards High-Quality Sound Synthesis of the Guitar and String Instruments," in Proc. Int. Comp. Music Conf., Tokyo, Japan, pp. 56-63, 1993. [7] M. Lang, "Simple and Robust Method for the Design of Allpass Filters using Least-Squares Phase Error Criterion," IEEE Trans. Circuits and Systems, vol. 41, num. 1, pp. 40-48, 1994. [8] D. Rocchesso and F. Scalcon, "Accurate Dispersion Simulation for Piano Strings," in Proc. Nordic Acoustical Meeting, Helsinki, Finland, pp. 407-4414, 1996. [9] J. O. Smith, "Music Applications of Digital Waveguides," report stan-m-39, CCRMA - Stanford University, Stanford, California, 1987. [10] J. O. Smith, "Physical Modeling Using Digital Waveguides," Computer Music J., vol. 16, num. 4, pp. 74-91, Winter 1992. [11] J.O. Smith and S. Van Duyne, "Commuted Piano Synthesis," in Proc. Int. Comp. Music Conf., Banff, Canada, pp. 335-342, 1995. [12] A. Stulov, "Hysteretic Model of the Grand Piano Hammer Felt," J. Acoust. Soc. Am., vol. 97, num. 4, pp. 2577-2585, 1995. [13] H. Suzuki, "Model Analysis of a Hammer-String Interaction," J. Acoust. Soc. Am., vol. 82, num. 4, pp. 1145-1151, 1987. [14] S. Van Duyne and J.O. Smith, "Simplified Approach to Modeling Dispersion Caused by Stiffness in Strings and Plates," in Proc. Int. Comp. Music Conf., Aarhus, Denmark, pp. 407-410, 1994. [15] G. Weinreich, "Coupled Piano Strings," J. Acoust. Soc. Am., vol. 62, num. 6, pp. 1474-1484, 1977. [16] K. Wogram, "The Strings and the Soundboard," in Five Lectures on the Acoustics of the Piano, Royal Swedish Academy of Music, num. 64, Stockholm, pp. 83-98,1990. [17] Yamaha Corp., "Yamaha VL-1 User's Manual", 1993.