Digital Signal Processing Reference
In-Depth Information
the nonreal-time versions of the filters. The manner in which this will be
accomplished is the following. Two sound files have been included on the
software disc included with this text, and we can record other sound files using
our sound cards. These sound files can be filtered using WFilter, which has been
included with this text. After filtering the sound files, we can compare the results
using the sound card to play the original and filtered versions of the sound files.
(Please read the documentation for your sound card to determine how to record
and play sound files.) To get further information on sound file formats and the C
code used in filtering the files, please refer to Appendix I.
To demonstrate the ease of filtering waveforms, we'll design a digital filter
and use it to filter one of the waveforms on the software disc in our next example.
Example 8.1 IIR Digital Filtering of Waveform
Problem: Determine the effects on music.wav (available on the CD) when it
is filtered by a digital Butterworth IIR filter with the following characteristics:
a pass = −0.5 dB, a stop = −60 dB, f pass = 800 Hz, and f stop = 1,600 Hz
Solution: First, we design the filter using WFilter. Since we will be filtering a
file sampled at 22,050 Hz, we use that value as the sampling frequency. After
designing the filter, we can select Filter Wave File from the Options menu. The
following dialog box will be shown.
Figure 8.6 Filter Wave File dialog box.
We can identify the file to be filtered by typing directly into the dialog box or
by using the browse button to locate the file. After specifying the input and output
file names, simply press the Filter button and the filtering action will take place.
You will be able to tell when the filtering has finished by the play buttons being
enabled. Now we can compare the two sound files by playing each file
individually. Notice that the lowpass filter was successful in eliminating the
chimes from the original version.
Search WWH ::




Custom Search