Delay Lines
The delay line is an elementary functional unit which models acoustic propagation delay. It is a fundamental building block of both delay-effects processors and digital-waveguide synthesis models. The function of a delay line is to introduce a time delay between its input and output, as shown in Fig.2.1.
Let the input signal be denoted , and let the delay-line length be samples. Then the output signal is specified by the relation
where for .
Before the digital era, delay lines were expensive and imprecise in ``analog'' form. For example, ``spring reverberators'' (common in guitar amplifiers) use metal springs as analog delay lines; while adequate for that purpose, they are highly dispersive and prone to noise pick-up. Large delays require prohibitively long springs or coils in analog implementations. In the digital domain, on the other hand, delay by samples is trivially implemented, and non-integer delays can be implemented using interpolation techniques, as discussed later in §4.1.
A Software Delay Line
In software, a delay line is often implemented using a circular buffer. Let D denote an array of length . Then we can implement the -sample delay line in the C programming language as shown in Fig.2.2.
/* delayline.c */ static double D[M]; // initialized to zero static long ptr=0; // read-write offset double delayline(double x) { double y = D[ptr]; // read operation D[ptr++] = x; // write operation if (ptr >= M) { ptr -= M; } // wrap ptr // ptr %= M; // modulo-operator syntax return y; } |
Delay lines of this type are typically used in digital reverberators and other acoustic simulators involving fixed propagation delays. Later, in Chapter 5, we will consider time-varying delay lengths.
Next Section:
Acoustic Wave Propagation Simulation
Previous Section:
Elementary Physical Modeling Problems