필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Finding the strongest beat in a sound wave using autocorrelation

조회 수: 1 (최근 30일)
AwedBy Matlab
AwedBy Matlab 2012년 11월 25일
I have a sound wave representing a piano piece played at a steady tempo, and would like to get a graph of the saliency of each beat. I understand that this is done by plotting the autocorrelation function, however I don't quite understand why a graph of r coefficients against each possible lag value (which is, as far as I udnerstand, the deffinition of an autocorrelogram) would have anything to do with beats.
The following code produces a graph that doesn't in any way suggest anything to do with the actual steady beat of the piece (60 BPM):
[y,Fs] = wavread('d:\bach.wav');
[r,lags]=xcorr(y,'coeff');
plot(lags,r)
Clearly I'm understanding autocorrelation wrongly. For instance, in this very simple example http://upload.wikimedia.org/wikipedia/commons/e/ed/Acf_new.svg, the frequency of the sine hidden in noise is nowhere visible from the autocorrelation graph - or is it? Furthermore, that frequency would actually be the pitch of the sound, and not any rhythm-related measure!
Anticipated thanks for any clarifications!!
  댓글 수: 2
Daniel Shub
Daniel Shub 2012년 11월 26일
I am closing since this doesn't seem to be a MATLAB question, but rather an audio processing theory question.
AwedBy Matlab
AwedBy Matlab 2012년 11월 26일
Thanks for your input Daniel, however I do want to get this problem solved in Matlab (with or without clarification on the theoretical aspect), so if you don't mind could you leave the question open, I appreciate it.

답변 (1개)

AwedBy Matlab
AwedBy Matlab 2012년 11월 26일
Still haven't figured this out, would really appreciate any thoughts from more experienced scientists..

이 질문은 마감되었습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by