0017 A rebuild that sounds like the recording
Status: proposed
Context
A rebuild (remake with rebuild: true, rebuild.rs) makes a recording again from its parts, so that every note of
it can be changed. People who tried it heard almost nothing of the recording in what came out. Three steps lose it:
- Separation. The stems come from Spleeter (
stems.rs,earshot::separate), which scores 5.9 dB SDR on MUSDB18-HQ: much of each stem is the others, and the transcription after it writes that bleed down as notes. - Transcription. Basic Pitch (
transcribe.rs) writes the bass and the rest as notes. It was made for one instrument at a time: on the 2025 AMT Challenge’s multi-instrument test it scores an F1 of 0.06, where the best systems reach 0.6. - Instruments. The rest (keys, guitars, synths, together) becomes one part, played on the genre’s chord sound, so a guitar riff comes back as a pad.
Decision
Rebuild from better parts, and measure every step.
- Measure first. An evaluation of the whole rebuild on songs claudius renders itself, whose notes are known
exactly: each part’s note F1 (onset, pitch and offset, as
mir_evalcounts them), and how near the rebuilt song’s chords, tempo and drums come to the original’s. Each later step has to raise these numbers, and CI keeps them from falling. - Separation by HTDemucs, fine-tuned (vocals 9.2, drums 10.1, bass 10.4 and the rest 6.3 dB), in pure Rust as the ears are, in place of Spleeter. Its code is MIT, but on 26 October 2026 its author wrote, in the fork he now keeps, that the licence of its weights is not clear: some of the MUSDB songs it learnt from are for research only, and part of its data is Meta’s own; he calls the six-stem model likely CC BY-NC, and the MIT tag is gone from its model card (adefossez/demucs). So no HTDemucs weights go in until that is settled, whatever a copy of them is tagged. A Mel-Band RoFormer would hear the voice better still: Kim’s vocal model has been tagged MIT since April 2026, and goes in only once what it learnt from allows it too; UVR’s models carry no licence.
- Transcription by YourMT3+ (F1 0.59 on the same test), ported to Rust from its paper: its weights are Apache-2.0, and its code GPL-3.0, so the port follows the paper and not the code. It writes each instrument’s notes with its General MIDI program.
- Instruments of their own. Each instrument transcribed becomes a part, played on the claudius sound nearest its program (a guitar on a guitar), rather than the rest on the genre’s chords. The genre still gives the mix and the master, and any sound can still be changed.
- Chords from the notes of every instrument, rather than from the mix, whose drums and voice blur them.
Not taken: Kim’s Mel-Band RoFormer and UVR’s models, which carry no licence, and MuScriptor, whose weights are CC BY-NC.
Consequences
- More models to download on first use, each pinned by its size and SHA-256 as the ears’ are; without the ears a rebuild does what it does now.
- A rebuild takes longer, as transformer separation and transcription of a whole song on a laptop’s CPU do.
- Each step lands as a pull request of its own, with the evaluation’s numbers before and after it.