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.42, 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.42 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.148)
$\displaystyle v(n)$ $\displaystyle =$ $\displaystyle c[\tilde{x}_1(n) + x_2(n)]$ (C.149)
$\displaystyle x_1(n+1)$ $\displaystyle =$ $\displaystyle v(n) - x_2(n) + \tilde{b}_1 u(n)$ (C.150)
$\displaystyle x_2(n+1)$ $\displaystyle =$ $\displaystyle \tilde{x}_1(n) + v(n) + b_2 u(n)$ (C.151)
$\displaystyle y(n)$ $\displaystyle =$ $\displaystyle c_1 x_1(n) + c_2 x_2(n)
\protect$ (C.152)

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

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.43 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 C.43: 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.44 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 C.44: Overlay of three resonator impulse responses, as in Fig.C.43, 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 © 2024-06-28 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA