Project Two - Filters

Due: 11:59 pm 2004-05-07

This assignment was created by Dan Noland. Please address all questions about the assignment to him. Be sure to read the course mailing list (cs490-dsp@cs.purdue.edu) for his answers to questions of general interest.

Objective

Simple digital filters are the foundation of many more complex signal processing applications. This project will familiarize you with the basics.

Project Details

Your assignment is to write a program (and hopefully some reusable functions) that will create and use the four basic types of filter. These include the following:

  1. A high pass filter that removes all frequencies below a specified cutoff value.
  2. A low pass filter that removes all frequencies above a specified cutoff value.
  3. A band pass filter that removes all frequencies that are not contained within a specified range.
  4. A band stop filter that removes all frequencies that are within a specified range.

You should also provide a small driver program that uses your library. This driver should use your functions to create and apply a filter a WAVE file given as input. The results of this operation should be stored into a new WAVE file.

You may use any language you like for this project. If you do not use one of the "C descendant languages" C/C++/C#/Java then please attach a README indicating how I can test your code. A Makefile is strongly recommended. You may not use any existing sound libraries.

Sample Interface

gridlock: [~] $ ./a.out
**************************
***** Filter Program *****
**************************
(1) Create a high pass filter
(2) Create a low pass filter
(3) Create a band pass filter
(4) Create a band stop filter
Choice: 1
Please Enter the Low Pass Filter Cutoff Frequency (in Hz): 10000
Please Enter the Source Filename: t1.wav
Please Enter the Destination Filename: new.wav
gridlock: [~] $
gridlock: [~] $ ./a.out
**************************
***** Filter Program *****
**************************
(1) Create a high pass filter
(2) Create a low pass filter
(3) Create a band pass filter
(4) Create a band stop filter
Choice: 3
Please Enter the First Band Pass Filter Cutoff Frequency (in Hz): 5000
Please Enter the Second Band Pass Filter Cutoff Frequency (in Hz): 10000
Please Enter the Source Filename: t1.wav
Please Enter the Destination Filename: new.wav
gridlock: [~] $

Error Checking

Turnin: