# 3 Gene — clock-fix & verification report

Correctness pass over the June 28 transcription. Source audio: `3Gene.wav` (4:35). Transcription: 5 tracks (Lead Guitar, Rhythm Guitar, Bass, Drums, Vocals), ~90 BPM, A major.

## Verdict

The transcription's **tempo map drifted out of phase with the recording.** Re-anchoring every note to an audio-locked beat grid restored alignment across the whole song and removed the drift. Verified against the six separated stems.

## What the prior pass missed

The June 28 report changed only the **key signature** (0 to 3 sharps) and stated "tempo was left untouched, meter is correct." It measured chroma agreement **per bar**, aligning each MIDI bar to its audio bar by index. That re-aligns the drift away, so it reported 0.65 and called the transcription "broadly in the right pitch world."

Measured in real playback time, the same file scored **0.35 on bass and fell from 0.55 to 0.25 across the song.** The per-bar metric hid the one defect that breaks playback: the clock.

## Drift, before and after (bass vs bass stem, chroma cosine)

| Window | Before (drifting) | After (clock fix) |
|---|---|---|
| 0–30s | 0.55 | 0.56 |
| 60–90s | 0.44 | 0.64 |
| 120–150s | 0.33 | 0.65 |
| 150–180s | 0.25 | 0.60 |
| 239–269s | 0.29 | 0.76 |

Before: steady decay, the signature of accumulating timing error. After: flat end to end.

## Per-track verification (corrected file vs stems)

| Track | Metric | Before | After |
|---|---|---|---|
| Drums | onset precision / recall | 72% / 65% | 93% / 78% |
| Bass | chroma agreement | 0.35 | 0.63 |
| Lead + Rhythm guitar | chroma agreement | 0.53 | 0.66 |
| Vocals | onset precision | 46% | 60% |

Vocals recall stays near 31%, a metric artifact: spectral flux over-detects breaths and consonants (496 detected onsets vs 199 sung notes), so precision is the trustworthy figure.

## How the fix works

1. **Find the true beat.** A dynamic-programming beat tracker (Ellis 2007, numpy only) on the drum stem returns 413 audio-locked beats. Inter-beat jitter 12 ms, within 13 ms of strong drum hits, following the real 83–96 BPM fluctuation.
2. **Re-anchor the notes.** Each MIDI beat maps to the matching audio beat. Note content in beat-space was already correct, so only the tempo map is rebuilt. Best downbeat offset is 0, so the pickup was already right.
3. **Bake the count-in.** First downbeat at 0.313 s, written into the file, so the MIDI plays in sync standalone.
4. **Clean the meta.** Tracks renamed Bass / Drums, bogus leading 1/4 time signature replaced with 4/4, key signature A preserved.

## What was NOT changed

The notes themselves. Once the clock was fixed, agreement rose to healthy levels, proving the pitch content was substantially correct and only mis-timed. Remaining low-agreement spots are isolated and worth an ear check, not a blanket rewrite.

## Deliverables

- Corrected MIDI: `files/Shhh-03 Gene-2026-06-29-CLOCKFIXED.mid` (audio-locked tempo map, 413 beats, named tracks, count-in, A major).
- Complete Guitar Pro (headline): `files/Shhh-03 Gene-2026-06-29-CLOCKFIXED-SOLO.gp`. Both fixes in one file: the 102 per-bar audio-locked tempo automations AND the recovered guitar solo as a sixth track. Six tracks, 102 tempo automations, well-formed GP7 zip, predicted span 269.7s.
- Clock-fixed Guitar Pro without solo: `files/Shhh-03 Gene-2026-06-29-CLOCKFIXED.gp` (kept for reference).
- Recovered solo: the bar-84 figure and the bars 93-100 outro (224 to 266s in the audio) were absent from the original two guitar tracks (near-duplicates). Transcribed from the Demucs stems (the bar-84 figure from `other`, the outro from `guitar`), 27 notes, approximate, check by ear. Credit: the solo recovery was done in a parallel session; this pass merged it onto the clock-fixed tempo map.
- All GP files not opened in the Guitar Pro app (no GP7 reader in this environment); validated structurally.
- Prior drifting MIDI + GP preserved for comparison.
- 6 isolated stems (htdemucs_6s).

## Stems note

Real parts: drums, bass, guitar, vocals. The `piano` and `other` stems are dead Demucs bleed (RMS ~0.006–0.008, under 7% active) — no keys part exists, so the 5-track instrumentation is correct.
