Tempo Detector (BPM)
Choose or drop an audio file. The page shows its tempo in beats per minute (BPM). The browser decodes and analyzes the file, so no file is uploaded.
Full page version: joellof.com/tempo-detector/app/
A DJ set, a game loop or a remix needs the tempo of the source track. A tap-tempo tool needs a steady hand, and a DAW needs an install and an import. This tool needs only a browser tab.
What it detects
Section titled “What it detects”- The range is 90 to 180 BPM. The detector doubles a slower tempo and halves a faster one. A ballad at 70 BPM shows 140 BPM, and a drum and bass track at 174 BPM shows 174 BPM.
- The tempo of the whole file. A track that changes its tempo shows the tempo that most of its beats have.
- Every format that the browser decodes. Current browsers decode MP3, WAV, M4A (AAC) and FLAC. Ogg Vorbis and Opus depend on the browser and its version. To use another format, convert the file with Convert to WAV first.
How it works
Section titled “How it works”- The Web Audio API decodes the file to samples (
AudioContext.decodeAudioData()). - web-audio-beat-detector filters the samples with a
240 Hz low-pass filter in an
OfflineAudioContext, so that the kick drum and the bass are left. - A Web Worker finds the peaks, measures the intervals between them and picks the tempo that most intervals agree on.
Tech Stack
Section titled “Tech Stack”| Language | TypeScript |
| UI | React |
| Platform | Browser (Web Audio API, Web Worker) |
| Key Deps | web-audio-beat-detector |
| Build | Bun |
Related projects
Section titled “Related projects”- BPM Tap Tempo: a desktop app that measures the tempo from your taps.
- Convert to WAV: convert any audio or video file to a 48 kHz, 24-bit WAV file.
- Web Audio API Cheat Sheet: the parts of the Web Audio API that a tool like this uses.