Goal
There are two types of digital filters applied to audio: Finite Impulse Response (FIR) and Infinite
Impulse Response (IIR). Both types have been studied mathematically with close attention being paid to
the differences in the theory behind each. This course, however, did not have a side-by-side demonstration of the audible characteristics
of the two. How much does phase distortion really matter? Will hundreds of coefficients be enough to bog down
modern computers? The goal of my project is to create an EQ that will allow a user to compare these two methods
in real time.
How-To
To make life easy, I developed a nice GUI. It can be seen in the blog below. Basically,
you can specify the parameters for whatever filter you want, and then play either the
IIR or FIR version, whichever one you want. You can also play them back to back
without changing any parameters for a direct comparison between the two.
What Did We Learn From All This?
In the end, there is a very noticeable difference between FIR and IIR filters.
Something as seemingly insignificant as the phase oh a filter is enough to completley
alter the way it affects an audio signal. I personally like the phase distortion
generated by IIR filters as opposed to the crisp, clean sound of FIRs.
Want To Learn More?
To see my final paper, Click Here.
To view a demo (sorry, no audio commentary),
Click Here.
Final Stages
Early Thursday Morning December 2, 2010
I have just put the finishing touches on my paper. The EQ is fully functional. Both
FIR and IIR algorithms sound and graph accurately. It's been really interesting to
hear the different sounds of each algorithm side-by-side in a completely fair and
honest test. I've found that the post-bop jazz musician inside me likes the rough sound of
the IIR filtering better than the clean FIR sound (for the most part).
This concludes my development blog. I will be posting a demo video shortly. After that
video is up, I will make some final layout changes and call it a night. I could use
the few hours of sleep before presenting at 11.
EQ Update
Monday November 29, 2010
As of today, the EQ is functional for the FIR implementation. I'm using the matlab
function "fir2" to generate a transfer function, "freqz" to display the magnitude response
of the transfer function, and "filter" to actually apply the filter. This means that
you must restart playback to hear any changes in the filter. The current implementation
is not the most efficient - the audio file is reloaded between each start/stop.
There's still room for improvement, but it's pretty good as a "beta" to be played
around with over the next two days.
Currently, IIR implementation is very buggy. The graphical representation of the
filter works sometimes, but the audio never plays - only clicks and pops. Further
debugging is needed before this feature can claim to be even remotely working. IIR
design is being done with the invfreqz function in matlab.
Main Project Idea
Sunday November 21, 2010
There are two types of digital filters applied to audio: Finite Impulse Response (FIR) and Infinite
Impulse Response (IIR). Both types have been studied mathematically with close attention being paid to
the differences in the theory behind each. This course, however, did not have a side-by-side demonstration of the audible characteristics
of the two. How much does phase distortion really matter? Will hundreds of coefficients be enough to bog down
modern computers? The goal of my project is to create an EQ that will allow a user to compare these two methods
in real time.
To create this EQ, I plan on using Matlab for both the GUI and the computations. It will have to be a
parametric EQ of sorts, allowing the user to pick center frequency, Q, and boost/attenuation. Then, there
will be an additional option to switch between IIR and FIR filtering methods. Ideally, the GUI will allow
users to view each filter's magnitude and phase while hearing the affects on any user-defined audio signal.
Mock Up using Matlab
Secondary Project Idea
Sunday November 21, 2010
This idea is more interesting to me, but seems like it would require more than two weeks to accomplish.
Reverberation in large halls is sometimes a good thing. Orchestras sound better in halls that have been
designed properly to create helpful reverb. Some halls, however, sound awful - especially when amplifying
the performers. It would be helpful if, when playing back audio in large halls, it were possible to eliminate
the effects of natural reverb via digital signal processing.
What I'm proposing is inverse reverb. Is it possible to alter a digital signal so that, when played back
in a hall, it sounds "dry?" If so, the applications to sound reinforcement would be astronomical. The
ability to amplify anything without it getting washed out or boomy would be immensely useful.
I haven't given this idea much thought yet, but it seems to me that it will be very hard to accomplish this
with only the house speakers at the front of the hall. Extra speakers seem to be necessary to account for
all the reflections off the walls. Perhaps a speaker array similar to one used for wave field synthesis could
be used to offset the effects of each wall's reflections. Given an array of speakers, it would be possible
to calculate both the delay and the reflected signal. With this information, you could invert the phase
of the reflected signal and play it back through the speakers - essentially creating noise cancelling headphones
for an entire room.
As I said at the beginning of the post, this idea is very intriguing to me, but seems to be out of scope for this project.
Perhaps I could look into it as a senior project of sorts?