cs.SDJun 21, 2026

Libretto: Giving LLM Agents a Sense of Musical Structure

Authors: Yichen Xu

Organizations: University of California, Berkeley

Abstract

Generative music systems can now produce impressive audio from text prompts, but audio outputs are difficult to inspect, edit, and diagnose as musical structure. We introduce Libretto, an agent-facing framework for symbolic music generation and revision. Libretto uses an LLM-native grammar with explicit onset slots, voices, and bar-level organization, then evaluates each piece in a corpus-calibrated statistical space over rhythm, harmony, melody, texture, form, and variation. The same structural axes support retrieval, diagnosis, copy-risk control, and iterative self-revision. Across gap filling, reference-guided full-piece generation, gradual morphing, and educational music generation, Libretto turns symbolic music from a raw token sequence into a measurable and editable object for language-model agents.

Explore similar work

CardsList
  1. Text2Score: Generating Sheet Music From Textual Prompts

    May 13, 2026Keshav Bhandari, Sungkyun Chang, Abhinaba Roy +4Music GenerationSheet Music