Find the tempo of any track in your browser
A BPM detector estimates how many beats occur per minute in a piece of music. Producers use it to match tempos, DJs to beat-match, and editors to cut video to the beat. This tool does it locally with the Web Audio API — no plugin and no upload.
How it works
After decoding to PCM, the signal is downmixed to mono and chopped into ~10 ms frames. The RMS energy of each frame forms an energy envelope. Taking the positive first difference of that envelope (onset[f] = max(0, env[f] − env[f−1])) produces an onset-strength signal that spikes whenever the audio suddenly gets louder — typically at a beat.
The onset signal is then autocorrelated: for each candidate lag in the 60–200 BPM range, the tool measures how well the signal lines up with a copy of itself shifted by that lag. The lag with the highest correlation is the dominant beat period, and tempo = 60 / (lag × hopSeconds). Finally, octave correction folds obvious half-time or double-time picks into a musical range.
Tips and notes
- Tracks with a clear, steady kick drum give the most reliable result; ambient or freely-timed music may not yield a single tempo.
- If the headline value looks wrong, check the candidate list — the correct tempo is often the half or double of the top pick.
- Trim to a representative section (a verse or chorus) for songs whose tempo changes between sections.
- Everything runs in-browser, so large files use memory; analysing a 30–60 second excerpt is usually enough.