Linear interpolation works by effectively drawing a straight line between two neighboring samples and returning the appropriate point along that line.
More specifically, let be a number between 0 and 1 which represents how far we want to interpolate a signal between time and time . Then we can define the linearly interpolated value as follows:
Note that by factoring out , we can obtain a one-multiply form,
A linearly interpolated delay line is depicted in Fig. 3.2.
The C++ class implementing a linearly interpolated delay line in the Synthesis Tool Kit (STK) is called DelayL.
The frequency response of linear interpolation for fixed fractional delay ( fixed in Fig. 3.2) is shown in Fig. 3.3. From inspection of Fig. 3.2, we see that linear interpolation is a one-zero FIR filter. When used to provide a fixed fractional delay, the filter is linear and time-invariant (LTI). When the delay provided changes over time, it is a linear time-varying filter.
Linear interpolation sounds best when the signal is oversampled. Since natural audio spectra tend to be relatively concentrated at low frequencies, linear interpolation tends to sound very good at high sampling rates.
When interpolation occurs inside a feedback loop, such as in digital waveguide models for vibrating strings (see Chapter 4), errors in the amplitude response can be highly audible (particularly when the loop gain is close to 1, as it is for steel strings, for example). In these cases, it is possible to eliminate amplitude error (at some cost in delay error) by using an allpass filter for delay-line interpolation.