feat(genre): measured classifier + mix-doctor widening for the missing families (PR-G7) - #216
Merged
Merged
Conversation
…g families (accuracy PR-G7) Nine new signatures — measured from 93 GiantSteps reference clips (gabber, hardstyle, electro, downtempo) and knowledge-based flagged in-line (trap, footwork, two-step, speed-garage, halftime-dnb) — plus measured retunes of the three controls whose old windows never fired on real audio (breaks, dubstep, psytrance). The classifier's bpm axis becomes octave-aware via PR-G3's bpmOctaveEvidence (every measured hardcore clip ships a halved bpm; the alternate hypothesis is discounted 10% and never touches bpm itself). Family plumbing lands on all four cross-boundary sites: _GENRE_FAMILY_MAP (+garage/hardcore/ trap/electro/downtempo, fixing the unmapped garage ids), the TS genreFamily union + validFamilies, JSON_SCHEMA.md's now-closed set, and mapLegacyToEnhanced fallbacks. Four measured mix-doctor profiles; knowledge-based genres get none (targets are not invented). Real-clip replay: correct-family top-1 went from ~0/93 to 51/93. Provenance, method, and caveats (LOFI bright-side skew, preview length, rt60 saturation, table-wide pumping mismatch follow-up): audits/genre-target-sourcing-2026-07-13.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
PR-G7, the final piece of the genre-generalization program: the classifier and mix-doctor learn the missing electronic families, with every measured number sourced from real reference audio (93 GiantSteps clips run through the full Phase 1 pipeline — method, caveats, and provenance in
audits/genre-target-sourcing-2026-07-13.md, committed here).Changes
_GENRE_SIGNATURES— measured:gabber,hardstyle,electro,downtempo(GiantSteps hardcore n=17, hard-dance n=11, electro-house n=15, chill-out n=15); knowledge-based and flagged in-line:trap,footwork,two-step,speed-garage,halftime-dnb(2015 Beatport has no reference audio for these; same provenance as the original table).two-step's low sidechain window (0.1–0.35) is the audit's uk-garage fix.breaks,dubstep,psytrance: all three controls' old windows NEVER fired on real audio (real breaks read acid-techno 8/15; measured dubstep bass decay is 0.11–0.40 s vs the assumed 0.6–1.2 s wobble; measured psy centroid 860–1910 vs the 2200–5500 window).analyze_genre_detail: when PR-G3'sbpmOctaveEvidencecontests the shipped bpm, each signature's bpm window scores against both hypotheses (alternate discounted 10%). Forced by measurement: every hardcore clip ships a halved bpm (84–128 for true 156–190) — a gabber signature can never fire on the shipped value alone. Never touchesbpmitself (invariant feat: value-first backport — genre profiles, MixDoctor, broken-pipe fixes #1)._GENRE_FAMILY_MAPgainsgarage(fixing the audit's unmapped uk-garage/bassline/garage) plushardcore,trap,electro,downtempo; the TSgenreFamilyunion +validFamiliesallowlist mirror it;JSON_SCHEMA.mdnow pins the closed set.electro,downtempo,hardstyle,gabber) with p25/p75/p50 band targets and family fallbacks inmapLegacyToEnhanced. Knowledge-based genres get no profiles — targets are not invented; trap falls back to its hiphop lineage.Measured validation — real-clip classifier replay (old table → new)
Correct-family top-1: ~0/93 → 51/93. Honest limits: LOFI previews under-read the top octave (bright-side windows widened, flagged for re-sourcing), and measured
pumpingStrengthruns 0.15–0.42 everywhere vs the 0.35–0.75 many ORIGINAL entries assume — full-table recalibration is a named follow-up, not smuggled into this PR.Validation
unittest discover— 1366 tests, OK (3 skipped; exit codes captured directly) (6 new classifier tests incl. gabber-fires-via-octave-evidence and no-op-when-evidence-supports-shipped).npm run verify: 51 smoke passed.Full measured percentiles (93 clips)
🤖 Generated with Claude Code