Shows how cross correlation (autocorrelation) can be used to track the local pitch period of a signal. Code available at dadorran.wordpress.com/2014/09...
I have seen so many papers about pitch estimation using correlation. However, this is the first one that makes me understand so deep! Thank you so much!
Even after doing master I coun't understand the use of these concepts ... you are the best. This video is still valid and need to make this video must watch for all students.
Oh man.... I don't know what to say... this video is freaking awesome. You're the coolest hero in this crazy world. Watching this video brought tears to my eyes. Finally I get the amazing correlation usefulness. This is simply beautiful. Thank you so much!!! :)
Came across autocorrelation while trying to use Fourier Transforms to determine the period of an audio signal, but this is much nicer and more intuitive. Great explanation and helpful code, thanks!
Excellent Video! Just one question. When I use xcorr, I get a triangular diagram. I searched internet and found that I have to normalize the signal. As such I use normxcorr2 to do my job. But... why in your examples you get correct results by using xcorr? Could you elaborate a little bit on that? Thank you very much!
Hi David, Thanks a lot for the video. Very insightful. Quick question though: Does the top code use a sliding window to take portions of your signal for analysis?? and does it take into consideration voiced and unvoiced sound?? I am currently trying to automatically obtain the pitch of my voice and the formants associated with it as well but I am a bit stuck with the math behind it all
Yes it does take a sliding window/frame. These frames are non-overlapping and 40ms in duration - 20ms frames are more common for speech analysis but the longer frame worked better to illustrate what was going on. There is no attempt to differentiate between voiced and unvoiced frames.
Tell me how can I learn about this particular video in-depth. I am interested in this correlation topic and its application and its use with arduino and raspberry(if neccessary)
Hi David, Your videos and explanations are very useful, I would like to ask you how can I import a signal (variable against time series in an excel file) to MATLAB because it doesn't recognize the time series, then do "Linear interpolation" between every two successive points, followed by "Re-sampling" to a lower rate and lastly applying the "FFT". It is a long question but I do really hope that you can help me.
There is a function to read in Excel data. Check out uk.mathworks.com/help/matlab/ref/xlsread.html If that didn't work I'd first export the data as a csv file (plain text comma separated variables) and use csvread uk.mathworks.com/help/matlab/ref/csvread.html Another alternative is to copy the data into a plain text file and just use the load function. e.g. data = load('my_data_file.txt');
@@daleredmond6322 did you manage to do this? I have been trying to do the same thing, but have had a lot of trouble storing each pitch estimate in an array. Any help would be really appreciated!
+MGTOWREZ Measure the frequency at regular time intervals in each signal say every 50ms. Then store these results in a vector/array. Then correlate the vectors. Same process for tempo/speed although your time interval would probably be a longer depending on what you temporal features you're interested in.
Usually zero lag would be shown in the center, although it doesn't have to be. Can you let me know what part of the video you're referring to and I'll check it out.
That's a mistake on my part. You'll see in the code that I didn't plot against lags which resulted in the horizontal axis showing the indices associated with the variable seq (lines 147-149 in dadorran.wordpress.com/2014/09/24/pitchperiod-tracking-using-autocorrelation/). Compare this to line 142 which explicitly plots against lags