Beats are slightly late
See original GitHub issueI was noticing that the beats detected using the beat module (both plp
and beat_track
) were a fraction of a second delayed compared to where I’d expect them to be.
Graphing librosa’s onset strength envelope against madmom’s beat module outputs, I saw that the beats typically occur just before the onsets:
Thus by using onset peaks as the primary method of beat detection, we end up reporting late beats.
Indeed, by playing clicks at the beat positions, the madmom beats feel more correct than the librosa ones. Obviously, madmom uses entirely different techniques compared to the onset-based ones that librosa uses, but I found it interesting that I found a consistent bias (late by 0.02-0.06s) amongst several songs I tested. The bias persisted with both 22050 and 44100 sampling rates.
Since I couldn’t find anything in the literature about this, wanted to check if anyone had come across this before or had any hypotheses for why it could be happening. Perhaps beats typically occur at the beginning of the offsets rather than the peak?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
@hpx7 thank you for all the good sleuthing 🕵 shall we close the issue at this point?
To recap,
center=False
seems to have solved the problem. Another option is just to increase frame rate (reducehop_length
).Closing.