What went wrong, in plain words

A computer tried to guess the musical key of each song by looking at all the instrument tracks at once. But it used a lazy method that gets fooled: it kept guessing the song's cousin key instead of the real one. So 22 songs got the wrong key stamped on them, and every music file we built from those got the wrong "home note."

The fix: listen to the singing track to find the true home note, or just look up the real key that music books already printed. Then rebuild those 22 songs' files with the right key. The other songs are fine.

Stem Key Errors → MIDI Redo List

Why the keys on stems-key-validation are so far off, and exactly which songs need a redo. Built 2026-07-05.

28% exact vs web 22 real key errors → redo 4 relative (defensible, keep)

Why we're this far off (root cause)

The keys came from Krumhansl-Schmuckler correlation run on the stems (a static pitch-class histogram), written raw into ~/Projects/_outputs/_evidence/<artist>/<song>/*_theory.json. On flat-side / modal rock that detector biases toward the relative major/minor or the subdominant (IV) instead of the true tonic, and it does so with high self-correlation, so a confident number is not a trust signal.

The gate that fixes this already exists — _shared/key_confidence.py — and its own docstring records the exact miss: "music21/chroma key detection on stems is only ~28% exact vs web ground truth, 39% incl. relative." That matches this page's numbers exactly. The problem: the gate was never called at transcription time. The theory.json files carry a bare key with no override, no alternates, no caveat.

Important scope note: the per-stem note transcription (crepe / basic-pitch) is pitch-tracked and does not depend on the key, so the raw MIDI notes are not wrong. What's wrong is the key label and everything derived from it — chord-degree analysis, in-key filtering, archetype-book scale highlighting, and the midi-16-runs-* generators that key off these files. Those are what get redone.

The better stem process (the redo recipe)

  1. Ground the tonic in the vocal, not the full stack. Detect key from the vocals stem's resolved melody + a cadence check, not the summed pitch-class histogram of every stem (bass + pads are what drag it to IV / relative).
  2. Source the published key via /song-key-sourcing for anything with a web consensus, and pass it as gate_key(key, corr, overridden=True).
  3. Route every detected key through gate_key() before it's written, so flat-side catalogs (Radiohead, Mars Volta, Life and Times, APC) auto-get the relative/subdominant caveat + alternates.
  4. Regenerate the key-dependent artifacts for the 22 below: theory.json key, degree/chord charts, archetype books, and any midi-16-runs-* output built in the wrong key.

Redo list — 22 songs (real errors only)

The Life and Times flat-side · in gate hints

SongWrong key (detected)True key (web)Error
Coat Of ArmsF majorG minormismatch
Confettie minorC majormismatch
Dull Knivesd minorBb minormismatch
Old Soulsf# minorD majormismatch
Running Redlightse minorC majormismatch
Shift Your Gazec minorAb majormismatch

The Mars Volta flat-side · in gate hints

SongWrong key (detected)True key (web)Error
Inertiatic ESPb minorF# minoroff by a fifth
Son Et Lumiered minorB minormismatch

Radiohead flat-side · in gate hints

SongWrong key (detected)True key (web)Error
BodysnatchersF majorD majormismatch
Faust Arpf# minorB minoroff by a fifth
House Of Cardsa minorF majormismatch
Burn The Witchf# minorB majoroff by a fifth
Decks DarkD majorD minorparallel
Desert Island DiskC majorG majoroff by a fifth
Ful Stopf# minorC majormismatch
IdentikitF# majorB minoroff by a fifth
Present Tenseg# minorC# minoroff by a fifth
The NumbersC majorF majoroff by a fifth
Tinker Tailorc# minorDb majorparallel

The Smashing Pumpkins

SongWrong key (detected)True key (web)Error
DisarmD majorE minormismatch
RocketG majorC majoroff by a fifth
Todayg minorEb majormismatch
Keep as-is (4 relative-key calls — defensible, same 7 notes): Muscle Cars (D maj / B min), Weird Fishes (D maj / B min), Daydreaming (C maj / A min), Quiet (c# min / E maj). These share every note with the web key; not worth a redo. Everything else on the validation page that isn't in the 22 above is already an exact match.

Sources: stems-key-validation · stems-to-midi-coverage · gate: _shared/key_confidence.py. Part of drwu-htmls.vercel.app.