Beat Detection from Note Onsets?
How do you determine which Note Onsets are beats? Currently, what I have is sort of like a 'brute force' method using what is called 'pulse-trains'.
Basically, the idea is, you generate pulse-trains from a minimum tempo to a maximum tempo. These pulse trains are just representations of when a beat occurs in a particular tempo. For example, if Tempo = 60bpm (beats per minute), the pulse train has beats t开发者_如何学Pythonhat occur at intervals of 1 second (60 / 60 bpm). For Tempo = 120bpm, the pulse train has beats that occur at intervals of .5 seconds (60 / 120bpm).
Now basically, I just use these pulse trains to compare and contrast how close Note Onsets occur on the supposed beats. So generally, the idea is that if note onsets occur closer to a beat location, the overall difference will be smaller. Then its just basically picking the tempo with the smallest overall difference.
However, I have encountered two problems regarding this implementation.
1.) Having perfect locations for the note onsets are seldom the case, especially through recorded music (which I am working with), which results in generally poorer results.
2.) Higher tempos will result in lesser intervals, which results it in becoming a better candidate for music that have off-beat onsets (i.e. 8th notes, 16th notes), rather than the actual better tempo for the music (i.e. 60bpm with purely 8th notes will probably return 120bpm)
Can you suggest some other (even simple) methods of beat detection? I would like to implement the algorithm myself so as to gain experience, so helpful links for tutorials will be very much appreciated. Thank you!
There are quite a few interesting approaches on this page.
I'd suggest checking out Dan Ellis' technique. It's intuitive, and there's code available in Matlab and Java.
For a lot of music, "Grove" and "Swing" will alter the location of the note onsets from strict tempo locations in time. A statistical pattern matching technique, where you match the spectral patterns of whole measures or whole phrases against time shifted copies of the music might work better. Then you still need to estimate a divisor to go from measures/phrases per minute to beats per minute.
精彩评论