# 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$