← Latest papers
💬 NLP

MIDI-LLM: Improving Text-to-MIDI Music Generation via Adapting Large Language Models

The paper introduces MIDI-LLM, a two-stage training framework that adapts Large Language Models to generate high-quality, text-controlled multitrack MIDI music and lead sheets, demonstrating superior performance and user acceptance over existing baselines through extensive ablation studies and a large-scale real-world blind evaluation.

Original authors: Shih-Lun Wu, Dave Carlton, Ryan Miyakawa, Yoon Kim, Chris Donahue, Cheng-Zhi Anna Huang

Published 2026-08-05
📖 7 min read🧠 Deep dive

Original authors: Shih-Lun Wu, Dave Carlton, Ryan Miyakawa, Yoon Kim, Chris Donahue, Cheng-Zhi Anna Huang

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine a world where you can talk to a computer and ask it to write a song for you. In the realm of artificial intelligence, this is called "text-to-music." For a while, the best way to do this was to ask the computer to generate raw sound waves, like a digital recording. But here's the catch: once that sound is made, it's like a painting on a canvas. You can't easily erase a single brushstroke or change the tempo of just the drumbeat without ruining the whole picture. Musicians need something more flexible, something they can edit note-by-note. This is where "MIDI" comes in. Think of MIDI not as sound, but as a digital sheet music or a set of instructions telling a virtual piano exactly which keys to press, how hard, and for how long. It's the difference between a finished recording and a Lego set; you can take the Lego apart and build something new.

Now, imagine taking the super-smart language models (the AI that writes essays and answers questions) and teaching them to speak this musical language. That's the big idea behind this new research. The scientists wanted to see if they could turn a text expert into a music expert, allowing people to type things like "a sad jazz song with a fast drum" and get a perfectly editable musical score in return. They weren't just trying to make a pretty noise; they wanted to build a tool that helps human creators brainstorm and collaborate with AI in a way that feels natural and controllable.


The Paper: MIDI-LLM

The researchers behind this paper, a team from MIT, Hooktheory, and Carnegie Mellon University, have cooked up a new recipe called MIDI-LLM. Think of it as a way to upgrade a standard Large Language Model (LLM)—the kind of AI that writes stories and solves math problems—so it can also write music.

Usually, these AI models are like chefs who only know how to cook with words. They understand "apple" and "pie," but they don't know what a "C-sharp note" sounds like or how to write it down. The team's first move was to give the AI a new vocabulary. They expanded the model's dictionary to include special "MIDI tokens." Instead of writing out a note as a long sentence like "start at 10 seconds, last for 0.5 seconds, play a high C," the model now sees it as a single, compact symbol, like a secret code. This is like teaching a chef to read a new language where a single word means "add salt," making the cooking process much faster and more efficient.

But just giving the model a new dictionary isn't enough; it needs to learn how to use it. The team trained the AI in two distinct stages, like a music student first learning theory and then playing in a band.

Stage 1: The Solo Practice (Unimodal Pretraining)
First, they let the AI practice on its own. They fed it two types of data:

  1. Music-related text: Articles, questions, and answers about music theory (like "What is a minor chord?").
  2. Standalone MIDI files: Thousands of raw musical scores without any text descriptions.
    This stage was about teaching the AI the "syntax" of music. It learned how notes fit together, how rhythms work, and the structure of a song, all without needing a human to tell it what to do. It's like a musician practicing scales and reading sheet music in a quiet room.

Stage 2: The Duet (Multimodal Supervised Finetuning)
Next, they paired the AI with a partner. They fed it pairs of text and music: a prompt like "a happy pop song" followed immediately by the corresponding MIDI score. This taught the AI to translate human ideas into musical instructions. If you said "jazz," it learned to write jazz notes. If you said "sad," it learned to write slow, minor chords. This is the moment the AI learns to listen to your request and actually play what you asked for.

What They Found

The results were pretty impressive. When they tested their new MIDI-LLM against a recent competitor called Text2midi, their model came out on top in two major ways:

  1. Better Quality: The music it generated sounded more realistic and followed the rules of music better.
  2. Better Control: It listened more closely to the text instructions. If you asked for a specific mood or genre, it actually delivered.
  3. Speed: Because they used a standard AI architecture (based on Llama 3.2), they could use existing, super-fast computer tools to run the model. Their model was 7 to 13 times faster than the competitor, even though it was slightly larger.

They also tested a special feature called "infilling." Imagine you have a song that's half-finished, and you want the AI to write the middle part. The team found that the AI was great at this, but there was a tricky balance. If the AI was too focused on the text you typed, it might ignore the music you had already written. If it was too focused on the existing music, it might ignore your new text instructions. To fix this, they introduced a "knob" (called Classifier-Free Guidance) that lets users adjust how much the AI should listen to the text versus the existing music.

Real-World Testing: The "In-the-Wild" Study

To see if this actually helped real people, the team didn't just run computer tests; they went into the real world. They partnered with Hookpad, a website where songwriters create music. They let 58 real users (who were already subscribers) try out their new AI co-pilot.

The users were asked to create songs from scratch or fill in missing parts of songs. They could choose from three different AI models:

  • The old model (which only looked at the music, ignoring text).
  • A version of the new model that ignored text.
  • The full new MIDI-LLM (which listened to text).

The results showed that when users were starting a song from scratch ("zero-to-one"), the full MIDI-LLM was the clear winner. It had nearly double the acceptance rate of the other models. This suggests that when people are trying to get a new idea going, being able to type "make it sound like a 90s rock song" is incredibly valuable.

However, when users were just filling in a small gap in an existing song, the results were more mixed. Sometimes, the users preferred the older model that ignored the text. The researchers suggest this might be because, when you are already deep in a song, you might want the AI to just "fit in" with what's already there, rather than trying to force a new idea that might clash with the existing melody.

The Bottom Line

The paper concludes that adapting Large Language Models for music is a powerful recipe. By teaching these models to speak both "text" and "MIDI," they created a tool that helps humans and AI collaborate more effectively. It's not just about generating noise; it's about giving creators a flexible, fast, and intelligent partner that can turn a simple sentence into a full musical score, ready for them to tweak and perfect. The team is already rolling this out to more users, hoping to see how it changes the way people write music in the future.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →