We present Decomposer, a post-training framework for symbolic music decompilation: recovering executable, editable programs from symbolic music. We instantiate the task as MIDI-to-Strudel decompilation, generating Strudel programs that reproduce the input MIDI when executed while remaining readable as editable musical code.
Two-stage training. Training Decomposer directly with reinforcement learning is difficult because early outputs from an open-weight LLM rarely compile as valid Strudel programs; we therefore use a two-stage training pipeline. Supervised fine-tuning first gives the model a prior over executable Strudel code. Reinforcement learning then improves decompilation by executing each generated program and rewarding outputs that both match the input MIDI and remain readable.
Composite reward. A good decompilation should reproduce the input music while remaining easy to edit. Decomposer therefore uses two reward components: a faithfulness reward that compares the rendered MIDI to the input, and a readability reward that encourages concise Strudel structure instead of note-by-note transcription. Since both rewards can be computed from the input MIDI and the generated program alone, Decomposer can continue learning from unpaired MIDI without needing human-written Strudel references.
Strudel-Synth. Paired (MIDI, code) data does not exist at scale: a crawl of public Strudel yields only a few hundred non-trivial programs. To fill this gap, we build Strudel-Synth by distilling diverse Strudel programs from Claude-Opus-4.6 under varied musical and code-style seeds, then rendering each program to MIDI through the Strudel runtime. The resulting dataset contains over 21K paired examples, roughly 30× more than the public crawl.
Pick an input from Strudel-Synth or MidiCaps (1–6) on the left, then switch tabs on the right to compare the Strudel program produced by each method. Press play on either side to listen.

Combined with automatic music transcription, Decomposer points toward audio-to-code music decompilation:
audio is first transcribed to MIDI,
after which Decomposer recovers a Strudel program from the transcribed MIDI.


Decomposer connects MIDI to a code-based interface for music creation. Users can edit musical structure through Strudel code instead of adjusting notes one by one, and sample multiple generations from the same input for creative exploration.
When decompilation is faithful, the generated code becomes a useful view of the music. It makes repeated patterns, voices, harmony, and timing explicit, which can help with analysis, comparison, and LLM-assisted music understanding.
You are a music analyst. Analyze the following audio recording and describe its music theory in 2–3 sentences (max 50 words). Cover: key/mode/scale, tempo, genre, instrumentation, and harmony.
The recording is in A minor / F major (natural minor, diatonic) at roughly 126 BPM—a mid-tempo electronic/dance groove with a strong low-frequency foundation (heavy bass/kick) and warm mid-range harmonic content, likely synth-pad and keyboard textures. Harmony centers on the Am–F–C–G-type diatonic loop typical of the pop/EDM idiom, with a low spectral centroid indicating a smooth, non-percussive-heavy timbre.
The piece is in B major (or its relative G# minor), at 120 BPM in 4/4, blending a drum kit (kick, snare, closed hi-hat) with synth lead, electric bass, and synth pad—pointing to a pop/electronic or synth-pop genre. Its diatonic harmony centers on the tonic and dominant (B and F#) with a strong subdominant or relative pull toward G# minor, giving a bright, consonant tonal framework.
This piece is in B minor at 125 BPM, cycling through a i–VI–VII–v progression (Bm–G–A–F#m). It is a house/electronic track built on TR-808 drums, a syncopated GM synth bass, and filtered sine-wave chord stabs. The harmony uses diatonic triads with voicing anchored around the upper chord tones.
@article{kim2026decomposer,
title = {Decomposer: Learning to Decompile Symbolic Music to Programs},
author = {Kim, Yewon and Gandhi, Apurva and Chung, David and Neubig, Graham and Donahue, Chris},
year = {2026}
}