assignment II
Here is a short follow up on what we started in class.
1. Create a matlab function that returns a sinusoid (a sound vector, i.e. a vector containing samples of the sinusoid). The inputs to the function should be sinusoid frequency, amplitude, duration and sampling frequency.
Analize it with specgram and look at the figure. Explain what you see. Write the results of the specgram command into a matrix. Look at the absolute values of the matrix. Which bins correspond to the sinusoidal frequency? Explain the results. (We did briefly that in class).
2. Modify the function in 1 so that it receives a vector of frequencies and amplitudes (you do not need duration now). The length of there vectors should be equal to the length of the output sound vector. The values of these vectors should be the instantaneous frequency and amplitude at that sample (moment in time). Test your function for a slowly sloping frequency (a slow chirp or glissando, i.e. frequency slowily increasing (or decreasing) in time). Play your result. Does it sound right? Plot it with specgram. What do you see. (Hint: make sure you calculate the phase correctly. We will talk about this in class).
Shlomo

0 Comments:
Post a Comment
<< Home