question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Beats are slightly late

See original GitHub issue

I 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: image

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:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lostanlencommented, Jan 10, 2020

@hpx7 thank you for all the good sleuthing 🕵 shall we close the issue at this point?

0reactions
lostanlencommented, Feb 23, 2020

To recap, center=False seems to have solved the problem. Another option is just to increase frame rate (reduce hop_length).

Closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Sound Delay in Bluetooth Headphones
You inspect it closer, slowing down the video speed a bit to confirm the sound delay. And you were right. The singer's lip...
Read more >
Why does a slightly delayed note/ off beat rhythm sometimes ...
In Gimme Shelter, the last guitar note of the intro is very slightly off beat. I've noticed this in other songs, where at...
Read more >
Maschine's Delay Effect And Why Your Beats Don't ... - YouTube
If you aren't using audio delay on maschine, your tracks aren't going to sound like the records put out on major record labels.Why...
Read more >
Manage Logic Pro input monitoring latency - Apple Support
When recording audio or playing a software instrument in Logic Pro, you might experience a slight delay between playing or singing a note...
Read more >
The beats sounds un tight like something is off beat - Cubase
... are on the beat but, when I compare them to the other audio or midi tracks that I have recorded live I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found