Page  00000001 BLOCK-BASED PHYSICAL MODELING FOR DIGITAL SOUND SYNTHESIS OF MEMBRANES AND PLATES Stefan Petrausch and Rudolf Rabenstein University of Erlangen-Nuremberg Multimedia Communications and Signal Processing CauerstraBe 7, D-91058 Erlangen {stepe, rabe}@LNT.de ABSTRACT An application of block-based physical modeling for digital sound synthesis is presented in this paper. A membrane model in terms of a fourth order, two-dimensional partial differential equation is solved and discretized with the functional transformation method. The resulting algorithm constitutes an input-output description with input force and output velocity of the membrane. This input-output port is transformed to wave variables, such that the membrane model can be connected to an arbitrary wave digital filter network that includes nonlinear elements. The construction of these new interaction networks allows block-based physical modeling with mixed models. A real-time sound synthesis program is demonstrated, which simulates almost arbitrary two-dimensional resonators (e.g. membranes, wooden plates, metal plates) with almost arbitrary excitations (e.g. plucking, hammering). These sounds are produced only by changes of the physical parameters of the model. 1. INTRODUCTION Physical modeling is one of the most promising new developments for digital sound synthesis in the last decade. In doing so, models for the sound production mechanism are applied to simulate the behavior of the musical instrument in space and time. Modem synthesizers use physical modeling techniques at least in hybrid forms respectively for parts of the sound model. They can choose from a number of available solutions, with differences in model quality, flexibility, and computational complexity. Both mentioned aspects demand for flexible and scalable approaches, where different parts of the model can use different modeling techniques or even simple sound models or samples. In this scope, block-based modeling is a recent approach to satisfy these needs. Instrument models can be broken into parts, where all parts can be modeled and implemented separately, even with different modeling paradigms. A suitable interaction topology guarantees the correct physical dependencies in the discrete implementation during run-time. Some existing modeling techniques, like wave digital filters (WDFs) [1], inherently include this feature, but do not support other modeling paradigms. First approaches to unify finite difference schemes and WDFs for sound synthesis are presented in [2]. A more general solution is given in [3], which works also for frequency based techniques. In this paper the algorithms in [3] are applied to blockbased physical modeling of membranes and plates. A brief review of these algorithms is given in section 2. The solution for the interaction topology according to [4] is given in section 3. Then in section 4, a membrane model is solved by the application of the functional transformation method (FTM) [5] and converted to wave variables via [6] to fit the needs of the interaction topology. The compiled implementation, a real-time sound synthesis program, is described in section 5. In result the flexibility of the FTM membrane model, both in computational effort and variety of physical parameters, is combined with the flexibility of WDF-realizations of excitation mechanism, like plucking and hammering. 2. BLOCK-BASED MODELING The proposed approach to block-based physical modeling, which is presented in [3], is quite general and can be applied to a wide range of problems and modeling techniques. In this section the most important aspects for this specific application are discussed in brief. 2.1. Interaction Topology As mentioned in the introduction, section 1, Wave Digital Filters (WDFs) already realize block-based modeling. Originated in network theory, WDF theory is a method for the discrete solutions of networks, where each network element is modeled and discretized separately, while the correct interaction is arranged in the discrete system with suitable port adaptors. A detailed description of WDF theory can be found in [1]. An important feature of WDFs, is that they are based on wave variables. Instead of using potential and flow variables (voltage v and current i for instance), that obey the Kirchhoff laws, an incident wave a and a reflected

Page  00000002 wave b are introduced by a \_ ( 1 R v(~ (1) b - 1 -R i ' where R is the port resistance. For linear models, one can always achieve one sample delay between the incident wave a and the reflected wave b by a proper definition of R. This property yields realizable discrete systems for the interaction topology, and therefore WDFs are used for the proposed approach. 2.2. Block Models The goal of block-based modeling is to connect arbitrary models to the interaction topology. For wave variable based models, like WDFs or the Digital Wave Guide (DWG) method, no further modifications are required. However, there are a lot of modeling techniques, that are based on the "normal" physical variables, potential and flow (Kirchhoff variables in the sequel). In particular the FTM, which is used for the membrane model, is based on Kirchhoff variables. To circumvent this limitation, a transformation of the physical variables is required. However, direct application of equation (1) yields a delay-free-loop, which is not realizable. The detailed description of this problem, and its solution via a slight modification of the implementation of the block model can be found in [6]. To summarize the approach: one simply has to formulate the block model as a state space structure (what is possible for all linear discrete systems), add a wave output at a specific point in the structure, and assign the direct feedback coefficient from input to output as the port resistance R. 3. THE BINARY CONNECTION TREE The proposed realization of the interaction topology is the "Binary Connection Tree" (BCT). The BCT is a software tool for the automatic and dynamic synthesis of WDF networks. It was developed in the scope of the EU funded project ALMA [7] and has been written by the authors of [4], where one can also find a detailed description of the underlying theory. It is based on the characteristic, that any possible network can be described in a tree-like structure. An arbitrary nonlinear element, with or without memory, constitutes the root of the tree. Starting from this root, branches in terms of serial or parallel three-port adaptors can be added to describe the interaction of the network elements. Each branch can be either connected to another three-port adaptor, or it can be terminated by a leaf, i.e. a specific WDF that corresponds to the desired network element. Some simple networks described in this tree-like structure can be seen in figure 4 and 5. These figures are screenshots of the BCT-authoring software "wdeditor" (see [7]), that creates short script files which are interpreted by the BCT. The BCT simulates the network in full audio-rate (44100 samples per second) with a two-step recursive algorithm. In the first step all branches are asked for their reflected waves b, which themselves ask their connected branches resp. leaves for the reflected waves. In the second step all incident waves a are calculated starting from the root in the same recursive manner, whereby all leaves have to update their system state. Using this recursive algorithm, even time-varying tree-structures are possible. 4. THE MEMBRANE MODEL The membrane model constitutes the major part of the proposed scenario, although it appears only as a single leave in the BCT. The basic physical principles of the model and the solution and realization of the model with the FTM are discussed in this section (see also [5]). 4.1. Physical Principles The membrane model used in this paper is a well founded physical model in terms of a Partial Differential Equation (PDE) with appropriate Initial Conditions (IC) and Boundary Conditions (BC). The considered physical effects are taken from [8] and result in the following fourth order PDE S4V4y - c2V2y + Y + dl - d3 = fe(x1, t), (2) with V2 denoting the Laplace-operator and 7y denoting the first order temporal derivative of the deflection y = y(x, x2, t). Equation (2) includes not only twodimensional (2D) wave propagation (c is the speed of sound), but also effects like stiffness (via the parameter S) and frequency dependent and frequency independent damping (parameters d3 resp. dl). The physical parameters are described in depth in [5]. For simplicity a rectangular membrane as depicted in figure 1 is used in the implementation, however circular models for more realistic drums are also possible [5]. Figure 1. Schematic plot of the membrane model as a thin rectangular 2D object. y = y(x, x2, t) denotes the deflection of the membrane and xl and x2 are the spatial dimensions. To achieve a realistic drum model, the boundaries are assumed to be supported. This means, that the deflection y

Page  00000003 and the bending V2y at the boundary OV are zero. Furthermore we assume homogeneous IC, i.e. the membrane is initially at rest. 4.2. The Functional Transformation Method To achieve a discrete realization of the membrane model, the FTM is employed. The explicit application of the method is described in [5] and an overview is given in figure 2. PDE LPDE 7- transfer IC, BC BC functionj discretization discrete T {} recursive Z1{ discrete solution systems - transfer function Figure 2. General procedure of the FTM for solving initial boundary value problems in form of PDEs with initial(IC) and boundary (BC) conditions. Important for the application of the FTM are the involved integral transformations. The Laplace transformation (L {.-}) yields a partial differential equation in space only, as all temporal derivatives are replaced by powers of the time-frequency variable s. The following problem specific Sturm-Liouville Transformation (SLT, T { - }) acts similar on the spatial derivatives. A Sturm-Liouville problem is formulated to find the eigenvalues and the corresponding eigenvectors of the problem. For finite spatial dimensions, these eigenvalues are discrete and constitute the modes 13,, of the system. The eigenvectors constitute the transformation kernels of the SLT, yielding a suitable differentiation theorem, that transforms the spatial derivative of the PDE into a simple multiplication with the systems eigenmodes 13,,. The result of the SLT is a transfer function, both in time and space frequency domain. Discretization with the impulse-invariant transformation, inverse Z-transformation, and inverse SLT yield a discrete solution in terms of weighted complex first order recursive systems, i.e. a weighted sum of all audible modes 13,,. However, to achieve a WDF implementation as required by the BCT, this discrete solution is modified slightly according to [6]. All delay free paths from the discrete time input function fe [k] to the discrete time output y [k] are summed, yielding the port resistance R. Then these delay free paths are removed, resulting in the discrete time reflected wave b [k] to be the output. Finally the input function fe [k] can be calculated by the inverse of the wave variable definition (1). A sketch of the complete membrane implementation is given in figure 3. 5. IMPLEMENTATION The discrete solution of the membrane in figure 3 is im plemented as a plugin for the BCT, described in section 3. In result a real-time simulator of membrane resp. plate models with excitation by a WDF network is achieved. fe[k] a[k] b[k] Figure 3. Structure of the membrane implementation with N complex harmonics. Input weighting constants b, and output weighting constants cn result from [6] and [5]. 5.1. Overview The complete implementation runs as a network model in the BCT. The user resp. the musician can create individual excitation networks including one nonlinearity to excite the membrane model. The membrane model itself constitutes just one single plugin in the network. The network can be created with the BCT-authoring software "wdeditor", which also provides simple sound functionality to adjust model and parameters. The "wdeditor" exports a script-file, containing model and parameter specific details. Then started, the BCT creates one copy of the network for each MIDI-note to enable polyphony, and furthermore, the BCT allows real-time parameter changes of the block-models via the MIDI interface. 5.2. Excitation Networks The excitation network, which is either created with the "wdeditor" or by hand, determines the class of model, which is simulated. The editor of the network determines beforehand, which type of excitation should be simulated. During execution, this type of simulation (plucking or hammering for instance) cannot be changed. Consider for example excitation by plucking. The velocity of the membrane at the excitation point is forced to match the velocity of the pluck. The corresponding network is depicted in figure 4. The excitation is determined by the source model on the left, the membrane model is the network element to the right. Figure 4. Example network to simulate excitation by plucking. The excitation force is determined only by the source model on the left. Another more realistic example is shown in figure 5. The inductance connected to the serial adaptor simulates the mass of a hammer. This hammer hits the membrane via a nonlinear hammer felt, whose behavior is implemented with the nonlinear element to the left. The mem

Page  00000004 brane has a real interaction with the hammer in opposite to the source model in figure 4. Figure 5. Hammer membrane model, where the hammer mass corresponds to the inductance and the hammer-felt is modeled by the nonlinearity. 5.3. Morphing Membranes Another important feature of the implementation is illustrated by the screenshot in figure 6. The membrane plugin comes with a number of physical parameters, which allow the plugin to simulate a wide range of two-dimensional physical objects. By modifications of the physical parameters, one can simulate not only membranes, but metal plates and wooden plates, too. As the BCT allows MIDIinput to the plugin, these changes can even be applied during execution. Musicians have more freedom in expressiveness, as they can change the instrument smoothly during the performance. The properties of the FTM always guarantee stable systems for all parameter sets. 6. CONCLUSIONS In this paper the application of block-based physical modeling for digital sound synthesis of two-dimensional resonators has been demonstrated. In doing so, a membrane model including physical effects like stiffness and several damping terms, was solved and discretized with the FTM. The resulting discrete system was slightly modified to allow the connection to arbitrary WDF networks. A recent solution for the automatic synthesis of WDF networks, the BCT, was used to create excitation networks. This procedure results in a flexible and real-time capable simulator for two-dimensional resonators, where excitations like plucking or hammering can be simulated with the same piece of code. This work has been performed in the context of the project ALMA (ALgorithms for the Modeling of Acoustic interactions), funded by the European Commission [7]. 7. REFERENCES [1] A. Fettweis, "Wave digital filters: Theory and practice," Proceedings of the IEEE, vol. 74, no. 2, pp. 270-327, 1986. [2] M. Karjalainen, C. Erkut, and L. Savioja, "Compilation of unified physical models for effcient sound synthesis," in Int. Conf on Acoustics, Speech, and Signal Proc. (ICASSP), Hong Kong, Apr. 2003. [3] S. Petrausch, J. Escolano, and R. Rabenstein, "A general approach to block-based physical modeling with mixed modeling strategies for digital sound synthesis," in Int. Conf on Acoustics, Speech, and Signal Proc. (ICASSP), Philadelphia, PA, USA, Mar. 2005. [4] Giovanni De Sanctis, Augusto Sarti, and Stefano Tubaro, "Automatic synthesis strategies for objectbased dynamical physical models in musical acoustics," in Digital Audio Effects (DAFx-03), London, UK, Sept. 2003. [5] L. Trautmann, S. Petrausch, and R. Rabenstein, "Physical modeling of drums by transfer function methods," in Int. Conf on Acoustics, Speech, and Signal Proc. (ICASSP), Salt Lake City, Utah, May 2001. [6] Stefan Petrausch and Rudolf Rabenstein, "Interconnection of state space structures and wave digital filters," IEEE Transactions on Circuits and Systems II, vol. 52, no. 2, pp. 90-93, Feb. 2005. [7] ALMA project IST-2001-33059, "ALgorithms for the modeling of acoustic interactions," Website, Dec. 2004, http://www-dsp.elet.polimi.it/ alma/. [8] Neville H. Fletcher and Thomas D. Rossing, The Physics of Musical Instruments, Springer-Verlag, New York, NY, USA, 2nd edition, 1998. Figure 6. Screenshot of the editing dialog of the membrane plugin, taken from the authoring software "wdeditor". Several physical parameters and interaction location can be freely adjusted.