Free Books

Doppler Simulation

It is well known that a time-varying delay line results in a frequency shift. Time-varying delay is often used, for example, to provide vibrato and chorus effects [17]. We therefore expect a time-varying delay-line to be capable of precise Doppler simulation. This section discusses simulating the Doppler effect using a variable delay line [468].6.6

Consider Doppler shift from a physical point of view. The air can be considered as analogous to a magnetic tape which moves from source to listener at speed $ c$ (see Fig.5.4). The source is analogous to the write-head of a tape recorder, and the listener corresponds to the read-head. When the source and listener are fixed, the listener receives what the source records. When either moves, a Doppler shift is observed by the listener, according to Eq.$ \,$(5.2).6.7

Figure 5.4: Magnetic tape analogy.

Doppler Simulation via Delay Lines

Figure 5.5: Delay line with variable read-pointers and write-pointers.

This analogy also works for a delay-line based computational model, as depicted in Fig.5.5. The magnetic tape is now the delay line, the tape read-head is the read-pointer of the delay line, and the write-head is the delay-line write-pointer. In this analogy, it is readily verified that modulating delay by changing the read-pointer increment from 1 to $ 1+v_{ls}/c$ (thereby requiring interpolated reads) corresponds to listener motion away from the source at speed $ v_{ls}$. It also follows that changing the write-pointer increment from $ 1$ to $ 1+v_{sl}/c$ corresponds source motion toward the listener at speed $ v_{sl}$. When this is done, we must use interpolating writes into the delay memory. Interpolating writes may be called de-interpolation [502], and they are formally the graph-theoretic transpose of interpolating reads (ordinary ``interpolation'') [333]. A review of time-varying, interpolating, delay-line reads and writes, together with a method using a single shared pointer, are given in [383].

Time-Varying Delay-Line Reads

If $ x(t)$ denotes the input to a time-varying delay, the output can be written as

$\displaystyle y(t)=x(t-D_t).

where $ D_t$ denotes the time-varying delay in seconds. In discrete-time implementations, when $ D_t$ is not an integer multiple of the sampling interval, $ x(t-D_t)$ may be approximated to arbitrary accuracy (in a finite band) using bandlimited interpolation (see §4.4) or other techniques for implementation of fractional delay [267,383].

Let's analyze the frequency shift caused by a time-varying delay by setting $ x(t)$ to a complex sinusoid at frequency $ \omega_s $:

$\displaystyle x(t) = e^{j\omega_s t}

The output is now

$\displaystyle y(t)= x(t-D_t) = e^{j\omega_s \cdot (t-D_t)}.

The instantaneous phase of this signal is

$\displaystyle \theta(t)= \angle y(t) = \omega_s \cdot(t-D_t)

which can be differentiated to give the instantaneous frequency

$\displaystyle \omega_l = \omega_s ( 1 - {\dot D_t}) \protect$ (6.6)

where $ \omega_l $ denotes the output frequency, and $ {\dot D_t}\isdef \frac{d}{dt}D_t$ denotes the time derivative of the delay $ D_t$. Thus, the delay growth-rate, $ {\dot D_t}$, equals the relative frequency downshift:

$\displaystyle {\dot D_t}= \frac{\omega_s -\omega_l }{\omega_s }.

Comparing Eq.$ \,$(5.6) to Eq.$ \,$(5.2), we find that the time-varying delay most naturally simulates Doppler shift caused by a moving listener, with

$\displaystyle {\dot D_t}= -\frac{v_{ls}}{c}. \protect$ (6.7)

That is, the delay growth-rate, $ {\dot D_t}$, should be set to the speed of the listener away from the source, normalized by sound speed $ c$.

Simulating source motion is also possible, but the relation between delay change and desired frequency shift is more complex, viz., from Eq.$ \,$(5.2) and Eq.$ \,$(5.6),

$\displaystyle {\dot D_t}= - \frac{\frac{v_{ls}}{c} + \frac{v_{sl}}{c}}{1-\frac{v_{sl}}{c}}
\approx - \left(\frac{v_{ls}}{c} + \frac{v_{sl}}{c}\right)

where the approximation is valid for $ v_{sl}\ll c$. In Section 5.7.4, a simplified approach is proposed based on moving the delay input instead of its output.

The time-varying delay line was described in §5.1. As discussed there, to implement a continuously varying delay, we add a ``delay growth parameter'' g to the delayline function in Fig.5.1, and change the line

  rptr += 1; // pointer update
  rptr += 1 - g; // pointer update
When g is 0, we have a fixed delay line, corresponding to $ {\dot D_t}=0$ in Eq.$ \,$(5.6). When $ \texttt{g}>0$, the delay grows $ \texttt{g}$ samples per sample, which we may also interpret as seconds per second, i.e., $ {\dot D_t}=\texttt{g}$. By Eq.$ \,$(5.7), we see that we need

$\displaystyle \texttt{g} = -\frac{v_{ls}}{c}

to simulate a listener traveling toward the source at speed $ v_{ls}$.

Note that when the read- and write-pointers are driven directly from a model of physical propagation-path geometry, they are always separated by predictable minimum and maximum delay intervals. This implies it is unnecessary to worry about the read-pointer passing the write-pointers or vice versa. In generic frequency shifters [275], or in a Doppler simulator not driven by a changing geometry, a pointer cross-fade scheme may be necessary when the read- and write-pointers get too close to each other.

Multiple Read Pointers

Using multiple read pointers, multiple listeners can be simulated. Furthermore, each read-pointer signal can be filtered to simulate propagation losses and radiation characteristics of the source in the direction of the listener. The read-pointers can move independently to simulate the different Doppler shifts associated with different listener motions and relative source directions.

Multiple Write Pointers

It is interesting to consider also what effects can be achieved using multiple interpolating write pointers. From the considerations in §5.7.1, we see that multiple write-pointers correspond to multiple write-heads on a magnetic tape recorder. If they are arranged at a fixed spacing, they are equivalent to multiple read pointers, providing a basic multipath simulation. If, however, the write pointers are moving independently, they induce independent Doppler shifts due to source motion. In particular, each write-pointer can lay down a signal from a separate source to a single listener with its own Doppler shift. Furthermore, each write-signal can be passed through its own filter. Such an individualized source filter can implement all filtering incurred along the propagation path from each source to the listener.

When all write pointers have the same input signal, their filters can be implemented using a series chain in which the outputs of successive filters in the chain correspond to progressively longer propagation paths (progressively more filtering). Such an implementation can greatly reduce the filter order required for propagation paths longer than the shortest.

The write-pointers may cross each other with no ill effects, since all but the first6.8 simply sum into the shared delay line.

We have seen that a single delay line can be used to simulate any number of moving listeners (§5.7.3) or any number of moving sources. However, when simulating both multiple listeners and multiple sources, it is not possible to share a single delay line. This is because the different listeners do not see the same Doppler shift for each moving source, and while the listener's read-pointer motion can be adjusted to correct for the Doppler shift seen from any particular source, it cannot correct for more than one in general. Thus, in general, we need as many delay lines as there are sources or listeners, whichever is smaller. More precisely, if there are $ N$ moving sources and $ M$ moving listeners, simulation requires $ \min(N,M)$ delay lines.

Stereo Processing

As a special case, stereo processing of any number of sources can be accomplished using two delay lines, corresponding to left and right stereo channels. The stereo mix may contain a panned mixture of any number sources, each with its own stereo placement, path filtering, and Doppler shift. The two stereo outputs may correspond to ``left and right ears,'' or, more generally, to left- and right-channel microphones in a studio recording set-up.

System Block Diagram

A schematic diagram of a stereo multiple-source simulation is shown in Fig.5.6. To simplify the layout, the input and output signals are all on the right in the diagram. For further simplicity, only one input source is shown. Additional input sources are handled identically, summing into the same delay lines in the same way.

Figure 5.6: Block diagram of a stereo simulator for any number of moving sound sources (from [468]).

The input source signal first passes through filter $ H_0(z)$, which provides time-invariant filtering common to all propagation paths. The left- and right-channel filters $ H^{(n)}_{0L}(z)$ and $ H^{(n)}_{0R}(z)$ are typically low-order, linear, time-varying filters implementing the time-varying characteristics of the shortest (time-varying) propagation path from the source to each listener. (The $ (n)$ superscript here indicates a time-varying filter.) These filter outputs sum into the delay lines at arbitrary (time-varying) locations using interpolating writes. The zero signals entering each delay line on the left can be omitted if the left-most filter overwrites delay memory instead of summing into it.

The outputs of $ H^{(n)}_{0L}(z)$ and $ H^{(n)}_{0R}(z)$ in Fig.5.6 correspond to the ``direct signal'' from the moving source, when a direct signal exists. These filters may incorporate modulation of losses due to the changing propagation distance from the moving source to each listener, and they may include dynamic equalization corresponding to the changing radiation strength in different directions from the moving (and possibly turning) source toward each listener.

The next trio of filters in Fig.5.6, $ H_1(z)$, $ H^{(n)}_{1L}(z)$, and $ H^{(n)}_{1R}(z)$, correspond to the next-to-shortest acoustic propagation path, typically the ``first reflection,'' such as from a wall close to the source. Since a reflection path is longer than the direct path, and since a reflection itself can attenuate (or scatter) an incident sound ray, there is generally more filtering required relative to the direct signal. This additional filtering can be decomposed into its fixed component $ H_1(z)$ and time-varying components $ H^{(n)}_{1L}(z)$ and $ H^{(n)}_{1R}(z)$.

Note that acceptable results may be obtained without implementing all of the filters indicated in Fig.5.6. Furthermore, it can be convenient to incorporate $ H_i(z)$ into $ H^{(n)}_{iL}(z)$ and $ H^{(n)}_{iR}(z)$ when doing so does not increase their orders significantly.

Note also that the source-filters $ H^{(n)}_{iL}(z)$ and $ H^{(n)}_{iR}(z)$ may include HRTF filtering [57,545] in order to impart illusory angles of arrival in 3D space.

Next Section:
Chorus Effect
Previous Section:
Doppler Effect