From 78b4426fa562c705ff7dbf7e9158966171b2a129 Mon Sep 17 00:00:00 2001 From: StreamSeb <48916398+StreamSeb@users.noreply.github.com> Date: Wed, 11 Nov 2026 22:09:56 +0100 Subject: [PATCH] Key finder: explain how detection works, reading results, why tools disagree Adds a step-by-step description of the actual pipeline (intro skip, chromagram, per-slice normalization, Krumhansl-Schmuckler tonic match, separate major/minor pass, Camelot), a section on reading the confidence score and compatible keys, and the common reasons key finders disagree. Three new FAQs (relative major/minor, streaming audio, mobile). Also corrects the analysis window: it reads up to two minutes after skipping the intro, not the first 90 seconds. Co-Authored-By: Claude Opus 5.5 --- src/app/tools/key-analyzer/page.tsx | 17 +++- src/components/tools/key-analyzer-tool.tsx | 97 ++++++++++++++++++++-- 2 files changed, 108 insertions(+), 6 deletions(-) diff --git a/src/app/tools/key-analyzer/page.tsx b/src/app/tools/key-analyzer/page.tsx index bd4b9a2..4f49fec 100644 --- a/src/app/tools/key-analyzer/page.tsx +++ b/src/app/tools/key-analyzer/page.tsx @@ -56,7 +56,22 @@ const faqs = [ { question: "How long can the audio file be?", answer: - "The tool analyzes up to the first 90 seconds of a track, which is more than enough for reliable key detection. Longer files are supported - only the analysis window is capped for performance.", + "Any length. The tool skips the intro (the first quarter of the track, between 20 and 90 seconds) and analyzes up to two minutes from there, which is more than enough for reliable key detection. Only the analysis window is capped, for speed.", + }, + { + question: "It says A minor but my DJ software says C major. Which is right?", + answer: + "Possibly both. A minor and C major share exactly the same notes, so key detectors often swap them. On the Camelot wheel they are 8A and 8B, which mix together without clashing, so for harmonic mixing the difference rarely matters.", + }, + { + question: "Can I find the key of a song on Spotify or YouTube?", + answer: + "Not directly. Streaming audio is protected, so the key finder needs an audio file on your device, such as an MP3 you bought or a bounce from your own project. If you only need the tempo of something playing, the BPM detector can listen through your microphone.", + }, + { + question: "Does the key finder work on a phone?", + answer: + "Yes. It runs in any modern mobile browser. Pick a file from your phone's storage and it is analyzed on the device itself, just like on a computer.", }, ] diff --git a/src/components/tools/key-analyzer-tool.tsx b/src/components/tools/key-analyzer-tool.tsx index a3f5a90..818c700 100644 --- a/src/components/tools/key-analyzer-tool.tsx +++ b/src/components/tools/key-analyzer-tool.tsx @@ -439,9 +439,9 @@ export function KeyAnalyzerTool({ reads its musical key straight from the audio. Because decoding happens in the browser, an MP3 key finder that runs this way needs no plugin, no desktop install, and no upload step - the file - never leaves the folder you dragged it from. Large files work too; only - the first 90 seconds are analysed, which is ample for a reliable - reading. + never leaves the folder you dragged it from. Full-length tracks and + long DJ mixes work too; the analysis reads up to two minutes from the + main part of the track, which is ample for a reliable reading.

Song Key Detector: How It Works

@@ -449,8 +449,46 @@ export function KeyAnalyzerTool({ browser using the Web Audio API and the{" "} Krumhansl-Schmuckler key-finding algorithm - the same approach used by professional audio analysis tools. No account required, - no file uploads, completely free. + no file uploads, completely free. Step by step, this is what happens + when you drop in a file:

+
    +
  1. + Skip the intro. Dance tracks often open with + drums only, which carry no key. The analysis skips the first quarter + of the track (at least 20 seconds, at most 90) and reads up to two + minutes from there, so it lands in the main, melodic section. +
  2. +
  3. + Build a chromagram.{" "} + The audio is split into short + overlapping slices of about a third of a second. For each slice, the + energy between roughly 300 Hz and 2 kHz is folded into the 12 pitch + classes, C through B. Kick drums and sub-bass sit below that range, + so they don't pull the result. +
  4. +
  5. + Balance the slices.{" "} + Each slice is normalized before + it is added up, so one loud synth stab or riser can't outweigh + two minutes of steady harmony. +
  6. +
  7. + Find the tonic. The 12-note profile is compared with + the Krumhansl-Schmuckler major and minor key profiles in all 12 + transpositions. The root that fits best is the tonic. +
  8. +
  9. + Decide major or minor. A second pass looks only at + the higher frequencies, where melodies and chords sit, to choose + between major and minor. This is where most key finders go wrong, + so it gets its own step. +
  10. +
  11. + Convert to Camelot. The key is mapped to its Camelot + code, and the compatible keys for mixing are listed with it. +
  12. +

What Is Musical Key Detection?

Musical key detection (also called key estimation or{" "} @@ -475,7 +513,56 @@ export function KeyAnalyzerTool({ Atonal, heavily chromatic, or extremely percussive tracks may produce lower confidence scores.

-

Looking for the Tempo Instead?

+

Reading Your Result

+

+ The result shows the key in standard notation (for example{" "} + Am or E♭), its Camelot code (for + example 8A), and a confidence score. + The confidence score is how closely the track's pitch profile + matches the textbook profile for that key, on a scale up to 99. High + scores mean a clear tonal center. Scores below about 70 usually mean + the track is sparse, changes key, or leans on a mode that sits + between major and minor, so treat the result as a starting point and + trust your ears. +

+

+ Under the result you get the keys that mix cleanly with it: the same + code, one step up or down the wheel, and the relative major or minor. + To see every compatible key at once, open the{" "} + Camelot key pages or the{" "} + Camelot Wheel Calculator. +

+

Why Key Finders Disagree

+

+ If this tool, Rekordbox, Serato, Traktor and Mixed In Key give you + different answers for the same track, it is rarely random. The usual + reasons are: +

+ +

Looking for the Tempo Instead?

This page reports a BPM alongside the key, but if tempo is what you actually came for there are better-suited tools. The{" "}