Page  304 ï~~Waveguide Simulation of Non-Cylindrical Acoustic Tubes Julius 0. Smith III Assoc. Prof. (Research), CCRMA, Music Dept., Stanford University, Stanford, CA 94305 Signal Processing Engineer, NeXT Inc., 900 Chesapeake Dr., Redwood City, CA 94063 email: or Introduction The digital waveguide modeling technique provides an efficient class of synthesis structures for vibrating strings, woodwind air columns, and other one-dimensional waveguides (Hirschman 1991, Smith 1987, Smith 1990). A basic waveguide building block is simply a pair of delay lines: One delay line provides propagation delay for a wave traveling in one direction along a string or tube, while the other delay line provides propagation in the other direction. By adjoining different tube sections via scattering junctions, adding digital filters at strategic points, and providing nonlinear junctions which excite oscillation, models of whole musical instruments, especially members of the string, woodwind, and brass families, can be built. Even the singing human voice has been convincingly simulated using this approach (Cook 1990). There are several ways the waveguide approach may be extended. Digital filters at selected points in the waveguide can be computed to approximate distributed losses and dispersion in real strings and woodwind bores to an arbitrarily accurate extent using the techniques of linear prediction and system identification (Smith 1983). It is also straightforward to couple a waveguide model to a more conventional simulation framework, such as one which explicitly simulates individual modes of vibration using second-order resonators (Adrien and Morrison 1990, Smith 1987). Since the model has a physical interpretation, nonlinear and time-varying extensions are straightforward (Hirschberg et al. 1991, Smith 1987, Sullivan 1990). It is possible to extend beyond one-dimensional waveguides to two dimensions (for membrane modeling) or three dimensions (for waves in solids or open air). In these extensions, a waveguide mesh can attempt to fill the vibrating area or volume with sufficient density, much like using a "wire-frame diagram" in computer graphics. Alternatively, the basic principle of commuting losses and dispersion to the medium boundaries can be applied directly to a simulation of the two or three dimensional medium in order to eliminate all multiplies from the interior medium simulation (Smith 1990). The simplest waveguide models involve only linear, time-invariant, one-dimensional acoustic systems. To a high degree of approximation, a horn may be regarded as one-dimensional waveguide, provided that the flare of the horn is small relative to the smallest wavelength of propagation (Beranek 1986, Morse 1976). Morse states: "The analysis of wave motion in a horn is a very complicated matter, so complicated that it has been done in a rigorous manner only for conical and hyperbolic horns." In this context, hyperbolic horns are those of the form y = yo [cosh(x/h) + Tsinh(x/h)], where x is distance along the axis of the horn, y is the horn radius, h is the "scale factor" controlling flare, and T is the "shape factor" which is important near the throat of the horn. The hyperbolic horn family is also known as the Salmon horn family. Note that catenoidal, exponential, conical, and cylindrical horns are all special or limiting cases of the hyperbolic horn. (The hyperboloidal horn, however, is not!) Waves in a hyperbolic horn are "one-parameter waves," meaning that a coherent wavefront spreads out uniformly along the horn, and a "surface of constant phase" may be defined whose tangent plane is normal to the horn axis. For cylindrical tubes, the surfaces of constant phase are planar, while for conical tubes, they are spherical (Morse 1976). The key property of the horn is that a wave propagates from one end to the other with no "back-scattering" of the wave. ICMC 304

Page  305 ï~~Rather, it is smoothly "guided" from one end to the other. In other words, a horn is a waveguide. The absence of back-scattering means that the entire propagation path may be simulated using a pure delay line. Any losses, dispersion, or amplitude change due to horn radius variation can be implemented where the wave exits the delay line to interact with other components. This is valid because linear, time-invariant systems commute. Non-conical horns are dispersive, i.e., sound speed is not the same at all frequencies (Morse 1976). However, dispersion can be "lumped" into one or more allpass filters as is done for stiff string simulation (Smith 1983). While we could proceed directly to the waveguide formulation of the entire Salmon horn family, it is simpler to consider first the conical case. All smooth horns reduce to the conical case over sufficiently short distances, and the use of many conical sections is always an alternative to a higher order waveguide model. Piecewise Conical Acoustic Tubes In a paper especially relevant to musical acoustics (Causs et al. 1984), truncated cones were used in the modeling of horns and brass instrument bells. They report that the use of conical sections "leads to faster numerical convergence" relative to cylindrical sections. Each truncated cone is represented by a so-called "transmission matrix" (Pierce 1989).* The cone is a one-dimensional waveguide which propagates a circular section of a spherical wave in place of the plane wave which traverses a cylindrical acoustic tube (Ayers et al. 1985, Pierce 1989). The wave equation in the spherically symmetric case is given by 2 i =/ C )J Pz where c = sound speed pz xp(t, x) P = p(t, x) p = - zp (t, x) and p(t, x) is the pressure at time t and radial position x along the cone. It can be seen that the wave equation in a cone is identical to the wave equation in a cylinder, except that p is replaced by xp. Thus, the solution is a superposition of left- and right-going traveling wave components, scaled by 1/x: ) f+(t C) g (t-+C) x x where f(.) and g(.) are arbitrary continuous functions. * The transmission matrix is a two-by-two matrix of frequency-dependent elements which when multiplied times the twovector containing pressure and velocity phasors (complex amplitudes at a single frequency) at the output of the tube segment, produces the pressure and velocity phasors at the input of the segment. Transmission matrices are most often used in the musical acoustics literature to simulate acoustic tubes; for example, Keefe describes clarinet tone-holes this way (Keefe 1982). The difference between the transmission-matrix formulation and the waveguide formulation lies in the choice of acoustic state variables: The transmission-matrix formulation uses pressure and velocity to define the acoustic state at any point along the tube, while the waveguide formulation uses left- and right-going traveling-wave components (either pressure or velocity or some combination of the two) (Smith 1987). Since a transmission matrix may be converted to a corresponding scattering matrix by a two-by-two linear transformation, it is straightforward to rigorously incorporate simulation parameters from the acoustics literature in a digital waveguide model. ICMC 305

Page  306 ï~~Digital Simulation The discrete-time simulation of the above solution is obtained by simply sampling the travelingwave amplitude at intervals of T seconds, which implies a spatial sampling interval of X =Â~ cT meters. Define p+(n) Af(nT- xo/c) p-(n) A g(nT + xo/c) where xO is arbitrarily chosen as the position along the cone closest to the tip. (There cannot be a sample at the tip itself, for a singularity exists there.) Then a section of the ideal cone can be simulated as shown in Figure 1 (where pressure outputs are shown for x = x0 and x = xo + 3X). A particle-velocity output is formed by dividing the traveling pressure waves by the characteristic impedance. Since the characteristic impedance is now a function of frequency and propagation direction (as can be quickly derived from the Laplace transform of the momentum-conservation equation in a cone), a digital filter will replace what was a real number for cylindrical tubes. p(t,xo) -p(t,xo+3cT) p (n) p (n-) p (n-2)(n-3) 1/xo xo+3X - p (nTxo) - ) p (nTxo+3X) pi) -p(n+ 1) p-(n+2) p-(n+3)....Z -I Z - Â~. x=xo x=xo+cT x=xo+2cT x=xo+3cT Figure 1. Digital simulation of the ideal, lossless, conical waveguide with observation points at x = x0 and x = xo + 3X = xo + 3cT. The symbol "z-1" denotes a one-sample delay. Generalized Scattering Coefficients The generalization of scattering coefficients at a multi-tube intersection as derived in (Smith 1987) results in junction pressure being given by "=1i=1 where G+ is the complex, frequency-dependent, incoming, acoustic admittance of the ith branch at the junction, G7- is the corresponding outgoing acoustic admittance, p+ is the incoming traveling pressure wave phasor in branch i, p7- = pi -Pri is the outgoing wave, and Gj is the admittance of a load at the junction, such as a coupling to another simulation. For generality, the formula is given as it appears in the multivariable case. ICMC 306

Page  307 ï~~References Due to space limitations, only the most recent and/or fundamental references appear below. J. M. Adrien and J. Morrison, "Mosaic: A Modular Program for Synthesis by Modal Superposition," Proc. Colloquium on Physical Modeling,, Grenoble, 1990. J. Agullo, A. Barjau, and J. Martinez, "Alternatives to the Impulse Response h(t) to describe the Acoustical Behavior of Conical Ducts," JASA-84#5, pp. 1606-1627, Nov. 1988. R. D. Ayers, L. J. Eliason, and D. Mahgerefteh, "The Conical Bore in Musical Acoustics," Am. J. Physics., vol. 53, no. 6, pp. 528-537, June 1985. A. H. Benade, "Equivalent Circuits for Conical Waveguides," JASA-83#5, pp. 1764-1769, May 1988. L. L. Beranek, Acoustics, Amer. Inst. Physics, (516)349-7800 x 481, 1986. (1st ed. 1954.) R. Causse, J. Kergomard, and X. Lurton, "Input impedance of Brass Musical Instruments-Comparison between Experiment and Numerical Models," JASA-75#1, pp. 241-254, Jan. 1984. P. R. Cook, "Identification of Control Parameters in an Articulatory Vocal Tract Model, with Applications to the Synthesis of Singing," Ph.D. Dissertation, Elec. Eng. Dept., Stanford University, Dec. 1990. J. Gilbert, JKergomard, and J. D. Polack, "On the Reflection Functions Associated with Discontinuities in Conical Bores," JASA-87#4, pp. 1773-1780, April. 1990. A. Hirschberg, J. Gilbert, A. P. J. Wijnands, and A. J. M. Houtsma, "Non-Linear Behavior of Single-Reed Woodwind Musical Instruments," Nederlands Akoestisch Genootschap J., nr. 107, pp. 31-43, March 1991. S. Hirschman, "Digital Waveguide Modelling and Simulation of Reed Woodwind Instruments," Eng. Dissertation, Elec. Eng. Dept., Stanford University, May 1991. D. H. Keefe, "Theory of the Single Woodwind Tone Hole," "Experiments on the Single Woodwind Tone Hole," JASA-72#3, pp. 676-699, Sep. 1982. P. M. Morse, Vibration and Sound, Amer. Inst. Physics, (516)349-7800 x 481, 1976 (1st ed. 1936, 2nd ed. 1948). P. M. Morse and U. Ingard, Theoretical Acoustics, McGraw-Hill, New York, 1968. A. D. Pierce, Acoustics, Amer. Inst. Physics, (516)349-7800 x 481, 1989. J. O. Smith, "Techniques for Digital Filter Design and System Identification with Application to the Violin," Ph.D. Dissertation, Elec. Eng. Dept., Stanford University, June 1983. J. O. Smith, "Music Applications of Digital Waveguides," (A compendium containing four related papers and presentations.) CCRMA Tech. Rep. STAN-M-67, Stanford University, 1987, (415)723 -4971. J. O. Smith, "Efficient Yet Accurate Models for Strings and Air Columns using Sparse Lumping of Distributed Losses and Dispersion," Proc. Colloquium on Physical Modeling,, Grenoble, 1990. CCRMA Tech. Rep. STAN-M-67, Stanford University, (415)723-4971. J. 0. Smith, "Waveguide Simulation of Non-Cylindrical Acoustic Tubes," CCRMA Tech. Rep. STAN-M-?, Stanford University, (415)723-4971. A longer version of this paper. C. R. Sullivan, "Extending the Karplus-Strong Algorithm to Synthesize Electric Guitar Timbres with Distortion and Feedback," Computer Music J., vol. 14, no. 3, pp. 26-37, Fall 1990. ICMC 307