TL;DR
GETMusic is a novel symbolic music generation framework capable of generating any combination of target instrument tracks conditioned on arbitrary source tracks. By combining a compact, 2D track-aligned music representation (GETScore) with a non-autoregressive discrete diffusion model (GETDiff), it breaks free from the rigid source-target constraints of prior music generation systems.
What Problem Does This Paper Address?
AI-assisted music composition often requires generating specific instrument tracks based on existing ones (e.g., creating a piano accompaniment for a given melody). However, current symbolic music generation models struggle with flexibility. They are typically locked into specific, predefined source-target combinations.
This limitation stems from how music is represented:
- Sequence-based representations flatten multi-track music into a single chronological stream of tokens. This causes notes from different instruments to interleave, making it difficult for standard autoregressive models to isolate and precisely generate specific target tracks.
- Image-based representations (like pianorolls) explicitly separate tracks but span the entire pitch range of every instrument. This results in massive, sparse, high-resolution matrices that are computationally expensive and difficult for models to generate effectively.
GETMusic addresses this gap by introducing a unified framework that can handle any arbitrary combination of source and target tracks (665 possible combinations for a 6-instrument ensemble) within a single model.
Methods
GETMusic achieves its versatility through the co-design of its representation and its generative model:
1. GETScore (The Representation)
Inspired by traditional sheet music, GETScore organizes music in a 2D structure where instrument tracks are stacked vertically and time progresses horizontally (quantized into 16th-note units). To keep the representation compact without losing harmony, it uses a smart note tokenization strategy:
- Simultaneous notes within a single track are merged into a single compound pitch token.
- Each track requires only two rows: one for pitch tokens and one for duration tokens.
- Unoccupied time steps are filled with padding tokens.
2. GETDiff (The Model)
GETDiff is a discrete diffusion model based on the Roformer architecture (a Transformer variant utilizing rotary position embeddings for better length extrapolation).
- Forward Process: During training, tracks are randomly assigned as either source or target. Target tracks are iteratively corrupted by replacing their tokens with a special
[MASK]token, while source tracks remain untouched as ground truth. Uninvolved tracks are filled with an[EMPTY]token to prevent interference. - Denoising Process: GETDiff learns to predict all masked target tokens simultaneously (non-autoregressively) conditioned on the source tracks. Learnable condition flags are added to the embeddings to help the model distinguish trustworthy source tokens from target tokens undergoing denoising.
Datasets
The authors crawled a massive dataset of 1,569,469 MIDI files from Musescore. After rigorous cleansing and filtering (removing files with too few notes, multiple tempos, or missing melodies), they retained 137,812 GETScores (approximately 2,800 hours of music).
The dataset features six instrument tracks: bass, drum, guitar, piano, string, and melody. Additionally, they used the Viterbi algorithm to infer a chord progression track for each piece, providing extra compositional guidance during generation.
Key Insights and Ideas
- Decoupling Time and Track: By aligning tracks horizontally over a shared timeline, GETMusic eliminates track interleaving. This allows the model to easily mask and predict specific tracks without losing temporal alignment.
- Compound Tokens for Harmony: Merging simultaneous notes into a single compound token drastically reduces data sparsity compared to pianorolls, while inherently preserving chordal harmony derived from real-world data.
- Non-Autoregressive Power: Because diffusion models predict all tokens at once rather than left-to-right, GETMusic can perform zero-shot infilling. For example, users can mask a section in the middle of a track to generate a harmonious musical bridge between two distinct sections.
Key Results
The authors evaluated GETMusic across three tasks: accompaniment generation, lead melody generation, and generation from scratch.
- Superior Quality: In accompaniment and melody generation, GETMusic consistently outperformed PopMAG across objective metrics like Chord Accuracy (CA) and KL-divergence for pitch and duration distributions.
- Human Preference: In blind listening tests, evaluators gave GETMusic significantly higher Human Ratings (HR) than the baselines (e.g., 3.35 vs. 2.88 for accompaniment generation on a 5-point scale).
- Inference Speedup: Thanks to its non-autoregressive design, GETMusic generated a musical piece in just 4.80 seconds, vastly outperforming PopMAG (23.32 seconds) and an autoregressive variant of GETMusic (17.13 seconds).
Limitations and Future Work
While highly versatile, GETMusic currently focuses exclusively on note pitch and duration. It leaves out dynamic musical factors such as velocity (how hard a note is struck) and subtle tempo variations, which are vital for expressive, human-like performances.
For future work, the authors plan to expand the framework by incorporating lyrics as an additional track, paving the way for direct lyric-to-melody generation.
Summary updated