﻿# Slakh MIDI provenance: all_src.mid is not guaranteed to be the rendered stem input

Pair Slakh stems with their actual instrument MIDI files and rendering metadata rather than assuming positional identity with original Lakh tracks in all_src.mid.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-slakh-original-midi-rendered-stem-identity-contract/
Language: en

## Choose the MIDI that actually produced the waveform

A transcription dataset builder pairs an isolated Slakh stem with the same-position track from all_src.mid. The filenames look compatible, yet the symbolic events can differ from the file used to render the stem. That mismatch can look like a transcription error in an otherwise clean synthetic dataset. Keep original-source provenance separate from rendering-input provenance and select the latter when constructing a direct audio-to-event training pair.

## Preserve the original purpose of the synthesized collection

The [Slakh paper](https://www.merl.com/publications/docs/TR2019-124.pdf) describes instrumental mixtures and stems generated from Lakh MIDI through sample-based virtual instruments. This gives a controlled path from symbolic material to audio, but the path includes processing decisions. The original MIDI is evidence about source lineage. The final render input is evidence about which events were sent to the synthesizer. Treating them as identical without checking those decisions removes an important part of the generation contract.

## Read the explicit stem association rule

The [author utility documentation](https://raw.githubusercontent.com/ethman/slakh-utils/master/README.md) states that instrument-specific heuristics can make an entry in all_src.mid differ from the corresponding separated MIDI. It identifies the separated stem MIDI as the exact file used to synthesize its audio and warns that sources have no guaranteed ordering. Use the metadata and declared file association. Do not derive instrument identity from directory iteration order or assume that a source ordinal in the original file has a universal meaning across representations.

## Keep rendering metadata attached to the pair

The [generation repository](https://github.com/ethman/slakh-generation) documents synthesis configuration and outputs including separated audio, MIDI and metadata. Preserve the selected instrument or patch information and any relevant preprocessing with a training pair. A program category is not a complete acoustic description of the rendered sound. If importing a derivative subset, verify that its stem selection and MIDI associations survived conversion rather than inferring completeness from the existence of a mixture file and a larger original MIDI collection.

## Audit a stem through the generation chain

Select an instrument stem, locate its declared separated MIDI and compare relevant events with the original-source track. Explain any transformation before training a note-accurate model. Check metadata for skipped or unavailable rendered sources instead of labeling all original tracks as audible mixture content. The [entity-group split guide](/journal/data-guide-entity-group-split-design/) and [reproducible software stack guide](/journal/software-stack-reproducibility/) support source grouping and implementation records. Synthetic generation is valuable because its lineage can be inspected; it does not justify discarding the intermediate evidence needed to establish a correct audio-label pair.
