Largescale Physical Modeling Synthesis Stefan Bilbao Acoustics and
Large-scale Physical Modeling Synthesis Stefan Bilbao Acoustics and Fluid Dynamics Group / Music University of Edinburgh SCP 08
Digital Sound Synthesis: Motivations n Various goals: n Achieving complete parity with sound produced by existing instruments… n Creating new instruments and sounds n The goal determines the particular methodology and choice of technique…and the computational complexity as well as implementation details! n Main groups of techniques: n n n Sampling synthesis Abstract techniques Physical Modeling
Abstract Digital Sound Synthesis Origins…early computer hardware/software design, speech (Bell Labs, Stanford) Wavetable Synthesis (1950 s) Oscillators/ Additive Synthesis (1960 s) Amplitude FM Synthesis (1970 s) Frequency Variable rate read Modulator Carrier Table of data Sinusoid FM output Basic operations: delay lines, FFTs, low-order filters, oscillators Some difficulties: Sounds produced are n n n Others: often difficult to control… betray their origins, i. e. , they sound synthetic. BUT: may be very efficient! Subtractive Waveshaping Granular…
Physical Modeling Physical models: n n n based of physical descriptions of musical “objects” can be computationally demanding… potentially very realistic sound control parameters: few in number, and perceptually meaningful digital waveguides, modal synthesis, finite difference methods, etc.
Linearity and Nonlinearity n n A nonlinear system is best defined as a system which is not linear (!) A linear system, crudely speaking: a scaling in amplitude of the excitation results in an identical scaling in amplitude of the response Many interesting and useful corollaries… Many physical modeling techniques are based on this simplifying assumption… Gestural data (control rate) Excitation Strongly nonlinear Resonator Linear (to a first approximation…sometimes!) Sound output (audio rate)
Digital Waveguides (J. O. Smith, CCRMA, Stanford, 1980 s--present) § § § A delay-line interpretation of 1 D wave motion: Useful for: strings/acoustic tubes Waves pass by one another without interaction Extremely efficient…almost no arithmetic! See (Smith, 2004) for much more on waveguides… Leftward traveling wave Add waves at listening point for output Rightward traveling wave
Products Using Waveguide Synthesis Physical modeling synthesizers n Yamaha VL-1 & VL-7, 1994 n Korg Prophecy, 1995 n Sound cards n Creative Sound Blaster AWE 64 n Creative Sound Blaster Live! n Technology patented by Stanford University and Yamaha n Yamaha VL-1 (Sound examples from: http: //www-ccrma. stanford. edu/~jos/waveguide/Sound_Examples. html) (This slide courtesy of Vesa Valimaki, Helsinki University of Technology, 2008. )
Waveguide Stringed Instruments (Helsinki University of Technology, Department of Acoustics and Signal Processing) n Sound examples: n n n Full harpsichord synthesis (Valimaki et al. , 2004) Guitar modeling (Valimaki et al. , 1996) See http: //www. acoustics. hut. fi/~vpv/ for many other sound examples/related publications
Modal Synthesis (Adrien et al. , IRCAM, 1980 s-present) § § Vibration is decomposed into contributions from various modes, which oscillate independently, at separate frequencies Basis for Modalys/MOSAIC synthesis system (IRCAM) Sound output
Modal synthesis---Piano n n n Sound synthesis by physical models of the piano B. Bank, G. Borin, F. Fontana, D. Rocchesso, S. Zambon based on modal synthesis. Features modeled include n n n transversal string vibration + nonlinear hammer interaction, longitudinal string vibration, effects of coupled twin strings (double decay, beatings), sympathetic resonances, soundboard radiation realtime prototype written in C + SIMD extensions, using Rt. Audio as audio library runs at full polyphony (10000+ resonators) at 40% load on a Core 2 Duo 2. 0 Ghz laptop runtime calibration possible through Midi CC or dedicated GUI
Limitations § Digital waveguides: work well in 1 D, but do not extend well to problems in higher dimensions Cannot easily handle nonlinearities: Linear String Nonlinear String Cannot extract efficient delay-line structures… § BUT: when waveguides may be employed, they are far more efficient than any other technique!
Limitations § Modal synthesis Not computationally efficient Irregular geometries huge memory costs (storage of modes) Also cannot handle distributed nonlinearities easily: Linear Plate § Nonlinear (von Karman) Plate These methods are extremely useful, as first approximations…
Observations These methods can be efficient, but: They are really “physical interpretations” of abstract methods: Wavetable synthesis waveguides Additive synthesis modal synthesis Can deal with some physical models this way, but not all.
Physical Modelling Synthesis: Timedomain Methods Musical instrument Finite Difference Methods n n System of equations Numerical method (recursion) Finite Element Methods Output waveform Spectral/Pseudospectral Methods are completely general— no assumptions about behaviour Vast mainstream literature, 1920 s to present.
Time domain methods as recursions n n n All time domain methods operate as recursions over values on a grid Recursion updated at a given sample rate fs Typical audio sample rates: n 32000 Hz n 44100 Hz n 48000 Hz n 96000 Hz
Time domain methods as recursions § § § Solution evolves over time Output waveform is read from a point on the grid Entire state of object is computed at every clock tick
FD Wind Instruments Wind instrument models: Also very easily approached using FD methods… Clarinet Saxophone … Squeaks! BUT: for simple tube profiles (cylindrical, conical), digital waveguides are far more efficient!
FD Plate Reverberation § § § Physical modeling…but not for synthesis! Drive a physical model with an input waveform In the linear case: classic plate reverberation (moving input, pickups)
FD Cymbal Modeling Cymbals: an interesting synthesis problem: • Simple PDE description • Regular geometry • Highly nonlinear Time-domain methods are a very good match… A great example of a system which is highly nonlinear…linear models do not do justice to the sound! Linear model Nonlinear model Difference methods really the only viable option here…
FPGA percussion instrument (R. Woods/K. Chuchasz, Sonic Arts Research Centre/ECIT, Queen’s University Belfast)
FD Modularized Synthesis: Coupled Strings/Plates/Preparation Elements n A complex nonlinear modular interconnection of plates, strings, and lumped elements… String/soundboard connection Prepared plate Spring networks Bowed plate
Render. AIR: FD Room Acoustics Simulation (D. Murphy, S. Shelley, M. Beeson, A. Moore, A. Southern, University of York, UK) § § § Audio bandwidth 3 D models = High Memory/High Computation load. Possible Solutions? Uses Collada (Google Earth/Sketchup) format geometry files. “Grows” a mesh to fit the user defined geometry. Mesh topology/FDTD-Scheme plug-ins for speed of development. Contact and related publications: Damian Murphy, University of York, UK § dtm 3@ohm. york. ac. uk § http: //www-users. york. ac. uk/~dtm 3/research. html
A general family of systems in musical acoustics n A useful (but oversimplified) model problem: Parameters: n n n d: dimension (1, 2, or 3) p: stiffness (1 or 2) c: ‘speed’ V : d-dim. ‘volume’ pd 1 2 §strings §acoustic tubes § membranes §bars §plates 3 § room acoustics
Computational Cost: A Rule of Thumb n Result: bounds on both memory requirements, and the operation count: # memory locations # arithmetic ops/sec Some points to note here: n As c decreases, or as V becomes larger, the “pitch” decreases and computation increases: low-pitched sounds cost more… n Complexity increases with dimension (strongly!) n Complexity decreases with stiffness(!) The bound on memory is fundamental, regardless of the method employed…
Computational Costs Great variation in costs… Arithmetic operations/second, at 48 k. Hz: 106 107 Wind instruments Single string 108 109 1010 1011 Plate reverberation 1012 1013 1014 1015 Small-medium acoustic spaces Bass drum Full piano Approx. limit of present realtime performance on commercially available desktop machines 1016 1017 Large acoustic spaces
Difficulties: Numerical Stability § § For nonlinear systems, even in isolation, stability is a real problem. Solution can become unstable very unpredictably… Problems for composers, and, especially: live performers! Even trickier in fixedpoint arithmetic.
Parallelizability: Modal Synthesis n Each mode evolves independently of the others: Each mode behaves as a “two-pole” filter: n Result: independent computation for each mode (zero connectivity) n Obviously an excellent property for hardware realizations.
Parallelizability: Explicit finite difference methods Update point n A useful type of scheme: explicit n Each unknown value calculated directly from previously computed values at neighboring nodes n “local” connectivity… n Useful for linear problems… Unknown Known
Parallelizability: Implicit finite difference methods Update group of points n Other schemes are implicit… n Unknowns coupled to one another (locally) n Useful for nonlinear problems… (stability!) Unknown Known
Parallelizability: Sparse matrix representations n Can always rewrite explicit updates as (sparse) matrix multiplications: Sparse, often structured (banded, near Toeplitz) Size N by N, where N is the number of FD grid locations. NNZ entries: O(N) = Next state State transition matrix Last state
Parallelizability: Sparse matrix representations n Can sometimes write implicit updates as (sparse) linear system solutions: = Next state n Many fast methods available: n n Iterative… Thomas-type for banded matrices FFT-based for near-Toeplitz Different implications regarding parallelizability! Last state
I/O: Modal Methods n n Modal representations are non-local: input/output at a given location requires reading/writing to all modes: Input Location-dependent expansion coefficients Excitation point Readout point Location-dependent expansion coefficients n n n Expansion coefficients calculated offline! Must be recalculated for each separate I/O location Multiple outputs: need structures running in parallel… Output
I/O: Finite Difference Methods n Finite difference schemes are essentially local: n Input/output is very straightforward: insert/read values directly from computed grid… n O(1) ops/time step Connect excitation element/insert sample Read value
I/O: Finite Difference Methods n Multichannel I/O is very simple… n No more costly than single channel! Connect excitation element/insert sample Read values n Moving I/O also rather simple n Interpolation (local) required… Read/write over trajectory
Boundary conditions n Updating over interior is straightforward… n Need spcialized updates at boundary locations… n …as well as at coordinate boundaries
Modularized synthesis n Idea: allow instrument designer (user) to connect together components at will: n Basic object types: n n n Strings Bars Plates Membranes Acoustic tubes Various excitation mechanisms n Need to supply connection details (locations, etc. ) Object 2 Object 1 Object 3
Challenges: Modular Stability n n Easy enough to design stable simulations for synthesis for isolated objects… Mass/spring system Even for rudimentary systems, problems arise upon interconnection: Stable Connection n Ideal String Unstable Connection For more complex systems, instability can become very unpredictable…
Energy based Modular Stability n n Key property underlying all physical models is energy. For a system of lossless interconnected objects, each has an associated stored energy H: H 1 H 2 H 3 H 4 n Each energy term is non-negative, and a function only of local state variables---can bound solution size: n Numerical methods: assure same property in recursion in discrete time, i. e. , Need to ensure positivity in discrete time…
Energy: Coupled Strings/Soundboard/Lumped Elements System n n Can develop modular numerical methods which are exactly numerically conservative… A guarantee of stability… A useful debugging feature! Returning to the plate/string/prepared elements system, Soundboard Energy of Prepared Elements Energy of Strings Total Energy time
Concluding remarks n Digital waveguides: Ideal for 1 D linear uniform problems: ideal strings, acoustic tubes n Extreme efficiency advantage… n Modal synthesis: n Apply mainly to linear problems n Zero connectivity n I/O difficulties (non-local excitation/readout) n Possibly heavy precomputation n Good for static (i. e. , non-modular) configurations n FD schemes n Apply generally to nonlinear problems n Local connectivity n Stability difficulties n I/O greatly simplified n Minimal precomputation n Flexible modular environments possible n
References n n n General Digital Sound Synthesis: n C. Roads, The Computer Music Tutorial, MIT Press, Cambridge, Massachusetts, 1996. n R. Moore, Elements of Computer Music, Prentice Hall, Englewood Cliffs, New Jersey, 1990. n C. Dodge and T. Jerse, Computer Music: Synthesis, Composition and Performance, Schirmer Books, New York, 1985. Physical Modeling (general) n V. Valimaki and J. Pakarinen and C. Erkut and M. Karjalainen, Discrete time Modeling of Musical Instruments, Reports on Progress in Physics, 69, 1— 78, 2005. n Special Issue on Digital Sound Synthesis, IEEE Signal Processing Magazine, 24(2), 2007. Digital Waveguides n J. O. Smith III, Physical Audio Signal Procesing, draft version, Stanford, CA, 2004. Available online at http: //ccrma. stanford. edu/~jos/pasp 04/ n n V. Välimäki, J. Huopaniemi, M. Karjalainen, and Z. Jánosy, “Physical modeling of plucked string instruments with application to real-time sound synthesis, ” J. Audio Eng. Soc. , vol. 44, no. 5, pp. 331– 353, May 1996. V. Välimäki, H. Penttinen, J. Knif, M. Laurson, and C. Erkut, “Sound synthesis of the harpsichord using a computationally efficient physical model, ” EURASIP Journal on Applied Signal Processing, vol. 2004, no. 7, pp. 934– 948, June 2004. n Modal Synthesis n D. Morrison and J. -M. Adrien, MOSAIC: A Framework for Modal Synthesis, Computer Music Journal, 17(1): 45— 56, 1993. n Finite Difference Methods n S. Bilbao, Numerical Sound Synthesis, John Wiley and Sons, Chichester, UK, 2009 (under contract).
- Slides: 41