List of Audio Libraries and References The following list of C libraries and references for audio processing is provided for convenience only. You are not required to use any of these libraries or to browse any material to solve the homework problems: The fastest Fourier Transform in the West [http://fftw.org/] library. Aubio [http://aubio.org/]. libsndfile [http://www.mega-nerd.com/libsndfile/]. Example code for computing the spectrogram in C: alsgram.zip. The Fourier Transform and its Applications : Video Course [http://www.youtube.com/view_play_list?p=b24bc7956ee040cd]. Problem 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 [http://en.wikipedia.org/wiki/piano_key_frequencies] (also cached here in PDF), but any of these notes may be the one. The program should print the note in the scientific notation [http://en.wikipedia.org/wiki/scientific_pitch_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 c4-piano.wav Note C4 piano-note2.wav piano-note3.wav piano-note4.wav piano-note5.wav piano-note6.wav piano-note7.wav Part B. Different Instruments Instrument Note Piano c4-piano.wav C4 Electric Guitar c4-guitar.wav C4 Violin violin-note1.wav Violin violin-note2.wav Trumpet trumpet-note1.wav Trumpet trumpet-note2.wav Tuba tuba-note1.wav 1 of 5 2/21/12 11:48 AM
Bassoon bassoon-note1.wav Marimba Marimba marimba-note1.wav marimba-note2.wav Problem 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 [http://en.wikipedia.org/wiki/scientific_pitch_notation]. There are no chords in the audio data. Part A. Short Piano Melodies, Single Notes Notes short-melody-example-1.wav C4 C4 G4 G4 A4 A4 G4 short-melody-1.wav short-melody-2.wav Part B. Short Melodies Played with Different Instruments, Single Notes Instrument Notes Electric Piano electric-piano-example-1.wav C#2 C#2 C#2 C#2 B2 B2 B2 C#3 D3 Electric Piano short-melody-3.wav Radio Tuning Signal short-melody-4.wav 2 of 5 2/21/12 11:48 AM
Problem 3. Recognize Chords In this problem 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 [http://en.wikipedia.org /wiki/scientific_pitch_notation]. Part A. Single Piano Chords Chord Notes example-chord-1.wav (G3,D4) example-chord-2.wav (F2,Cb3,D3,A3,Cb4,D4,F4,Ab4,C5) chord-1.wav chord-2.wav chord-3.wav 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). Notes and Chords short-melody-example-2.wav (G3,D4) (G3,D4) (G3,D4) C4 (G3,D4) (C4,F4) (G3,C4,F4) short-melody-5.wav short-melody-6.wav Problem 4. Extra Credit: Convert Long Melodies to MIDI Format Modify the sequence recognition code so that it can convert a complete rendition to a file in MIDI format [http://en.wikipedia.org /wiki/midi]. The MIDI format is essentially a list of notes encoded in a special way so that the temporal layout of the audio is taken care of. To get the extra credit, it is sufficient that the majority of tunes below are recognizable from their MIDI versions produced by program. Instrument MIDI file 3 of 5 2/21/12 11:48 AM
Piano piano-sequence-1.wav Piano piano-sequence-2.wav Piano sequence-piano-1.wav Piano sequence-piano-2.wav Electric Piano sequence-piano-3.wav Piano sequence-piano-4.wav Electric Guitar (Solo) sequence-electric-1.wav Piano sequence-piano-5.wav Clarinet clarinet-sequence1.wav Radio Tuning Signal tuning-signal.wav Problem 5. Extra Credit 2: Synchronize Sheet Music to Audio In this problem task is to write a program that can synchronize sheet music to audio. As the notes are being played, their color should change. The result should look somewhat like karaoke with notes. It is absolutely crucial for the synchronization to be accurate. It is OK to generate a track separately, but it will simplify grading if you can merge the and the audio tracks in a free editor such as VirtualDUB [http://www.virtualdub.org/] or in a commercial editor such as imovie, Final Cut Pro, or Adobe Premiere. If you choose to generate a track separately, then make sure that the duration of the matches the duration of the audio track and that the music is in sync if it is started together with the. The meaning of various musical symbols is described in this Wikipedia article [http://en.wikipedia.org/wiki/list_of_musical_symbols]. The relationship between audio frequencies and musical scales is described in another useful Wikipedia article [http://en.wikipedia.org /wiki/mathematics_of_musical_scales]. To simplify grading submission, you may upload s into Youtube and embed them in this wiki as described in this tutorial. ding s is optional. For the required part of this assignment, you need to synchronize only the piano. Only the piano part in the sheet music is shown. The code should be able to filter out the orchestra if this is required to track the piano progress through the notes. Even if you embed the s, you still must attach the file into the wiki. Attaching output s is MANDATY. Composer Artist Name Range Sheet Music Picture Example Output Frame Output Output Video Video (attachment) (embed) Ludwig Van Beethoven Valentina Lisitsa Fur Elise :00-:06 furelise-1.wav TBD Link. Sergei Arthur Rachmaninoff Rubinstein Concerto No. 2, Op. 18 :00-:22 rachmaninoff-1.wav TBD in C Minor Link. 4 of 5 2/21/12 11:48 AM
Sergei Arthur Rachmaninoff Rubinstein Concerto No. 2, Op. 18 :22-:31 rachmaninoff-2.wav TBD in C Minor Link. (Extra Credit)^2 1. 2. Synchronize the piano in the complete recording of Fur Elize. The sheet music and the audio is available from this website [http://www.forelise.com/]. Synchronize the piano and the orchestra in the complete recording of Concerto No. 2 Op. 18 in C Minor. You may use other scores and sheet music of comparable complexity if you like. hw4_template.txt Last modified: 2012/02/20 13:34 by sukhoy 5 of 5 2/21/12 11:48 AM