Key and BPM Finder for Any Audio File

Drop in an audio file and read its key and tempo. The analysis runs locally in your browser, so nothing is uploaded and the tool costs no credits at all.

Choose a track and get its musical key, its scale and its tempo in one pass. Everything is computed on your own device, so the file never leaves it and there is no upload to wait through.

MP3, WAV, M4A or OGG · up to 10 minutes · stays on your device

01

How the Key Is Worked Out

01

The analyser builds a chroma vector: it measures how much energy sits at each of the twelve pitch classes across five octaves, folding every C into one bucket, every C sharp into the next, and so on. The result is a profile of which notes the track actually leans on, independent of which octave they were played in.

02

That profile is then correlated against the twenty-four Krumhansl-Schmuckler templates, one major and one minor weighting for each of the twelve possible tonics. These templates come from listening experiments and encode how strongly each scale degree is felt in a key. The best-correlating template wins, and its correlation coefficient becomes the confidence figure shown next to the answer.

03

This is deliberately not the naive approach of finding the loudest note and calling it the tonic. The loudest pitch in a mix is usually a bass note on a strong beat, which is often the fifth or the third rather than the root. Correlating a whole distribution against a known shape is far more robust.

02

How the Tempo Is Worked Out

01

Tempo comes from a different signal. The analyser splits the audio into short frames, measures the energy in each, and keeps only the rises, the moments where energy jumps, which is where notes and drum hits begin. Sustained sound contributes nothing, which is what you want, because a held pad carries no rhythm.

02

That onset strength curve is then autocorrelated: the curve is compared against delayed copies of itself, and the delay that produces the strongest match is the beat period. Searching only between 60 and 200 BPM keeps the result in musically plausible territory.

03

Autocorrelation has one well-known habit: it locks just as happily onto half or double the real tempo, because a pattern that repeats every beat also repeats every two beats. The result is folded back into the 70 to 180 range, which is right for the overwhelming majority of recorded music but will occasionally give you half of a very fast drum and bass track.

03

Reading the Confidence Figure

01

The confidence number is the correlation between your track's pitch profile and the winning template. Above roughly 70 percent the key is almost certainly right. Between 50 and 70 it is probably right but worth checking against the chords you can hear. Below 50 percent, treat it as a guess.

02

Low confidence is informative rather than a failure. Some music genuinely has no single key: atonal writing, heavily chromatic jazz, modal pieces that sit between a major and its relative minor, and tracks that modulate partway through all produce a flat profile that matches nothing strongly. Percussion-only material has almost no pitch content to analyse at all.

03

The relative major and minor of a key share all seven notes, so they produce very similar profiles. When confidence is middling, the most common error is reporting A minor for a piece in C major, or the other way round. Listening to which note the track resolves to settles it in seconds.

04

What Makes Analysis Harder

01

Clean recordings of harmonic instruments analyse best. A solo piano piece, a guitar-led song, a string arrangement, most pop productions: all of these give a clear pitch profile and a steady onset curve.

02

Four things degrade the result. Heavy distortion spreads energy across the spectrum and blurs pitch classes together. Very dense mixes stack so many simultaneous notes that no single tonic stands out. Tempo-changing or rubato performances break the assumption of an even beat period. And heavily sidechained or gated production can create onsets where there are no notes, which pulls the tempo estimate off.

03

The analyser reads the middle thirty seconds of a file rather than the whole thing, because intros are frequently a sparse pad or silence and tell you little about the piece. If your track changes key or tempo between sections, analyse the sections separately by trimming the file first.

05

What the Key and Tempo Are For

01

DJs use both to plan transitions. Matching tempo is what makes a mix beatmatch; matching or relating keys is what stops the blend from clashing. Tracks a fifth apart, or a relative major and minor, generally sit well together.

02

Producers sampling a loop need the key to transpose it into their project, and the tempo to time-stretch it onto the grid. Getting either wrong by a semitone or a couple of BPM is immediately audible on a sustained sample.

03

Singers use the key to work out whether a song sits in their range before committing to it, and to decide how far to transpose if it does not. Guitarists use it to pick a capo position. People building a setlist use the tempo to pace an evening and the keys to avoid two consecutive songs in the same one.

04

If you want the tempo but have no file to analyse, such as a track playing across the room or a live band, the BPM tapper measures it from your own taps instead.

06

Key and BPM Questions

Is my file uploaded?

No. The analysis runs in your browser and the file is read directly from your device. Nothing is sent to a server, which is also why there is no upload progress bar and no credit cost.

Why does it report the relative minor instead of the major?

A major key and its relative minor contain exactly the same seven notes, so their pitch profiles look nearly identical. When confidence is middling this is the most likely error. Listen for the note the music resolves to.

Why is the tempo exactly half what I expected?

Autocorrelation locks onto repeating patterns, and a pattern repeating every beat also repeats every two beats. The result is folded into a common range, which occasionally halves genuinely fast material such as drum and bass.

Can it analyse a drum loop?

The tempo will usually be right. The key will not, because percussion has little stable pitch content, so expect a low confidence figure, which is the tool telling you so.

Does it handle a track that changes key?

Not in one pass. It reports one key for the whole analysed window. Trim the file into sections and analyse each separately.

Which part of the file is analysed?

The middle thirty seconds. Intros are often sparse or silent and would skew the profile, so the busiest, most representative part of a typical arrangement is used instead.

What file types work?

MP3, WAV, M4A and OGG, up to ten minutes. Anything your browser can decode will work; longer files should be trimmed first.