HCI 575: Homework 5

List of Audio Libraries and References

The following list of C libraries and references for audio processing is provided for your convenience only. You are not required to use any of these libraries or to browse any material to solve the homework problems:

You do not need to use C++ for this assignment.

1. Recognize Note from Audio

Your task is to write a program that can detect a single note in an audio data and print it. The program should handle audio generated by different musical instruments. The notes will be restricted to piano notes listed in this Wikipedia page (also cached here in PDF), but any of these notes may be the one. The program should print the note in the scientific notation.

Hint: one way to solve this problem is to perform frequency-domain analysis (e.g., using a spectrogram) of the audio data and look for the location of peaks. The highest peak should be at the frequency of the note.
Students with perfect pitch are not exempt from solving this problem. The note must be detected by the program and not by the programmer.

Part A. Piano

Audio Data Note Program Output
C4 Output of your program.
B2 Output of your program.
F6 Output of your program.
Output of your program. Output of your program.
Output of your program. Output of your program.
Output of your program. Output of your program.
Output of your program. Output of your program.
Put your code here

Part B. Different Instruments

Instrument Audio Data Note Program Output
Piano C4 Output of your program.
Electric Guitar C4 Output of your program.
Violin A4 Output of your program.
Violin Output of your program. Output of your program.
Trumpet Output of your program. Output of your program.
Trumpet Output of your program. Output of your program.
Tuba D2 D3
Bassoon Output of your program. Output of your program.
Marimba Output of your program. Output of your program.
Marimba Output of your program. Output of your program.
Put your code here

2. Recognize Sequences of Notes

In this problem you have to write a program that can recognize single notes in a sequence and print them in the same order as they are played. The program should print the note in the scientific notation. There are no chords in the audio data.

Part A. Short Piano Melodies, Single Notes

Audio Data Notes Program Output
C4 C4 G4 G4 A4 A4 G4 Output of your program.
Output of your program. Output of your program.
Output of your program. Output of your program.
Put your code here

Part B. Short Melodies Played with Different Instruments, Single Notes

Instrument Audio Data Notes
Electric Piano C#2 C#2 C#2 C#2 B2 B2 B2 C#3 D3 Output of your program.
Electric Piano Output of your program. Output of your program.
Radio Tuning Signal Output of your program. Output of your program.
Put your code here

3. Recognize Chords

In this problem your goal is to detect chords in audio data and print the notes that constitute the chords. You can assume that all testcases will be with a piano. The program should print the notes in any order in the scientific notation.

Part A. Single Piano Chords

Audio Data Chord Notes Program Output
(G3,D4) Output of your program.
(F2,Cb3,D3,A3,Cb4,D4,F4,Ab4,C5) Output of your program.
Output of your program. Output of your program.
Output of your program. Output of your program.
Output of your program. Output of your program.
Put your code here

Part B. Short Piano Melodies with Chords

The program should indicate the chord by placing the constituting notes in parentheses, e.g. “(C4,E4,G4)”.

Audio Data Notes and Chords Program Output
(G3,D4) (G3,D4) (G3,D4) C4 (G3,D4) (C4,F4) (G3,C4,F4) Output of your program.
Output of your program. Output of your program.
Output of your program. Output of your program.
Put your code here