Pregunta

Does anyone knows where can a find a matlab algorithm to get music tempo (in beats per minute, or some other measure)? I tried the one from this site: http://www.clear.rice.edu/elec301/Projects01/beat_sync/beatalgo.html But is not giving me good responses.

¿Fue útil?

Solución

Finding the tempo of a musical signal can be a very difficult task. For a simple signal where a single note is played with a fix tempo, maybe that the method proposed by kol would work but, as mentionned by Oli Charlesworth, I do not think that it would be robust enough to give you a good estimate of the tempo for more complex musical signal.

This has a lot to do with musical acoustics (especially the fact that the frequency content of notes played by musical instruments is much more complex than a collection of sine waves) and psychoacoustics (especially the fact that determining the onset time of a note is influenced by its harmonic content)

A good (though maybe hard to read depending on your background) reference is: ftp://wgs.esat.kuleuven.ac.be/sista/bli/scheirer_jasa.pdf

You should also read the answers and comments to this question on DSP: https://dsp.stackexchange.com/questions/386/autocorrelation-in-audio-analysis.

Otros consejos

If you need a single number for a whole music track, then you can do an FFT, and find the largest peak in the relevant frequency band. The frequency of the peak will give you the tempo.

I haven't tried this package from Columbia, but perhaps it would meet your needs. In particular it contains a function tempo.m that calculates the BPM of an audio waveform. It appears to be available under a GPL license.

Hope it works for you!

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top