# Digital Waveguides: Discrete Wave Equation

## Wave Equation for Ideal Strings

The ideal string results in an oscillation without losses. The differential wave-equation for this process is defined as follows. The velocity $c$ determines the propagation speed of the wave and this the frequency of the oscillation.

\begin{equation*} \frac{\partial^2 y}{\partial t^2} = c^2 \frac{\partial^2 y}{\partial x^2} \end{equation*}

A solution for the different equation without losses is given by d'Alembert (1746). The oscillation is composed of two waves - one left-traveling and one right traveling component.

\begin{equation*} y(x,t) = y^+ (x-ct) + y^- (x+ct)\$ \end{equation*}
• $y^+$ = left traveling wave
• $y^-$ = right traveling wave

## Tuning the String

The velocity $c$ depends on tension $K$ and mass-density $\epsilon$ of the string:

\begin{equation*} c^2 = \sqrt{\frac{K}{\epsilon}} = \sqrt{\frac{K}{\rho S}} \end{equation*}

With tension $K$, cross sectional area $S$ and density $\rho$ in ${\frac{g}{cm^3}}$.

Frequency $f$ of the vibrating string depends on the velocity and the string length:

\begin{equation*} f = \frac{c}{2 L} \end{equation*}

## Make it Discrete

For an implementation in digital systems, both time and space have to be discretized. This is the discrete version of the above introduced solution:

\begin{equation*} y(m,n) = y^+ (m,n) + y^- (m,n) \end{equation*}

For the time, this discretization is bound to the sampling frequency $f_s$. Spatial sample distance $X$ depends on sampling-rate $f_s = \frac{1}{T}$ and velocity $c$.

• $t = \ nT$
• $x = \ mX$
• $X = cT$

### References

• Stefan Bilbao, Charlotte Desvages, Michele Ducceschi, Brian Hamilton, Reginald Harrison-Harsley, Alberto Torin, and Craig Webb. Physical modeling, algorithms, and sound synthesis: the ness project. Computer Music Journal, 43(2-3):15–30, 2019.
[BibTeX▼]
• Chris Chafe. Case studies of physical models in music composition. In Proceedings of the 18th International Congress on Acoustics. 2004.
[BibTeX▼]
• Vesa Välimäki. Discrete-time modeling of acoustic tubes using fractional delay filters. Helsinki University of Technology, 1995.
[BibTeX▼]
• Gijs de Bruin and Maarten van Walstijn. Physical models of wind instruments: A generalized excitation coupled with a modular tube simulation platform*. Journal of New Music Research, 24(2):148–163, 1995.
[BibTeX▼]
• Matti Karjalainen, Vesa Välimäki, and Zoltán Jánosy. Towards High-Quality Sound Synthesis of the Guitar and String Instruments. In Computer Music Association, 56–63. 1993.
[BibTeX▼]
• Julius O Smith. Physical modeling using digital waveguides. Computer music journal, 16(4):74–91, 1992.
[BibTeX▼]
• Lejaren Hiller and Pierre Ruiz. Synthesizing musical sounds by solving the wave equation for vibrating objects: part 1. Journal of the Audio Engineering Society, 19(6):462–470, 1971.
[BibTeX▼]
• Lejaren Hiller and Pierre Ruiz. Synthesizing musical sounds by solving the wave equation for vibrating objects: part 2. Journal of the Audio Engineering Society, 19(7):542–551, 1971.
[BibTeX▼]

• Contents © Henrik von Coler 2021 - Contact