Description
1. Pitch tracking and wav file synthesis
Listen to scale.wav and write a program to synthesize a sinusoidal wav file which contains
the same notes. You may consider the following steps:
• Use open source pitch detection tools to detect the f0 of the notes in scale.wav.
Hint: you can use Sonic Visualiser with pYIN plugin.
• Check the output of pitch detection and find out the start and end time of each note.
• Generate a sine wave for each note and concatenate them together with the same
time arrangement as the original scale.wav.
• Use a sampling rate of 44100Hz to save your synthesized wav file to sin scale.wav.
Hint: use scipy.io.wavfile.write().
• Listen to sin scale.wav and compare it with scale.wav. Why do the same notes
sound differently in these two wav files? Save your answer to comparison.txt.
Hint: you can plot the time-aligned spectrograms of two wav files to find the difference.
2. Note length modification
Choose one of the eight notes in scale.wav and increase the length of it by 2 seconds.
You may consider the following steps:
• Read the data from scale.wav and plot it.
• In the plot, find a single complete period of the note.
• Increase the length of the note by looping this period for several times.
Hint: you can use numpy.concatenate().
• Save your modified data to long scale.wav.
3. Submit a zip file to IVLE containing your source code, two wav files and your answer
to the question (comparison.txt). Name the zip file using your student number (e.g.
A0123456H.zip). Late submissions will receive no marks.
4. Grading scheme:
• 2/8 marks: correct wav file for task 1.
• 2/8 marks: correct answer to the question in task 1.
• 2/8 marks: correct wav file for task 2.
• 2/8 marks: readable source code.
1