Generating Symbolic Music From Natural Language Prompts Using an LLM-Enhanced Dataset

Weihan Xu, Julian J. McAuley, Taylor Berg-Kirkpatrick, Shlomo Dubnov, Hao-Wen Dong

TL;DR

This paper introduces MetaScore, a large-scale dataset of symbolic music with rich metadata, and presents novel LLM-enhanced models for controllable symbolic music generation from natural language prompts. Their approach allows for fine-grained control over musical attributes like genre and instrument, paving the way for more intuitive human-AI music co-creation.

What Problem Does This Paper Address?

Generating symbolic music (like MIDI files) that can be easily edited and integrated into creative workflows has been a long-standing goal. While audio-domain text-to-music generation has seen significant progress thanks to large text-audio datasets, symbolic music generation has been hampered by the lack of similarly rich and extensive datasets. Specifically, existing symbolic music datasets often lack detailed metadata and natural language descriptions, making it difficult to train models that can generate music based on specific, free-form textual instructions. This paper aims to bridge this gap by creating a comprehensive dataset and developing models capable of controllable symbolic music generation from natural language.

Methods

The core of the paper lies in two main contributions: the MetaScore dataset and the LLM-enhanced music generation models.

MetaScore Dataset Enhancement: The authors start with a raw dataset (MetaScore-Raw) of 963K musical scores scraped from MuseScore, enriched with metadata like genre, composer, complexity, and user-annotated tags. To address missing genre information, they train a genre tagger using a Multitrack Music Transformer (MMT) architecture. Crucially, they leverage a pre-trained Large Language Model (LLM) to generate "pseudo-natural language captions" from the existing metadata. This LLM-enhanced dataset forms the basis for their text-to-music models.

Music Generation Models: They propose two main models:

  1. MST-Tags: A tag-conditioned music generation model. This model prepends specific tag events (genre, composer, complexity, instrument) to the music representation, allowing for control based on predefined tags.
  2. MST-Text: A text-conditioned music generation model. This model uses a pre-trained sentence transformer to encode natural language prompts into embeddings, which are then integrated into the music generation process. This allows for more flexible, free-form text inputs.

Both models are built upon a decoder-only linear transformer architecture, adapted from existing event-based music representations like REMI+ and MMT, to incorporate controllability.

Datasets

  • MetaScore-Raw: The initial dataset comprising 963K musical scores and associated metadata scraped from MuseScore.
  • MetaScore-Genre: A subset of MetaScore-Raw (181K songs) containing user-annotated genres, used for training the genre tagger.
  • MetaScore-Plus: The final, enhanced dataset (963K songs) with completed genre tags and LLM-generated captions. A portion of this dataset (228K public domain or CC-licensed) will be publicly released.
  • LMD (Large Music Dataset): An additional 22,000 samples from LMD were used to augment the genre tagging process.

Key Insights and Ideas

  • LLMs as Metadata Interpreters: The paper demonstrates the power of LLMs not just for generating text, but for interpreting structured metadata and translating it into natural language captions. This significantly enhances the usability of existing music datasets for text-to-music tasks.
  • Bridging the Symbolic Music Data Gap: The creation of MetaScore addresses a critical bottleneck in symbolic music generation, providing a large-scale, richly annotated resource that can drive future research.
  • Free-form Text Control is More Natural: While tag-based control is effective, the MST-Text model's ability to handle free-form natural language prompts offers a more intuitive and user-friendly interface for musicians and creators.
  • Controllability vs. Data Quality Trade-off: The comparison between MST-Tags-Small (trained on a smaller, higher-quality dataset) and MST-Tags (trained on a larger, potentially noisier dataset) highlights a common trade-off in machine learning, suggesting that while larger datasets can improve performance, data quality remains paramount.

Key Results

  • Subjective Evaluation: Both MST-Tags and MST-Text models outperformed a baseline text-to-music model in listening tests across metrics like coherence, arrangement, and adherence.
  • Comparison to Text2MIDI: MST-Text achieved comparable performance to the concurrent work Text2MIDI [1], with MST-Text showing better adherence on its own test set, while Text2MIDI performed better on Text2MIDI's test set. Overall quality was comparable.
  • Objective Evaluation: MST-Text closely matched ground truth in terms of pitch class entropy and scale consistency, outperforming the BART-based baseline.
  • Genre Tagging: The genre tagger achieved a micro-averaged F1 score of 62.48%, with subjective evaluations showing auto-generated tags were only slightly less adherent than ground truth tags.

Limitations and Future Work

  • Copyright Concerns: The authors acknowledge that MetaScore contains copyrighted material, and they plan to release only public domain or CC-licensed portions to mitigate risks. Music generation systems built on this dataset may also raise copyright issues.
  • LLM Caption Quality: While LLMs are used to generate captions, the paper notes that non-English and corrupted captions were excluded, implying that the quality of LLM-generated captions can vary.
  • Adherence in Text-to-Music: The text-conditioned system (MST-Text) showed lower adherence compared to tag-conditioned systems, suggesting that interpreting free-form text is more challenging than adhering to predefined tags.
  • Future Work: The paper suggests that their models open up new pathways for human-AI music co-creation, implying future work could focus on more interactive and collaborative music generation systems. The release of the dataset and models also invites further research into symbolic music generation.

Summary updated

BibTeX
@inproceedings{xu2025generating,
  author = {Weihan Xu and Julian J. McAuley and Taylor Berg-Kirkpatrick and Shlomo Dubnov and Hao-Wen Dong},
  title = {{Generating Symbolic Music From Natural Language Prompts Using an LLM-Enhanced Dataset}},
  booktitle = {ISMIR},
  year = {2025},
  url = {https://openreview.net/forum?id=2QOpiEubLt},
}
Figure