I've got two wav's, which are two different piano playing the same note, and with Matlab I've already plotted the fft, but I want to calculate the similarity between them, a.k.a. the correlation coefficient, so how can I do that? Thanks.
Asked
Active
Viewed 215 times
1 Answers
0
Cross correlation is usualy applied to the time space. Not the spectrum.
Just use matlab xcor
, and choose the max of the output result. That will have the delay compensated.
It's uderstood that both signals must be of the same sample rate.

xvan
- 4,554
- 1
- 22
- 37
-
So if I use xcorr of both fft's and I choose the max output of the matrix, then that number will tell me how similar they are? My objective is to determine how different is one from another, even though they are playing the same note, it won't be the same. Thank you very much, I really appreciate it. – Alonso Perez Mar 28 '16 at 05:13
-
Apply xcorr to the time signals, not their fft. Xcorr normalises the signals power, and the maximum coefficient corresponds to the best compensated delay. – xvan Mar 28 '16 at 11:12