
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An assignment for the music information retrieval course, where students are required to write a matlab function to generate a sinusoid with logarithmically changing frequency, calculate its spectrogram using different window sizes, hop sizes, and window functions, and compare the results. The assignment includes instructions for using matlab functions and provides suggestions for variations and additional tasks.
Typology: Exercises
1 / 1
This page cannot be seen from the preview
Don't miss anything!
MPATE-GE 2623 Music Information Retrieval - Assignment # 1 Instructor: Juan Pablo Bello
Please check the course’s website for detailed submission instructions.
Write a Matlab function that creates a 1-second long sinusoid using the equation x(t) = a ∗ sin(2πf t), where a = 0.95, the sampling frequency fs = 44. 1 kHz, and the frequency of the sinusoid changes logarithmically over time between f = 500Hz and f = 5kHz. Use the “logspace” function for this.
Using a rectangular window of size N = 128, and a hop size h = N/2, calculate and plot the spectrogram of this signal such that the x-axis represents time, the y-axis represents frequency and the z-axis (figure’s colorcode) represents the spectral magnitude in dB. Use Matlab’s “spectrogram” and “imagesc” functions for this (read their help files carefully before using them). What do you see? What are the frequency and time resolutions of this representation? Include graphs and comments in your report as necessary.
Try the following variations:
What happens when you introduce each of these variations? Why? Include graphs and comments in your report as necessary.
Extra point: Implement a Matlab function for the computation of the spectrogram using matrix multiplication (as discussed in class) rather than the “fft” function. Use the “buffer” function to break the signal into N -long overlapping blocks. Make sure this function operates exactly as the “spectrogram” function. Plot the magnitude of both spectrograms in decibels, compare results using the frequency-varying sinusoid and comment on the differences between both implementations. Include graphs in your report as necessary.