Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable bpm #391

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

barbeque-squared
Copy link

Aubio has 120 bpm hardcoded in various places. I use it to detect beats in live music to have my lighting synced to the music, which can have a different bpm. Some real-world problems this is trying to address:

  • around 80 and around 160 are especially problematic, because it will start flip-flopping between the two
  • lower than 80 is completely unusable
  • from around 200 and higher it only really detects half of the beats

This PR adds an extra -b / --bpm command line parameter to set the target bpm. I've been using this for quite some time now, at anything higher than 120 it's fine. I didn't go as low as 15, but 60 works well enough. At ~60 it does appear to sometimes miss a beat (maybe I missed a buffer length somewhere?) but it's still a lot better compared to the bpm being hardcoded at 120.

I only fixed tests enough so that it compiles again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant