Inside your browser

How Tempo & Key Detection Works

The complete analysis happens inside your browser, from decoding the file to mapping the result onto the Camelot wheel.

  • Audio stays on device
  • No server upload
  • Open-source components

How browser-local analysis works

  1. 01

    Your browser decodes the file

    The Web Audio API reads the selected file into temporary audio data. Stereo channels are mixed for analysis. The file is not uploaded to an audio-processing server.

  2. 02

    Analysis moves off the main thread

    A Web Worker resamples the signal to 16 kHz and runs the Essentia.js tempo and key estimators. Loading this analysis code is deferred until you choose audio.

  3. 03

    Tempo candidates are calculated

    The BPM estimate is shown as both a rounded and decimal value. Half-time, double-time and milliseconds per beat are derived to make rhythmic ambiguity visible instead of hiding it.

  4. 04

    Harmonic profiles estimate the key

    The primary key profile returns a tonic and major or minor mode. A second profile is shown as a possible alternative when it disagrees with the primary estimate.

  5. 05

    Music theory adds useful context

    Local, dependency-free functions map the result to its Camelot code, relative key and compatible keys. They do not modify the source audio.

What the result means

The output is a best-effort estimate, not a verified fact about the recording. Half/double-time rhythm, key changes, sparse harmony, percussion, speech and noise can all produce a plausible but incorrect answer.

What leaves your device

Page assets still come from the web host, but selected audio, filenames, decoded PCM and analysis results remain in the browser. There is no upload API, account, cloud audio store or analytics integration in the current application.

Which sources describe the method?

The browser decoding layer follows the W3C Web Audio API specification. Tempo and key estimation use Essentia.js, whose algorithm API documents the BPM and key extractors and whose ISMIR paper describes the WebAssembly-backed browser library.

The exact dependency version, notices and reproducible build materials are available through the corresponding source archive.