Electronic musical instruments

PHYSICAL MODELLING SYNTHESIS

Waveguide synthesis Introduction

• Synthesis methods developed so far did not allow for synthesizing realistic sounds of real instruments. • Sampling gives realistic sounds, but articulation is very limited, the sounds remain the same. • A modelling approach: we model the instrument, not the sound it produces! • A virtual instrument (a model) is a software. • Parameters of the model may be altered, affecting the sound just like the articulation does in real instruments. • The model reacts to parameters change by altering the timbre of the produced sound. Mathematic modelling

• The mathematic modelling approach is based on describing the process of sound creation with equations. • A function is created: sound = model(parameters). • If the equations are solved, a synthetic sound is created. • Altering the model parameters affects the resulting sound in a similar way to real instrument, allowing for articulation. Mathematic modelling

Mathematic modelling is not a practical way of performing sound synthesis. • It is very hard to form equations that describe the sound creation process accurately. • Solving such equations requires numerical methods. • Computations are very complex and time consuming. Real time synthesis is not possible even on the modern hardware. • This synthesis method is useful only for research, it cannot be used in commercial . • There is a better way! Waveguide modelling

Digital waveguide modelling – a new synthesis method. • Developed at the Stanford University (US) in early 1990s (J.O. Smith, P. Cook). • It is based on modelling the travelling waves (that compose a standing wave in an instrument) with a digital waveguide (a computer program). • A waveguide – a medium that allows for one dimensional wave propagation only. A string is a waveguide. • This method does not require any equations. • It can work in real time (even on 1990s hardware). Model and its parameters

Waveguide model – describes physical phenomena that lead to sound creation, with a computer algorithm.

Parameters of the model – decide on how the synthetic sound is created: • parameters related to the instrument – e.g. length and stiffness of a string – influence the pitch and the timbre of a sound, shape the static sound, • related to articulation – e.g. strength of string picking – allow for dynamic changes in sound (articulation). Model of a vibrating string

An ideal string – of infinite length and lossless (a waveguide).

The state p of the string is a function of time t and location x: p(x, t) One-dimensional wave equation:  2 p  2 p = c2 t 2 x2 Model of a lossless vibrating string

A general solution of a 1D wave equation for an ideal vibrating string is a composition of two travelling waves that propagate along the string in the opposite directions: x x p(x,t) = p (t − ) + p (t + ) 1 c 2 c Quantization of the model

For a digital model, we quantize both the time and the location:

The travelling wave advances by distance X in time T (the sampling period): a delay by one sample (z-1) Digital waveguide model

A model of an ideal, lossless waveguide: A lossy waveguide model

Waves are attenuated as they travel through the waveguide. A model of a finite length waveguide

A vibrating string that is fixed at both ends: initial conditions A model of a plucked string

A finite length vibrating string, excited by plucking (e.g. a guitar string)

initial conditions: Model of a plucked string

Model of a lossy plucked string:

• Buffer sample = a delay line. • Length of the delay line depends on the string length. • Coefficient g determines the energy damping per string unit of length. String damping

String model with a combined, constant damping factor.

A waveguide string model with frequency-dependent damping - the Karplus-Strong model. Components of a waveguide model

Waveguide models are built from: • delay lines (sample buffers), • digital filters, • scaling coefficients (multipliers), • lookup tables.

A waveguide model has no physical input or output. We introduce the initial state by writing it into the delay lines. The output state may be observed at any waveguide point. The parameters may be altered as the sound is created and they have immediate effect on the sound! Coupled string models

String models coupled with a guitar bridge model. Bowed string model

A model of a bowed string instrument (e.g. a cello): Wind instrument model

A model of a single reed wind instrument (e.g. a clarinet). Air contained inside the instrument is the waveguide, a wideband noise is the excitation. Excitation models

Excitation is stored in a lookup table.

A woodwind instrument reed table

A bowed instrument bow table Modelling the instrument body

The instrument body shape is approximated with a set of connected cylindrical sections (waveguides). Modelling the instrument body

Waveguide sections are connected with blocks that simulate energy reflection at the waveguide junctions. Waveguide model of an organ pipe

Filtr

korpus dl1

r2

c b

a

górna warga

strumień powietrza dl2 r1 dolna warga n languid

stopa Gen. Gen. obwiedni szumu Waveguide model of an organ pipe

The response of an organ pipe to pressure changes (sound frequency vs. the pressure introduced to the pipe)

Real organ pipe Waveguide model of a pipe (measurements) (simulation) Problems of the waveguide synthesis

Why didn’t the waveguide synthesis succeed? • Some physical phenomena (often nonlinear) are very hard to model in a simple way. • The cost of research on modelling was too high. • Musicians complained that the sounds were not realistic enough. • Controlling a large number of parameters in real time during playing the instrument was cumbersome. • Polyphony requires high processing power. Waveguide models in EMIs

• Yamaha VL1 (the only synthesis method). • Korg Prophet (as one of many methods). • Soundcards (Sound Blaster 64) – only selected instruments. • Software synthesizers – Yamaha S-YXG100plus, Seer Systems Reality, Cakewalk Dimension Pro. • STK (Synthesis Toolkit) – a C++ library implementing simplified waveguide models. A commercial waveguide EMI

Yamaha VL1 (1994) Virtual Acoustic costed ca. 10 000$ A commercial waveguide EMI

Model parameters were controlled with MIDI and with the software that assigns parameters to controllers. Summary

Pros of the waveguide synthesis • realistic sounds of the modelled instruments, • articulation (not available in sampling). Cons: • it’s very hard to build an accurate instrument model, • a lot of simplifications (one dimensional waveguide, no nonlinear phenomena, etc.), more complicated processes are very hard to model, • difficult to control for musicians (too many parameters), • for musicians, samplers were sufficient (much cheaper, easier to control). Bibliography

• Julius O. Smith: Digital waveguide synthesis. https://ccrma.stanford.edu/~jos/wg.html • Julius O. Smith: Physical audio signal processing. W3K Publishing 2010. https://ccrma.stanford.edu/~jos/pasp/Digital_Waveguide_Models.html • Andrzej Czyżewski: Dźwięk cyfrowy. Exit 2001. Rozdział 8.4: Modelowanie fizyczne. • G.P. Scandalis: Music technology. Physical Models. http://scandalis.com/jarrah/PhysicalModels/index.html • STK: The Synthesis Toolkit. https://ccrma.stanford.edu/software/stk/ • Wikipedia – Digital waveguide synthesis https://en.wikipedia.org/wiki/Digital_waveguide_synthesis