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

Improve accuracy of automated BPM detection #2

Open
radioprotector opened this issue Jan 2, 2022 · 0 comments
Open

Improve accuracy of automated BPM detection #2

radioprotector opened this issue Jan 2, 2022 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@radioprotector
Copy link
Owner

The BPM detection loosely follows the model established by Joe Sullivan and José M. Pérez, but the results typically seem to be higher than what's expected for songs with known BPMs.

Solutions could include:

  • Ensuring the volume calculation (and corresponding normalization process) is in order
  • Adjusting the parameters used for beat detection, including:
    • The minimum and maximum frequency range
    • The absolute and relative intensity thresholds
    • The maximum number of expected peaks (down to 180-200 or so)
    • The number of sample frames advanced after a peak has been detected (currently 1/16 of a second and not parameterized)
  • Changing the statistical methods used in getBpmFromPeaks

In getBpmFromPeaks I have tried using a "weighted average" approach for tempo detection, in which intervalHistogram is incremented by the average intensity of the peak, instead of just 1-per-peak, but that did not seem to help much. Using the median tempo seemed to get closer to an accurate result, but it was still high.

One complication is that if frequency ranges/thresholds change, it will impact the visuals. However, this could potentially be alleviated by keeping the generation of TrackAnalysis.beat collections untouched and using a separate dedicated peak analysis for BPM detection.

@radioprotector radioprotector added bug Something isn't working help wanted Extra attention is needed labels Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant