audio player

EDIT: This project requires the use of msound, a non-blocking audio interface for MATLAB. Unfortunately, msound is not compiled for Mac OS X, as it was developed using PortAudio. More information on msound can be found here.


In my Fall 2012 Intro to Digital Signal Processing course, I designed an audio player and crossover in MATLAB that had the following criteria. The project was presented as a competition, subjectively scored by quality of sound and performance in the crossover round. There is a video floating around somewhere that I hope never makes its way to the Internet of my performance.

  • Your application must be able to function as an audio player with all of the controls specified in Project 1, plus the following:
    • The ability to handle stereo.
    •  The ability to filter the song in real-time (and switch filters on-the-fly).
    • At least seven filters: (1) allpass, (2) lowpass, (3) highpass, (4) bandpass, (5) bandreject, (6) your best-sounding filter, and (7) one IIR filter of your choice. The gains of the filters must be adjustable. The cutoff frequencies don’t have to be adjustable, but it’s highly recommended, since we will tune your filters during judging to give you the best possible shot of winning.
    •  The ability to resample audio to and from different standard rates.
  • Your application must also be able to function as a crossover with the following features:
    •  The ability to separate bass from treble with adjustable gains for each. At a minimum, the bass filter must be a lowpass filter with a cutoff frequency of 500 Hz (adjustable cut-off preferred). At a minimum, the treble filter must be a highpass filter with a cutoff fre-quency of 5 kHz (adjustable cutoff preferred).
    • The source audio in this case will be a mono signal. The bass will be sent to the left channel which will be connected to an amp+subwoofer. The treble will be sent to the right channel which will be connected to tweeters. The source audio will also be connected directly to a set of full-range speakers so that no part of the spectrum is lost.
    •  Note that the system used during judging will be able to support multi-band, stereo ou-put. So, don’t limit yourself to the above minimum requirements. However, to test your code on your own, you’ll need at least two sound cards (or a sound card that has additional outputs).
You can find the MATLAB scripts here, as well as a few pieces of sample audio that I used to test the project.