🔍

Audio Loop Analyzer & BPM Detector

Load a loop or beat into this audio loop analyzer and it estimates the BPM, draws a beat & bar grid on the waveform, suggests bar lengths, and checks how cleanly the clip loops — all in your browser.

ℹ BPM detection is an estimate. It works best on steady, percussive material in 4/4; ambient, rubato, or tempo-changing audio can fool it. Tempo also has a built-in ×2 / ÷2 ambiguity — if the number looks doubled or halved, use the buttons, or just type the correct BPM (auto-detection covers 60–200 BPM; the field accepts 30–300). Nothing is uploaded; analysis runs on your device.

No file loaded.

Share or embed this tool

Free to use on your own website — WordPress, Wix, or any platform. Paste one line and it works instantly, resizing to fit.


How It Works

Your file is decoded to raw PCM samples in the browser using the Web Audio API’s decodeAudioData. The tool measures a short-window energy envelope (RMS power per frame) across the file and takes its positive changes to build an onset strength signal — spikes where new notes or drum hits begin. It then runs an autocorrelation on that onset signal: the lag where the signal best lines up with a delayed copy of itself is the beat period, and BPM = 60 ÷ beat period. This makes it a practical tempo detector as well as a beat detection engine: it finds the rhythmic pulse of a clip and overlays a phase-aligned grid showing every beat. A gentle preference curve around typical dance/pop tempos helps it pick the musically sensible octave. The beat grid is phase-aligned by sliding a pulse train until it best matches the onsets, and bar lines (every 4 beats) assume 4/4 time. The tool also works on stereo samples — useful for finding the sample BPM of a stereo drum loop or one-shot — mixing down to mono before analysis so both channels inform the onset detection equally.

Because it’s based on energy, it shines on clear, steady beats — kick drums, snares, and rhythm-guitar chops are ideal — and can struggle with sparse, ambient, heavily swung, or tempo-changing music. A straight-time groove reads cleanly; heavy swing or syncopation can shift the perceived beat period. The ×2 / ÷2 ambiguity is fundamental to tempo estimation — a backbeat can read as half or double the “real” tempo. If the grid doesn’t line up, nudge the BPM field or use the octave buttons. The tool also reports the loop length in seconds for common bar counts (1, 2, 4, 8 bars), so you can set precise in/out points in your DAW without manual calculation. To cross-check the detected tempo by ear, you can listen alongside the online metronome at the same BPM. Once you know your BPM and bar boundaries, take the loop points into the Loop Audio Maker to cut a seamless crossfaded loop.

Frequently Asked Questions

Is my file uploaded?
No. Decoding and analysis happen entirely in your browser; the audio never leaves your device.
The BPM looks doubled (or halved) — is it broken?
No — that’s the classic tempo octave ambiguity. A beat and its half/double both line up with the music. Tap the ×2 or ÷2 button, or type the tempo you know is right.
Why is the detected tempo off for my track?
Energy-based detection needs a fairly steady, percussive pulse. Ambient pads, rubato playing, complex polyrhythms, or tempo changes can throw it off. Treat the number as a starting point and correct it by ear.
Does it assume 4/4 time?
The bar lines (every 4 beats) assume 4/4. The beat detection itself doesn’t — only the bar grouping does. For 3/4 or 6/8, read the beats and group them yourself.
Can it cut the loop for me?
This tool only analyzes. To actually create a seamless loop from your start/end points, use the Loop Audio Maker (linked above) — it adds a crossfade and exports a WAV.
What audio file formats are supported?
The tool accepts any format your browser can decode via the Web Audio API — in practice: WAV, MP3, OGG/Vorbis, FLAC, M4A/AAC, and AIFF on most modern browsers (Chrome, Firefox, Edge, Safari). Proprietary formats like WMA or older codecs may not work in all browsers. If your file fails to load, convert it to WAV first using the Audio Format Converter (linked in Related Tools below).
What does the confidence rating mean?
Confidence reflects how strong and unambiguous the autocorrelation peak was at the detected tempo. A high-confidence result means the algorithm found a very clear, repeating rhythmic pulse — the BPM is likely correct. Low confidence means the onset signal was weak, ambiguous, or had competing periodicities (common in sparse ambient tracks, heavily layered mixes, or material with tempo drift). Low confidence does not mean the BPM is wrong — just that you should verify it by ear or by tapping along before committing to loop points.
How do I use the suggested bar lengths to set loop points in my DAW?
The suggested bar lengths (in seconds) tell you the duration of 1, 2, 4, or 8 bars at the detected BPM. In your DAW, set your loop start to a beat boundary, then add the bar-length value to find the end point — most DAWs accept loop boundaries in seconds or timecode. For example, a 4-bar loop at 120 BPM lasts exactly 8.00 s. To cross-check the tempo before committing, you can also tap the loop in the BPM tap tool to confirm the number by ear, then use the beat grid here to visually confirm that your chosen start and end points fall on a bar line before handing the clip off to the Loop Audio Maker.
Can it detect swing or groove percentage in a loop?
No. This tool detects straight-time tempo and draws a quantized beat grid — it does not attempt to quantify swing, shuffle, or micro-timing groove. Heavily swung material (e.g. classic hip-hop drum loops) can cause the grid to land on off-beats or produce a halved/doubled BPM reading. If you work with swung loops, use the detected BPM as a starting point and adjust the grid by ear. Quantifying groove is a fundamentally harder signal-processing problem not currently in scope.