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!
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, 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.
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
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!!! :)
feeling the same :D
totally agreed!!!!
Feeling the same :D, You are awesome David
same!!!!! We are working on our capstone project and this video showed us the way!!!!!!!!!!!!
Same, thank you so much!
You have a real talent for being able to explain seemingly complex ideas in easy ways. Great video!
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!
Thanks for this! Quite powerful especially the unbiased xcorr towards the end.
Very well explained David! great job!
Very useful for people who are new to DSP, thanks!
This video is super cool. I would be really interested in seeing your explanation of the Yin algorithm as it directly relates to this problem.
This was incredibly helpful -- thanks, David
Glad it helped Mike.
Thank you very much, sir. Very good explanation. I really needed this :D
best accent, best content, excellent teaching!
Thanks Ahmad!
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!
awsome Video . thank you.
Shouldn't the location of first peak be length(x) itself?
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)
Many Thanks :)
Hello Mr David. does it plot pitch contour?
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.
Thank you and thumb up for you
thank you very much
can u please do the series on digital filters
Thank you.
thx!
σε αγαπώ!
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');
What are thos ip and fs? I wanna to use that correlation, but I'm working in python (with ''w, signal = scipy.io.wavfile.read(filepath)'')
Hi David,
How do you calculate the min and max pitch frequency in Hz?
+Dale Redmond you could store the pitch estimate for each frame in an array and then use the min and max functions.
+David Dorran, thanks David.
@@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!
can you write code in video,please
thanks s a LOT
how to find time delay of two signals by correlation
pls make a python tutorial pitch detection app which plays the piano tone of the pitch
How can I find a correlation in terms of frequency and speed between two audio files? Please reply.
+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.
why is your cross correlation function not centred on zero?
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.
@@ddorran everything from 12:29 onwards
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
@@ddorran ok thanks for explaining
Shivd