Skip to main content
L
Loopaloo
Buy Us a Coffee
All ToolsImage ProcessingAudio ProcessingVideo ProcessingDocument & TextPDF ToolsCSV & Data AnalysisConverters & EncodersWeb ToolsMath & ScienceGames
Guides & BlogAboutContact
Buy Us a Coffee
L
Loopaloo

Free online tools for developers, designers, and content creators. Your files are processed in your browser and are never uploaded - no accounts required. A few network utilities (like What's My IP and Currency Converter) call public APIs to do their job and say so on their pages.

support@loopaloo.com

Tool Categories

  • Image Tools
  • Audio Tools
  • Video Tools
  • Document & Text
  • PDF Tools
  • CSV & Data
  • Converters
  • Web Tools
  • Math & Science
  • Games

Company

  • About Us
  • Contact
  • Blog
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

Support

Buy Us a Coffee

© 2026 Loopaloo. All rights reserved. Built with privacy in mind.

Privacy|Terms|Disclaimer
  1. Home
  2. Audio Processing
  3. BPM Detector
Add to favorites

BPM Detector

Detect tempo from onset autocorrelation, within 0.20 BPM across thirteen known-tempo fixtures. Draws the beats it found and plays them back as a click so you can check by ear.

Audio processed on your deviceMore audio processingJump to full guide

Initializing in your browser…

You might also like

Audio Speed Changer

Change tempo from 0.25x to 4x with WSOLA, holding pitch to within half a cent, or let pitch move with it like tape. Measures the output and shows how far the pitch actually went.

Audio Trimmer & Cutter

Cut a region out of any audio file, exact to the sample and measured at zero milliseconds of error. Waveform handles, real keyboard shortcuts, click-free cut fades, and WAV or MP3 output that matches its extension.

Audio Merger & Joiner

Join clips end to end or stack them on one timeline, with an equal-power crossfade that holds the level through the join, BS.1770 loudness matching between files, and the merged result measured before you download it.

BPM Detector: a worked example

You want the tempo of a track to beat-match it or set a metronome for practice.

Input

groove.wav (written at exactly 128 BPM)
What BPM Detector produces

Result

127.94 BPM, confidence 100 percent, 43 beats, spacing varying by 11.2 ms

Spectral flux finds the onsets, autocorrelation finds the period, and an octave check stops fast music being reported at half speed. Across thirteen fixtures written at a known tempo the worst error is 0.20 BPM. The detected beats are drawn over the envelope and can be played as a click over the audio, so the answer can be checked by ear. The detector this replaced returned nothing at all on seven fixtures out of seven.

About the BPM Detector

Find the tempo of a track, then check the answer by ear: the detected beats are drawn over the onset envelope and can be played back as a click on top of the audio. Measured against thirteen click and groove tracks written at an exactly known tempo, the worst error is 0.20 BPM.

How to use

  1. 1Upload a music file; analysis starts as soon as it decodes
  2. 2Read the tempo, the confidence and how steady the beat spacing is
  3. 3Play it back with the click on to check the grid by ear
  4. 4If it locked to the wrong level, pick half or double time from the buttons
  5. 5Tap along instead if the material is too sparse to detect

Key features

  • Spectral flux onset detection, so clicks, drums and melodic attacks all count
  • Autocorrelation with an octave check, verified within 0.20 BPM across thirteen known-tempo fixtures
  • Fractional tempo readout rather than a rounded whole number
  • Detected beats drawn over the onset envelope, and playable as a click over the audio
  • Half, double and other metrical levels offered as one-tap alternatives
  • Honest confidence that scores material with no beat at zero
  • Beat spacing readout, which separates a programmed track from a live one
  • Runs in a Web Worker with progress and a working Cancel button
  • Tap tempo with outlier rejection, and beat times you can copy out

Tips & best practices

  • Play it back with the click on. A tempo that is slightly out, or locked to the wrong metrical level, is obvious within a couple of bars and invisible in a number.
  • If the reading looks like half or double the real tempo, use the buttons under it rather than fighting the detector. Both genuinely fit the audio.
  • Low confidence means the onsets are weak or irregular, which is common with rubato, sparse percussion or heavy reverb. The number is still the best guess, but check it.
  • The beat spacing figure next to the tempo says how steady the performance is. A programmed track reads a couple of milliseconds; a live band reads much more, and that is not an error.
  • Analyse a section with a steady groove rather than a whole track with a free intro, if the intro is throwing it off.

Examples

  • Beat-matching two tracks

    Run both files, note the two tempos to one decimal place, and use the Audio Speed Changer to move one onto the other without shifting its pitch.

  • Checking a suspicious reading

    A drum and bass track reporting 87 BPM is almost certainly 174. Tap the double-time button and play it back with the click to confirm which one lands on the beat.

  • Setting up practice

    Detect the tempo of a recording, then set the Metronome to the same figure to practise along with it.

When to use it

  • DJing

    Find the BPM of tracks in your library to plan mixes and beatmatching.

  • Music production

    Determine the tempo of a sample or reference track before building a project around it.

  • Practice and transcription

    Get the tempo of a recording so you can set a metronome to match it.

  • Fitness playlists

    Sort songs by tempo to build workout playlists at a specific BPM.

How it works

Detection runs in three stages. First an onset envelope: a short-time Fourier transform every five milliseconds, and for each frame the sum of every bin that got louder than it was in the frame before. Half-wave rectified spectral flux like this responds to a click, a kick, a snare and a piano chord alike, which matters because tempo does not live only in the bass. Then the period: the envelope is autocorrelated across every lag between 40 and 240 BPM, weighted by a log-Gaussian preference around 120 BPM to choose between metrical levels, and the peak is refined by parabolic interpolation so the answer is fractional rather than rounded to the nearest whole frame. Finally the phase: the offset that best lines up a pulse train with the envelope gives the beat positions, which are then nudged onto the nearest strong onset.

Anything periodic at one beat is also periodic at two, so autocorrelation alone reports fast music at half speed. An explicit octave check looks at half the chosen lag, searching a small neighbourhood rather than a single rounded index because a true period is rarely a whole number of frames, and takes the faster reading when it correlates nearly as strongly. Without it a 175 BPM click track came back as 87.5 and a 200 BPM one as 100. The levels that lost are still offered as buttons, since half and double time genuinely do fit the audio and only a listener can say which one is the beat.

The detector this replaced never returned an answer at all. Driven against seven fixtures written at a known tempo it reported "Could not detect beats in the audio" seven times out of seven, for two separate reasons. Its energy windows advanced by a quarter of a 100 millisecond window, which at 44.1 kHz is 1102.5 samples and not a whole number, so half of its windows began at a fractional index, read undefined 1.76 million times, and turned the mean energy into NaN, after which every comparison against it was false. And even at 48 kHz, where that step is whole, it required a strict local maximum among windows overlapping by 75 percent; overlapping windows form plateaus, so of the 157 windows above its threshold, none qualified. It also low-passed everything at 150 Hz on the assumption that tempo lives in the kick drum, which discards 97 percent of a click track before the search begins.

Confidence asks two questions, because either alone can be fooled. How strongly does the envelope repeat at the chosen period, measured as a correlation coefficient rather than relative to its own peak. And is there anything impulsive there to repeat, measured as the ratio of the envelope's 99th percentile to its mean. A sustained tone produces a smooth periodic ripple in the flux that correlates perfectly and contains no beat at all; the first test alone scores it 1.000, and both together score it zero. Across the fixtures, real beats read 10 to 43 on the impulsiveness ratio and material with no beat reads 3.9 to 5.9.

Analysis runs in a Web Worker with a progress bar and a Cancel button. Tap tempo remains as a manual fallback, now discarding taps more than 40 percent away from the median gap so one fumbled tap does not drag the answer. Beat times can be copied out as a list of seconds.

Frequently asked questions

Why is the detected BPM double or half the expected value?

Because music that repeats every beat also repeats every second beat, so both genuinely fit the audio and only a listener can settle it. The tool applies an octave check and a preference around 120 BPM, and offers the other levels as buttons. Play it back with the click to hear which one is the beat.

How accurate is it?

Measured against thirteen click and groove tracks written at an exactly known tempo, from 72 to 200 BPM and at both 44.1 and 48 kHz, the worst error is 0.20 BPM and most are within 0.1. Real music with a human drummer is a harder problem, which is what the beat spacing and confidence figures are there to tell you about.

What does the confidence figure mean?

It combines how strongly the onset envelope repeats at the detected period with how impulsive that envelope is. Both are needed: a sustained tone with no beat in it correlates perfectly with itself, and would score full marks on periodicity alone. Material with no beat scores zero here.

Does it work with live recordings?

Yes, though a human performance drifts. The beat spacing readout shows how much: a programmed track varies by a couple of milliseconds, a live band by tens. The tempo reported is the average across the file.

Why did an older version say it could not detect beats?

It had two independent faults that between them stopped it finding any beat at any sample rate: a window step that was not a whole number of samples at 44.1 kHz, which poisoned its energy calculation with NaN, and a peak test that could never fire on overlapping windows. Both are gone.

Related tools and how they differ

  • Online Metronome: Plays a click at a tempo you set, once you know what the tempo is.
  • Audio Speed Changer: Changes a track to a different tempo without moving its pitch.

Private by design

Audio is decoded and processed locally with the Web Audio API. Your files are never uploaded to a server.