Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Digital Waveguide Resonator

Converting a second-order oscillator into a second-order filter requires merely introducing damping and defining the input and output signals. In Fig.C.40, damping is provided by the coefficient $ G(n)$ , which we will take to be a constant

$\displaystyle G(n)\equiv\message{CHANGE eqv TO equiv IN SOURCE}g.
$

When $ g<1$ , the oscillator decays exponentially to zero from any initial conditions. The two delay elements constitute the state of the resonator. Let us denote by $ x_1(n)$ the output of the delay element on the left in Fig.C.40 and let $ x_2(n)$ be the delay-element output on the right. In general, an output signal $ y(n)$ may be formed as any linear combination of the state variables:

$\displaystyle y(n) = c_1 x_1(n) + c_2 x_2(n)
$

Similarly, input signals $ u(n)$ may be summed into the state variables $ x_i(n)$ scaled by arbitrary gain factors $ b_i$ .

The foregoing modifications to the digital waveguide oscillator result in the so-called digital waveguide resonator (DWR) [307]:

$\displaystyle \tilde{x}_1(n)$ $\displaystyle =$ $\displaystyle g x_1(n)\protect$ (C.124)
$\displaystyle v(n)$ $\displaystyle =$ $\displaystyle c[\tilde{x}_1(n) + x_2(n)]$ (C.125)
$\displaystyle x_1(n+1)$ $\displaystyle =$ $\displaystyle v(n) - x_2(n) + \tilde{b}_1 u(n)$ (C.126)
$\displaystyle x_2(n+1)$ $\displaystyle =$ $\displaystyle \tilde{x}_1(n) + v(n) + b_2 u(n)$ (C.127)
$\displaystyle y(n)$ $\displaystyle =$ $\displaystyle c_1 x_1(n) + c_2 x_2(n)
\protect$ (C.128)

where, as derived in the next section, the coefficients are given by
$\displaystyle g$ $\displaystyle =$ $\displaystyle r^2\protect$ (C.129)
$\displaystyle \tilde{b}_1$ $\displaystyle =$ $\displaystyle b_1 \sqrt{\frac{1-c}{1+c}}$ (C.130)
$\displaystyle c$ $\displaystyle =$ $\displaystyle \sqrt{\frac{1}{1 + \frac{\tan^2(\theta)(1+g)^2+(1-g)^2}{4g}}}$ (C.131)
  $\displaystyle \approx$ $\displaystyle 1 - \frac{\tan^2(\theta)(1+g)^2 + (1-g)^2}{8g}.
\protect$ (C.132)

where $ \lambda=r e^{j\theta}$ denotes one desired pole (the other being at $ \overline{\lambda}$ ). Note that $ c=\cos(\theta)$ when $ g=1$ (undamped case). The DWR requires only two multiplies per sample. As seen earlier, when the decay time is set to $ \infty$ ($ g=1$ ), one of the multiplies disappears, leaving only one multiply per sample for sinusoidal oscillation.

Figure C.41 shows an overlay of initial impulse responses for the three resonators discussed above. The decay factor was set to $ r=0.99$ , and the output of each multiplication was quantized to 16 bits, as were all coefficients. The three waveforms sound and look identical. (There are small differences, however, which can be seen by plotting the differences of pairs of waveforms.)

Figure: Overlay of three resonator impulse responses, with $ \mathbf {B}^T=[1,0]$ and $ \mathbf {C}=[0,1]$ , for the (1) complex-multiply resonator (labeled ``2DR'' for ``2D rotation''), (2) modified coupled form (MCF), and (3) second-order digital waveguide resonator (DWR).
\includegraphics[width=\twidth]{eps/tosc16}

Figure C.42 shows the same impulse-response overlay but with $ r=1$ and only 4 significant bits in the coefficients and signals. The complex multiply oscillator can be seen to decay toward zero due to coefficient quantization ( $ x_1^2+y_1^2<1$ ). The MCF and DWR remain steady at their initial amplitude. All three suffer some amount of tuning perturbation.

Figure: Overlay of three resonator impulse responses, as in Fig.C.41, but with $ r=1$ and quantization of coefficients and signals to 4 significant bits.
\includegraphics[width=\twidth]{eps/tosc4}


Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

[How to cite this work]  [Order a printed hardcopy]  [Comment on this page via email]

``Physical Audio Signal Processing'', by Julius O. Smith III, W3K Publishing, 2010, ISBN 978-0-9745607-2-4.
Copyright © 2014-06-11 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA