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.
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.