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.
Initializing in your browser…
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.
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.
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.
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)
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.
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.
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.
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.
Detect the tempo of a recording, then set the Metronome to the same figure to practise along with it.
Find the BPM of tracks in your library to plan mixes and beatmatching.
Determine the tempo of a sample or reference track before building a project around it.
Get the tempo of a recording so you can set a metronome to match it.
Sort songs by tempo to build workout playlists at a specific BPM.
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.
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.
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.
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.
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.
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.
Audio is decoded and processed locally with the Web Audio API. Your files are never uploaded to a server.