List of Audio Libraries and References
The following list of C / C++ libraries and references for audio processing is provided for your convenience only.
You are not required to use any of these libraries / references for this homework.
-
Keep It Simple, Stupid FFT library.
-
librosa a Python library.
-
Audacity. Useful for analyzing raw audio (waves) and modifying audio files (ie. stereo <--> mono).
-
Example code for computing the spectrogram in C: alsgram.zip.
Part 1: Signal Processing Onramp
For this part complete the Matlab signal processing onramp tutorial posted here. Take three screenshots as you complete this course (around 30%, 60% and 100% done). Link these photos below to prove that you did the course.

Part 2a: Slow DFT
Implement the Discrete Fourier Transform (DFT) in C, C++, MATLAB, Java, or Python. Implement the slow version that multiplies the transform matrix by the input vector in O(N2) time. Your code should support input vectors of size up to 1024. In addition, you must implement your own functions to deal with complex numbers.
// Insert your code here
Part 2b: Slow IDFT
Implement the Inverse Discrete Fourier Transform (IDFT) in C, C++, MATLAB, Java, or Python. Implement the slow version that multiplies the transform matrix by the input vector in O(N2) time. Your code should support input vectors of size up to 1024. In addition, you must implement your own functions to deal with complex numbers.
// Insert your code here
Part 3a: FFT
Implement the Fast Fourier Transform (FFT) in C, C++, MATLAB, Java, or Python. Implement the fast version that uses recursion and runs in O(n log2 n) time. Note that you are not allowed to use MATLAB's implementation nor any other existing library for this problem. Your code should support input vectors of size up to 1024. Use your code from Part 2a to cross-check your implementation. In part 3, you can use any library functions that work with complex numbers (but not in part 2).
// Insert your code here
Part 3b: IFFT
Implement the Inverse Fast Fourier Transform (IFFT) in C, C++, MATLAB, Java, or Python. Implement the fast version that uses recursion and runs in O(n log2 n) time. Note that you are not allowed to use MATLAB's implementation nor any other existing library for this problem. Your code should support input vectors of size up to 1024. Use your code from Part 2b to cross-check your implementation. In part 3, you can use any library functions that work with complex numbers (but not in part 2).
// Insert your code here
Part 4a: FFT check
Using your implementation from Part 2a and 3a, compute the Discrete Fourier Transform of the following vector:
[ 0, 0.3827, 0.7071, 0.9239, 1, 0.9239, 0.7071, 0.3827, 0, -0.3827, -0.7071, -0.9239, -1, -0.9239, -0.7071, -0.3827 ]
Note: This function is a sine wave sampled every π/8 radians, you may choose to calculate this vector with more decimal places.
// Insert your resulting vector here
// Insert your resulting vector here
Compare your output with the output generated by MATLAB's fft() method for the same vector. Include the result below, and point out any discrepancies. You may also use one of the FFT libraries above, if you choose.
// Insert your new resulting vector here
// Insert any comments here
Part 4b: IFFT check
Using your implementation from Part 2b and 3b, compute the inverse Discrete Fourier Transform of the following vector:
[ 0, 0, -8i, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8i, 0 ]
// Insert your resulting vector here
// Insert your resulting vector here
Compare your output with the output generated by MATLAB's ifft() method for the same vector. Include the result below, and point out any discrepancies. You may also use one of the IFFT libraries above, if you choose.
// Insert your new resulting vector here
// Insert any comments here
Part 5a
Using any FFT and IFFT implementation, compute and plot the spectrograms for the following 3 audio files.
Audio Data | Spectrogram |
---|---|
![]() |
|
![]() |
|
![]() |
// Insert your code here
Part 5b
Repeat part 5a but this time use audio files that you recorded while playing an instrument or playing your favorite game. Describe how the files were recorded (e.g., sampling frequency, duration) and the parameters used in the spectrogram. All description material can be left in the comments of your code. Modify the HTML template so that your files are linked and your spectrograms are shown to the right of each audio file. Replace the three audio files in this folder with your own files.
Audio Data | Spectrogram |
---|---|
![]() |
|
![]() |
|
![]() |
// Insert your code here
Part 6
Your task is to write a program that crops a given audio file in order to remove any silence before the beginning of the real signal (either speech or tone). Your program should output the cropped audio as a new file, which you can link in the HTML report.
Part 6a. Voice Clip Onset Detection
Input Clip | Output Clip |
// Insert your code here
Part 6b. Audio Clip Onset Detection
Input Clip | Output Clip |
// Insert your code here
Part 7
Write a program to detect the tempo/beat using audio processing techniques. Your program should output a number corresponding to the beats per minute for the given input file. Put that number in the Program Output column.
Part 7a. Metronome
Input Clip | Program Output |
Program output |
|
Program output |
// Insert your code here
Part 7b. Drums
Input Clip | Program Output |
Program output |
|
Program output |
// Insert your code here
Part 8
Write a program to remove one note/tone from an audio file using the FFT and IFFT. You should output the resulting audio to a new file.
Part 8a: DTMF
Remove the highest frequency peak from all of the given clips.
These tones are the same ones that are used when dialing a phone number. For more information: DTMF tones.
Input Clip | Output Clip |
// Insert your code here
Part 8b: Sine Wave Chords
Remove the middle frequency peak from all of the given clips.
Input Clip | Output Clip |
// Insert your code here
Part 9
Using any implementation compute and graph the MFCCs of the provided audio clips
The MATLAB MFCC documentation can be located here.
Part 9a: Single Words
Audio Data | Spectrogram |
---|---|
![]() |
|
![]() |
Part 9b: Sentences
Audio Data | Spectrogram |
---|---|
![]() |
|
![]() |
// Insert your code here
Part 10
Write a program that replicates a given audio signal. To do this you will manually analyze the spectrogram to identify the key points and frequencies of the signal. Then, write your own code to synthesize a similar signal.
Input audio:
Part 10a: Analysis
Derive the approximate parameters from the spectrogram of the input wave.
Spectrogram

Parameters
Parameter | Value |
---|---|
Start Frequency | ? |
Peak Frequency | ? |
End Frequency | ? |
Time to Peak (ms) | ? |
Clip Length (ms) | ? |
Part 10b: Synthesis
Using MATLAB, attempt to generate a signal that is equal to the given input and output the result to a file. Your output should be nearly identical in frequency to the input. The volume of you output clip may be different from the input.
Hint: You may find MATLAB's chirp function to be very useful for this part.
Output Audio:
// Insert your code here
Part EC1
Implement your own spectrogram program using C, C++, Java, Python or MATLAB. You must implement the spectrogram code completely yourself. You may use external libraries for graphical rendering or FFT purposes only.
Use your spectrogram code to create spectrograms for the following audio files
Audio Data | Spectrogram |
---|---|
![]() |
|
![]() |
|
![]() |
// Insert your code here
Part EC2
Read over this example from Mathworks. Impliment this technique for focus detection in MATLAB, C, C++, or Python. You may use any external libraries to accomplish this task.
Using the program you wrote determine if the following images are in focus or not and what their 'relative focus' is.
Input Image | In Focus? | Relative Focus |
---|---|---|
![]() |
? | ? |
![]() |
? | ? |
// Insert your code here