When Brandon feeds a song into the computer, the computer guesses the song’s key (like “happy C” or “sad A”). For weeks the sheets printed that guess as if it were true — but the guess is only right about 1 out of 4 times. This page finds every chat where that happened and shows the fix: a shared piece of code that now adds a warning and the two keys the computer most often mixes it up with.
| Date | Chat | Status |
|---|---|---|
| 2026-07-03 | Hooray For Earth — “Racy” IXI analysis + multi-song sheet updates | mistake |
| 2026-07-03 | Hooray For Earth — “Say Enough” IXI analysis | mistake |
| 2026-07-03 | HFE multi-track stem analysis (Racy audit) | mistake |
| 2026-07-03 | IXI sheets audit: tracks missing guitar/bass stems | stem work |
| 2026-07-03 | HFE-related stems (short session) | stem work |
| 2026-07-04 | Stems-to-MIDI coverage page updates (titles/dates) | stem work |
| 2026-07-04 | Importing chat transcripts for stem processing | stem work |
| 2026-07-04 | Key-detection validation vs web (this fix's trigger) | caught it |
| Artifact | What it said | Why it’s the mistake |
|---|---|---|
| HFE “Racy” sheet | “C minor · 129 BPM · 4/4” | Key + BPM printed as established fact in the sheet header. No “detected” qualifier, no confidence, no cross-check. |
| HFE “Racy” sheet | “the form at a glance (97 bars, 4/4, 129 bpm from the chord chart)” | The auto-detected BPM is laundered as “from the chord chart” and treated as ground truth in the form table. |
| HFE “Racy” sheet | “the verse states Eb, F, G, Ab low and alone … (b3, 4, 5, b6 against C minor)” | The entire scale-degree / modal-color read is built on the unvalidated key. One wrong tonic rotates every degree label. |
| HFE “Say Enough” sheet | “key + chord structure asserted as fact in the shipped HTML” | Same pattern, second song. No indication the labels are algorithmic, not verified. |
feedback_key_detection_override.md (44 days old) states it plainly: on flat-side / modal rock (Shiner, Failure, Radiohead mid-period, Hooray For Earth, A Perfect Circle), Krumhansl / Aarden / Temperley all agree with each other and all mis-key the same way — toward the subdominant or the relative major over the true tonic — because power-chord rhythm guitar omits the third. The prescribed fix (pass a verified key before trusting cadence counts) was never turned into code. So high “confidence” meant nothing, and three-method agreement was read as reassurance when it is the bias signature.
five-stem-song-analyst/analyze_harmonics.py_shared/audio_to_chords.pyband-book-publish-pipeline/audio_analyze.pydeep-album-analysis/run_album.pymusic21-bar-harmony/analyze.pyNew module ~/.claude/skills/_shared/key_confidence.py turns the 44-day-old rule into executable code. gate_key(key, correlation, band=) returns the key plus:
a low-confidence flag (Krumhansl correlation below 0.75), a flat-side flag for the named catalogs, the relative + subdominant alternates the detectors most often confuse it with (musically spelled: Eb, Bb, F# minor), and a one-line caveat to embed in any sheet. Every one of the five detectors now routes its key through it, and the coverage dashboard reads the same helper instead of a hand-typed banner.
Verification: key_confidence.py self-test PASS · all 6 edited files py_compile OK · analyze_harmonics.detect_key_mode and music21-bar-harmony.summarize runtime-smoke-tested (gate fields present, override suppresses the caveat). Full audio-pipeline re-run over the HFE catalog is queued, since this pass had no audio inputs loaded.