Deliverables
 
Your final report should include all your plots and comments. For each group make sure you include everyone's name and only submit one final report per group. Additionally submit all of your code and please write it in a manner it's easy to understand.
 
 
1. Blockwise Correlation
 
     a. Compute a blockwise autocorrelation using Matlab's xcorr function (4096 block size, 256 hop size)
 
     b. using a 3x1 subplot generate a
          1. plot of the waveform of the audio file
 
          2. spectrogram of the audio file (4096 block size, 256 hop size, hamming windowed)
 
          3. plot the correlation results like a spectrogram using imagesc (4096 block size, 256 hop size)
 
 
     c. Repeat part b) with an alternative input file. Discuss the plots. How is a spectrogram plot similar to a correlation plot?
 
     d. program your own autocorrelation function in the time domain
 
     e. program your own autocorrelation function in the frequency domain (hint: think about how correlation is similar to convolution. What are some properties of convolution relating the time and frequency domains?)
 
     f. Repeat part b) with the functions you wrote for parts d) and e) to confirm they're correct. Qualitatively compare the speed of the 3 implementations. Which is fastest? slowest?
 
     g. Create another function which looks for the maximum value of the autocorrelation which takes place after the first zero-crossing for each block. Store the index of this value for each block.
 
     h. Using subplot plot the extracted indices for sax.wav and your alternative audio file. Write a few sentences of your interpretation of the plots. 
 
 
 
 
2. Filtering
 
1) Moving Average Filter
 
     a. generate some white noise
 
     b. write a function which performs a moving average filter on a given signal vector using Matlab's "mean" function
 
     c. Using the white noise as a signal create a figure using subplot to generate 3 windowed spectrograms of the noise run through the filter with coefficients averaging block sizes of
 
          i. 5 samples
 
          ii. 10 samples
 
          iii. 200 samples
 
 
     d. Discuss the plot and listen to the filtered noise. What is happening?
 
     e. Optimize your filter function so that it does not need to compute the mean of the entire block each time.
 
     f. Confirm that you're optimization matches the results of your previous function by repeating step c. with the new optimized function
 
 
 
2) Single Pole IIR Filter
 
     a. generate some white noise
 
     b. write a function which performs a one-pole IIR filter in the form
 
          function [ filtered ] = singleIIR( b,a, X)
 
where b is the feedforward coefficient (numerator), a is the feedback coefficient (denominator), and X is the signal vector
 
     c. Using the white noise as a signal create a figure using subplot to generate 3 windowed spectrograms of the noise run through the filter with coefficients
 
          i. b=1, a=0
 
          ii. b=0.5, a =-0.5 
 
          iii. b=0.1, a=-0.9
 
     d. Discuss the plots and listen to the filtered noise. What is happening?