Another widely used technique to obtain the fractional part of a desired
delay length makes use of unit-magnitude IIR filters, i.e., allpass filters. Since
the magnitude of these filters is constant there is no frequency-dependent attenuation,
a property that can never be ensured by FIR filters. The simplest allpass
filter has order one, and it has the following transfer function:
H
a
z=c+z-11+cz-1
H
a
z
c
z
1
c
z
(10)
In order to make sure that the filter is stable, the coefficient
c
c
has to stay within the unit circle. Moreover, if we stick with real coefficients,
c
c
belongs to the real axis. The phase delay given by the filter Equation 10
is shown in Figure 3 for several values of the coefficient
c
c. It is clear that the phase delay is not as flat as in the case of the FIR interpolator, depicted in
Figure 2.
It is easy to verify that, at frequencies close to dc, the phase response of
Equation 10 takes the approximate form
∠Hω≃−sinωc+cosω+csinω1+ccosω≃−(ω1−c1+c)
H
ω
ω
c
ω
c
ω
1
c
ω
ω
1
c
1
c
(11)
where the first approximation is obtained by replacing the argument of the
arctan
with the function value and the second approximation, valid in an even
smaller neighborhood, is obtained by approximating
sinx
x
with
x
x
and
cosx
x
with
1
1. The phase and group delay around dc are
τ
ph
ω≃
τ
gr
ω≃1−c1+c
τ
ph
ω
τ
gr
ω
1
c
1
c
(12)
Therefore, the filter coefficient
c
c
can be easily determined from the desired low-frequency delay as
c=1−
τ
ph
01+
τ
ph
0
c
1
τ
ph
0
1
τ
ph
0
(13)
Figure 3 shows that the delay of the allpass filter is approximately constant
only in a narrow frequency range. We can reasonably assume that such range,
for positive values of
c
c
smaller than one, extends from
0
0 to
F
s
5
F
s
5
. With
F
s
=50kHz
F
s
50
kHz
we see that at
F
s
5=10kHz
F
s
5
10
kHz
we have an error of about
0.05
0.05
samples. In a note at that frequency produced by a feedback delay line, such an
error produces a pitch deviation smaller than
1%
1
%
.
For lower fundamental frequencies, such as those found in actual musical instruments, the error is smaller
than the just noticeable difference measured with slow pitch modulations. If the first-order filter represents an elegant and efficient solution to the
problem of tuning a delay line, it has also the relevant side effect of detuning
the upper partials, due to the marked phase nonlinearity. Such detuning can be
tolerated in most cases, but has to be taken into account in some other contexts.
If a phase response closer to linear is needed, we can use higher-order allpass filters
[1].
In some cases, especially in sound synthesis by physical modeling,
a specific inharmonic distribution of resonances has to be approximated. This
can be obtained by designing allpass filters that approximate a given phase
response along the whole frequency axis. In these cases the problem of tuning
is superseded by the more difficult problem of accurate partial positioning
[2].
With allpass interpolators it is more complicated to handle continuous delay
length variations, since the recursive structure of the filter does not show an obvious
way of transferring memory cells from and to the delay line, as it was in
the case of the FIR interpolator, which is constructed on the delay line by a
certain number of taps. Indeed, the glissando can be implemented with the allpass
filter by adding a new cell to the delay line whenever the filter coefficient
becomes one and, at the same time, zeroing out the filter state variable and the
coefficient. What is really more complicated with allpass filters is to handle
sudden variations of the delay length, as they are found, for instance, when a
finger hole is opened in a wind instrument. In this case, the recursive nature of
allpass filters causes annoying transients in the output signal. Ad hoc structures
have been devised to cancel these transients
[1].
"A clear introduction to producing time delays and echo effects in audio signals."