Back to feed
Dev.to
Dev.to
7/14/2026
The original title is: "Half-Time vs Double-Time BPM Detection: How We Fixed Spotify's Known Accuracy Gap"

The original title is: "Half-Time vs Double-Time BPM Detection: How We Fixed Spotify's Known Accuracy Gap"

Original: Half-Time vs Double-Time BPM Detection: How We Fixed Spotify's Known Accuracy Gap

Short summary

Beat-tracking algorithms like Essentia and Librosa systematically report half the actual BPM for modern pop tracks with halftime drum patterns, because the tempogram has valid peaks at both the perceived tempo and its octave. The article explains the metric hierarchy behind the error and presents a 30-line heuristic that cross-references BPM range, onset rate, energy, danceability, and genre tags to conservatively suggest a corrected bpm_alt value. Tested on a live catalog, the heuristic correctly flags Blinding Lights (85→171) while leaving unambiguous tracks untouched.

  • Beat trackers pick the wrong tactus level for halftime pop, reporting 85 BPM for 171 BPM tracks
  • A 30-line heuristic uses onset rate, energy, danceability, and genre to detect and correct half-time/double-time errors
  • The corrected value is exposed as bpm_alt alongside the raw BPM so callers can choose

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more