964 Chapter 25
a whole DSP! Suddenly, except for a few rather special
and esoteric circumstances, such as phase-linear EQ and
auto adaptivity, it becomes obvious why FIRs are not
particularly popular in mainstream audio DSP
processing. They are rather hardware and time thirsty.
Impulse response coefficient sets suitable for plug-
ging into transversal filters may be either calculated
(long-handed for the rigorously inclined, or within any
of the many excellent filter design programs available)
or, as in the only half-joking bell example above,
recorded by issuing an impulse into a pet filter and
using the resulting sampled output as coeffi-
cients—audio played through an FIR with those coeffi-
cients will sound just as if it was passing through the
original filter. As earlier mentioned, there are reverbera-
tion units working exactly on that principle.
25.21.1.2 Windowing
Any attempt to generate a set of coefficients for FIRs
will run into the problem that an ideal filter simply will
not fit into the length of any practical filter. Obviously,
the filter has to be long enough to realistically encom-
pass the meat of the desired processing (a 99 point filter
won’t do 50 Hz, remember?), but this still leaves the
problem that the filter is finite in length. A series of FIR
filter designs showing the impulse responses and corre-
sponding frequency responses of a 33 point (33 step
long) nominally 12 kHz high-pass filter highlight the
quart/pint-pot tradeoffs. Truncation—i.e., lopping the
end(s) off to make it fit—leads to Gibb’s phenomenon,
in which the desired output frequency response of the
filter is seriously compromised by large lobes, Fig.
25-132.
Mr. Hanning, Mr. Hamming, and Mr. Harris (among
others) come to the rescue here, with a technique called
windowing. These apply weighting to the values of the
coefficient set, basically leaving the most significant
elements (usually in the middle of the set) alone and
Figure 25-131. An impulse response becomes a filter.
1
B. Impulse response used as coefficients in a transversal filter.
A. An impulse response.
Accumulator Output
Output with impulse
Values
Sample interval
Amplitude
Input impulse
+1
0
1
+0.65+0.95+0.95+0.6 0
.5
.7
.65
.5 0 +0.25+0.45+0.45+0.3 0
.2
.3
.3
.2 0 +0.15+0.25+0.25+0.15 0
.1
.15
.15
.05 0 +0.075+0.1+0.1+0.075+0.05
.025
.05
.05
.025 0 +0.02+0.01 0
Time
Figure 25-132. A 33-point unwindowed FIR filter.
0 0.1333 0.2667 0.4 0.5333 0.6667
0.437
0.219
0
0.219
0.437
Time–ms
Frequency–Hz
0 4800 9600 14,400 19,200 24,000