Skip to content

Per-stem melody + stems dB levels + meter (levels 0.72 -> 0.79 on the new scorer) - #8

Open
DheerajNalapat wants to merge 2 commits into
mainfrom
pipeline-quality-round2
Open

DheerajNalapat wants to merge 2 commits into
mainfrom
pipeline-quality-round2

Conversation

@DheerajNalapat

Copy link
Copy Markdown
Collaborator

Continues closing the gap to the listen-produced model maps under the updated scorer (which added stems/meter/tempo_stability). Model targets are now levels 0.90 / the-nights 0.76.

What this adds

  • StemSeparationAnalyzer — runs demucs once, caches the separated waveforms to work/stems_cache/ (keyed by source), and publishes them in ctx. The enabler for every per-stem field. Cached runs skip demucs (0.02s).
  • Melody from the vocals stem — pyin on the isolated vocals → note events [start,dur,midi,name]. The mix contour was 0.15 (the dominant mix pitch isn't the vocal); the stem gives 0.82.
  • Stems as per-bar dB levels vs the mix (comparable:true) — summed as energy they track the mix, which the new ev_stems checks. Normalised-per-stem was 0.66; dB → 0.93.
  • grid.beats_per_bar for ev_meter (prerequisite; meter also needs chord segments).

Result — levels (deep, current scorer)

0.72 → 0.79: melody 0.15→0.82, stems 0.66→0.93, plus grid 0.88 / bars 1.00 / sections 1.00 / energy 0.86 / pump 0.96 / tempo_stability 0.83. 56 tests pass.

The remaining gap to 0.90 — gated on infra not installed here

  • accents (0.17→0.75): needs 6-stem demucs + attack.py attack-precision (the model tags 8 instruments with ~3520 precisely-placed hits). Our 4-stem mix onsets score worse.
  • chords (0.33→0.79) and meter: need the trained ChordMini model (external repo + checkpoint + CUDA), which tools/setup.sh clones but isn't present in this environment.

So melody + stems are the wins reachable with the current stack; the last ~0.11 needs the ChordMini + 6-stem machinery.

🤖 Generated with Claude Code

Dheeraj-Nalapat and others added 2 commits September 9, 2026 15:50
The new scorer's ev_meter reads grid.beats_per_bar; we didn't claim it ('no
beats-per-bar claimed'). Emit it from the time signature (4 for 4/4). Necessary
but not sufficient: meter also needs chord changes on the grid, which the chords
work will supply.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ion enabler

New StemSeparationAnalyzer runs demucs once (cached to work/stems_cache/ by source)
and publishes the waveforms in ctx. MelodyAnalyzer now pitch-tracks the isolated
vocals stem into note events (mix contour was 0.15; vocals -> 0.82). StemsAnalyzer
now emits per-bar dB levels vs the mix RMS (comparable), which sum to the mix as
the scorer requires (normalised-per-stem was 0.66 -> dB 0.94). port passes the
comparable stems through and marks guitar/piano absent (not 0 dB).

Experiments on levels: melody 0.15->0.82, stems 0.66->0.94.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants