Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Part 2: Real-Time Music Co-Creation

Chapter 4 | LLMs for Creators

Illustration of a band playing live: drummer, guitarists, keyboardist and singer.

In Part 1, creators listen to suggestions and decide what to do next. During improvisation, those decisions happen while the music continues. A musician might change the melody, hold a note, or introduce a new rhythm, and an AI partner needs to respond in time. This part examines systems designed for that exchange and the technical choices that make it possible.

Making music through improvisation

Playing an instrument or singing can be a way to work out an idea before knowing exactly where it will go 1. An AI system that joins this process could provide:

Applying LLMs to live performance remains an emerging area 3. Alongside musical quality, developers must consider when a response arrives and how it fits the ongoing performance.

Processing music as it arrives

Real-time audio software typically processes sound in short frames, also called blocks or buffers. In a simple pipeline, the system computes the next output frame while the current one plays. If that output is not ready in time, playback may contain a gap or glitch 4.

Animation of frame-based processing: user input arrives in colored frames on the top row, and the corresponding AI output frames are produced on the bottom row, each one frame later, while a playhead moves from left to right.

Figure 1:Frame-based processing. Each colored frame of user input (top) is turned into a frame of output (bottom) that plays one frame later. Animation from Chris Donahue, Principles of Computer Music, §10.6 Real-time Processing (CMU 15-322).

This example separates two timing constraints. Latency is the delay between input and its corresponding output; the illustrated pipeline introduces one frame of delay. Compute budget is the time available to prepare each output frame. To sustain playback, processing must keep pace with the frame duration. Smaller frames can reduce buffering delay, but leave less time to compute each one. Actual systems may introduce additional delay through audio hardware, buffering, and communication.

Generative models may work with audio blocks, codec tokens, or beat-level musical events. These units differ, but each system needs to deliver its output before the scheduled playback time.

What makes real-time generation hard?

  1. Tight latency budget. Closely coordinated playing can require responses on the order of tens of milliseconds, with less than roughly 100 ms often used as a design target. The acceptable delay depends on the interaction. Server GPUs can support larger models but introduce network delay; local inference avoids that communication cost but has fewer computing resources 325.

  2. No future context. The model must choose what to play before hearing everything it will accompany. A chord scheduled for the next beat may already be committed when the musician’s melody note arrives.

  3. Responsiveness and throughput. Generating larger chunks can be more efficient, but the model then has fewer opportunities to adjust to new (and unexpected) input.

Designing for live interaction

Meeting these constraints involves both model design and the software around it. The examples below make changes at training, inference, and deployment 2678.

Table 1:Where real-time systems save time.

StageTechniquesExamples in this part
TrainingCompact representations; learning to anticipate; training on model-generated contextReaLchords learns from an offline teacher; LMDM uses ARC-Forcing to reduce error accumulation
InferenceReuse computation; generate ahead; schedule output before playbackLMDM’s block-wise KV caching; ReaLJam’s lookahead and commit window; jam_bot’s scheduling
DeploymentQuantization and efficient runtimesjam_bot’s use of ggml

Overview: real-time music co-creation

We consider two groups of systems, based on whether they generate symbolic music or audio.

Table 2:Real-time music co-creation systems discussed in this part.

DomainWhat the system doesExamples
Symbolic musicListens to a player’s notes and responds with notes or chords (e.g., accompaniment, call-and-response)jam_bot (ISMIR’25), ReaLchords (ICML’24), ReaLJam (CHI EA’25)
AudioStreams audio continuously, steered by text or by what a user playsLMDM (2026), Streaming Generation (ISMIR’26), Magenta RT (NeurIPS’25)

Symbolic systems generate notes or chords that can be played through a synthesizer or other MIDI-compatible instrument. Audio systems generate the sound itself, including timbre and performance details. This gives them different expressive possibilities, but also increases the amount of information they must produce in time.


Symbolic music accompaniment: ReaLchords and ReaLJam

ReaLchords generates chord accompaniment to a melody as it is played 6. ReaLJam builds on this work with an interface and communication protocol for live interaction 9. Together, they illustrate two parts of the problem: learning to accompany without future context, and delivering those predictions in a playable system.

Online accompaniment: the user's melody arrives as orange notes up to a dashed "now" line; AI chords C, G, Am have been played, and the model predicts the next chord F just after "now", before hearing the melody that goes with it.

Figure 2:Online accompaniment. The model must choose the next chord (in this example, F) without hearing the melody note it will accompany.

Training ReaLchords: an online student and an offline teacher

ReaLchords must choose chords without knowing the upcoming melody. Its online model (the student) uses only past melody notes and chords. Learning from existing songs alone does not fully solve this problem: the harmonies in those songs were composed with knowledge of the melody, while the live model has only partial information.

To improve accompaniment under this constraint, ReaLchords fine-tunes the student with reinforcement learning using two sources of guidance

max⁡θ  Ex∼pdata[−DKL(πθ ∥ ϕ)  +  Ey∼πθ(⋅∣x)[R(x,y)]]\max_{\theta}\; \mathbb{E}_{x \sim p_{\text{data}}}\Big[ -D_{\mathrm{KL}}\big(\pi_{\theta} \,\|\, \phi\big) \;+\; \mathbb{E}_{y \sim \pi_{\theta}(\cdot \mid x)}\big[ R(x, y) \big] \Big]

Here πθ\pi_\theta is the online policy, ϕ\phi the offline teacher, xx the melody, yy the chords, and RR the combined reward.

ReaLchords training diagram: an online policy generates chords from melody x; an offline teacher scores them through a KL term; contrastive and discriminative reward models, trained on real (blue) and mismatched (pink) melody-chord pairs, provide rewards.

Figure 3:ReaLchords training. The online policy (student) is fine-tuned with a KL term toward an offline teacher that sees the whole melody, plus rewards from models trained to separate real from mismatched melody–chord pairs. Figure adapted from Wu et al. (2024).

ReaLJam: making it playable

ReaLJam connects a server-side model (ReaLchords) to a musician playing in a browser. It needs to account for computation and communication delays while keeping the accompaniment responsive. Three features help manage this 9:

  1. Plan ahead. The agent continually predicts four beats of melody and chords. The predicted melody is its estimate of what the musician will play, giving it a basis for preparing the accompaniment.

  2. Commit near playback. Chords within a short commit window are fixed so they can be scheduled reliably. Later chords remain open to revision as new notes arrive.

  3. Show upcoming chords. The interface displays the plan, helping the musician anticipate the accompaniment and respond to it.

ReaLJam timeline: after "now", a 4-beat lookahead contains a predicted (dashed) melody and planned chords; the first two chords (Am, Am) are inside the commit window and locked, while later chords (F, G) can still change.

Figure 4:ReaLJam plans 4 beats ahead, commits only the chords near “now”, and regenerates the rest. The dashed melody is the agent’s guess of what the user will play.


Symbolic co-performance: jam_bot

Jam_bot supports live human–AI improvisation and was developed at the MIT Media Lab with keyboardist Jordan Rudess 2. It debuted in concert in 2024, bringing model design, personalisation, and performance software into the same project.

Figure 5:Jordan Rudess performing with jam_bot (“Jordan Rudess + jam_bot: A Human-AI Musical Dialogue”).

Its design combines several forms of interaction with training and inference choices tailored to live use:

A pianist with headphones at a keyboard, next to three piano-roll panels showing user input (orange) and agent input (purple): user and agent trade bars; agent accompanies user melody; agent improvises on top of user chords.

Figure 6:jam_bot interaction modes: trading bars, accompanying the user’s melody, and improvising over the user’s chords.


Audio co-performance

Audio generation brings timbre and texture into the interaction, alongside notes and rhythm. Streaming models produce sound in chunks and allow users to influence the music as it plays. The examples here support three overlapping forms of interaction:

Three cards. 1. Text control: the prompt changes from "lo-fi piano" to "drum-n-bass" while the model keeps playing. 2. Respond to your playing: the model hears the musician's live audio and answers or varies it. 3. Accompaniment: the model generates a bass part matching a live guitar.

Figure 7:Three ways to co-perform with an audio model.

  1. Text control. Change the prompt while the model plays, and the music morphs into the new style (e.g., Magenta RT, LMDM).

  2. Respond to your playing. The model hears the musician’s live audio and answers or varies it (e.g., Magenta RT’s audio injection, LMDM’s generative delay).

  3. Accompaniment. The model generates a matching part for another instrument’s live audio or MIDI (e.g., streaming accompaniment, LMDM, applications built on Magenta RT 2).

Figure 8:Guitarist Sebastian Franjou playing with LMDM’s generative delay, which responds to their playing. Video from Novack et al. (2026) 7.

Approaches to streaming audio

Magenta RT / Live Music Models. Magenta RealTime generates audio continuously and accepts text and audio prompts 5. Its first version uses a 750M-parameter model. With audio injection, live input is mixed into the audio context used for generation, allowing the musician’s playing to influence what comes next. Magenta RealTime 2 includes 2.4B- and 230M-parameter models designed for local use, with MIDI, text, and audio controls 11.

Live Music Diffusion Models (LMDM). Diffusion-based music generators commonly produce a complete clip in one pass through the generation process. LMDM adapts Stable Audio Open Small for streaming 7, with changes to inference, training, and live interaction:

Streaming generation for accompaniment. Here, the model must generate an accompanying part while listening to a live input, such as a singer. Wu et al. (2026) study two variables: future visibility tft_f, which specifies how far the available input extends relative to output playback, and chunk size kk, the amount generated per call. Negative future visibility means the model must predict ahead to compensate for system delay.

Their experiments with transformer decoders show a trade-off. Access to later input improves coherence, but leaves less time to compute before playback. Larger chunks improve throughput, but reduce how often the accompaniment can respond. The study also finds that maximum-likelihood training alone struggles to produce coherent accompaniment without future context, motivating approaches that explicitly train anticipation.

References
  1. Kim, Y., Lee, S.-J., & Donahue, C. (2025). Amuse: Human-AI Collaborative Songwriting with Multimodal Inspirations. Proceedings of the CHI Conference on Human Factors in Computing Systems (CHI). https://arxiv.org/abs/2412.18940
  2. Blanchard, L., Naseck, P., Brade, S., Lecamwasam, K., Rudess, J., Huang, C.-Z. A., & Paradiso, J. (2025). The jam_bot, a Real-Time System for Collaborative Free Improvisation with Music Language Models. Proceedings of the International Society for Music Information Retrieval Conference (ISMIR). 10.5281/zenodo.17811478
  3. Kim, Y., Brade, S., Wang, A., Zhou, D., Kim, H., Wang, B., Lee, S.-J., Flores García, H., Huang, C.-Z. A., & Donahue, C. (2026). A Design Space for Live Music Agents. Proceedings of the CHI Conference on Human Factors in Computing Systems (CHI). https://arxiv.org/abs/2602.05064
  4. Donahue, C. (n.d.). Principles of Computer Music, Section 10.6: Real-time Processing. https://www.cs.cmu.edu/~15322/book/ch10/06.html
  5. Lyria Team. (2025). Live Music Models. NeurIPS Creative AI Track. https://arxiv.org/abs/2508.04651
  6. Wu, Y., Cooijmans, T., Kastner, K., Roberts, A., Simon, I., Scarlatos, A., Donahue, C., Tarakajian, C., Omidshafiei, S., Courville, A., Castro, P. S., Jaques, N., & Huang, C.-Z. A. (2024). Adaptive Accompaniment with ReaLchords. Proceedings of the International Conference on Machine Learning (ICML). https://arxiv.org/abs/2506.14723
  7. Novack, Z., Brade, S., Kim, H., Flores García, H., Shikarpur, N., Talegaonkar, C., Kim, S., Chen, V. K., McAuley, J., Berg-Kirkpatrick, T., & Huang, C.-Z. A. (2026). Live Music Diffusion Models: Efficient Fine-Tuning and Post-Training of Interactive Diffusion Music Generators. https://arxiv.org/abs/2605.22717
  8. Wu, Y., Wang, M., Lei, H., Brade, S., Blanchard, L., Wu, S.-L., Courville, A., & Huang, C.-Z. A. (2026). Streaming Generation for Music Accompaniment. Proceedings of the International Society for Music Information Retrieval Conference (ISMIR). https://arxiv.org/abs/2510.22105
  9. Scarlatos, A., Wu, Y., Simon, I., Roberts, A., Cooijmans, T., Jaques, N., Tarakajian, C., & Huang, C.-Z. A. (2025). ReaLJam: Real-Time Human-AI Music Jamming with Reinforcement Learning-Tuned Transformers. Extended Abstracts of the CHI Conference on Human Factors in Computing Systems (CHI EA). 10.1145/3706599.3720227
  10. Blanchard, L., Naseck, P., Liang, K., Tan, J., Lei, H., Huang, C.-Z. A., & Paradiso, J. A. (2026). Enhancing Expressive Musical Conversation in the jam_bot. Proceedings of the International Conference on New Interfaces for Musical Expression (NIME). https://nime.org/proceedings/2026/nime2026_73.pdf
  11. Magenta Team. (2026). Magenta RealTime 2: Open & Local Live Music Models.