Skip to content

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.

  • 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.
  1. The Web Audio API decodes the file to samples (AudioContext.decodeAudioData()).
  2. 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.
  3. A Web Worker finds the peaks, measures the intervals between them and picks the tempo that most intervals agree on.
Language TypeScript
UI React
Platform Browser (Web Audio API, Web Worker)
Key Deps web-audio-beat-detector
Build Bun