Sound & music · Research feature

From One-Shot Generation to Incremental Music Composition: Adapting a General-Purpose Instruction LLM for Persistent Symbolic Editing

The research evaluates a general-purpose instruction LLM—Llama 3.1 8B Instruct—adapted via LoRA to perform incremental edits on musical scores in ABC notation.

Adapted from research by André Ricardo Ducca Fernandes, Jean-Pierre Briot, Simone Diniz Junqueira Barbosa1 and colleagues.

arXiv preprint revision · 2026-09-28 · Attribution & reuse
In this article
Editorial illustration of sound waves.

Editor’s introduction

The research evaluates a general-purpose instruction LLM—Llama 3.1 8B Instruct—adapted via LoRA to perform incremental edits on musical scores in ABC notation. The model is tested against a baseline unadapted version through a sequence of operations including chord addition, inpainting, and transposition, with explicit rules on what changes are allowed and what must be preserved. Results show a sharp rise in checker-admitted outputs—from 29.37% to 99.37%—and a marked improvement in compliance when outputs are valid, increasing from 0.7205 to 0.9798. The study confirms the technical feasibility of persistent symbolic editing using such models but does not assess musical quality or human-AI co-creative outcomes, which remain open questions for future evaluation.

INTRODUCTION

Music composition is not only a problem of producing complete pieces from scratch. Composers commonly revise existing material: they preserve some decisions, replace others, move between global and local changes, and continue from the current state of a piece. A useful analogy is text editing. A writing assistant that could only regenerate an entire document whenever one paragraph should change would provide generation, but only limited support for writing as an iterative activity. Music composition raises the same distinction: a musician may wish to modify a passage, add harmony, transpose material, or preserve most of a score while changing only a specified part.

This interaction-centered view is supported by human-centered studies of AI-assisted music creation. In case studies of music creators, transparency and user control emerged as central concerns; the authors argue that AI creation tools should support continued iteration while making clear how users can edit, modify, and manipulate AI-produced material around each iteration. Recent systems also make revision itself increasingly explicit: BeatEdit recasts symbolic generation as editing a draft rather than synthesizing from scratch, while MusiChat maintains an active composition state across conversational turns.

This paper investigates a complementary computational question: can a general-purpose instruction-following LLM be specialized to participate reliably in an incremental symbolic-composition process in which successive natural-language operations transform a persistent musical artifact while preserving operation-specific invariants? The aim is deliberately not to design a dedicated music-editing architecture and then demonstrate that it can edit music. Instead, we test how far operation semantics, state continuity, and preservation behavior can be learned through instruction supervision by a general-purpose model. We provisionally call the adapted model ABC-LLM.

The interaction uses five canonical operations: Create a melody, Create a melody with chords, Add chords, Inpainting, and Transpose. The first two initialize or replace the artifact; the others transform its current state. Current scope is global for Add chords and Transpose and selected bars for Inpainting. Each operation specifies what may change and what must be preserved, and each output becomes the artifact for the next turn. Transposition can, of course, be implemented deterministically without an LLM; here it tests whether the same instruction-following mechanism can execute heterogeneous operations under one persistent interaction contract.

Symbolic Revision and Assisted Composition

Symbolic representations make notes, chords, meter, and other musical structure explicitly manipulable, and have long supported local revision. DeepBach uses pseudo-Gibbs sampling to regenerate selected positions under constraints, while Coconet learns masked reconstruction and supports nonlinear rewriting by blocked Gibbs sampling. These works are important precedents: local editing and inpainting are not new claims of the present paper.

FlowComposer provides a different precedent: assisted lead-sheet composition. Its statistical and constraint-based engine is embedded in a workflow where the composer retains control and can work from a blank or partial score. Composer’s Assistant supports interactive multitrack MIDI infilling while preserving surrounding context. MIDI-GPT similarly targets computer-assisted multitrack composition with a dedicated Transformer that supports generation, continuation, track- and bar-level infilling, and structured controls for instrumentation, style, density, polyphony, and duration. NONOTO complements these systems at the interface level as a model-agnostic score editor for interactive composition by inpainting.

BeatEdit makes the editing perspective explicit. It introduces a dedicated symbolic representation and typed edit mechanisms for error correction, accompaniment refinement, and segment completion, emphasizing that much musical creation consists of locating what should change while preserving what should not. This is close to our preservation concern but differs computationally: BeatEdit engineers an edit-specific architecture, whereas our question is whether a general-purpose instruction LLM can learn the interaction contract directly from operation-aware supervision.

Natural Language and Persistent Conversation

LLMs make textual symbolic music especially interesting because user instructions and musical notation can share one model interface. ChatMusician adapts LLaMA2 through continual pre-training and fine-tuning on ABC, treating music as a second language and demonstrating text-conditioned understanding and generation. Our question is narrower: after returning a melody, a later Add chords request must preserve that exact melody, and a subsequent Inpainting request must act on the harmonized state rather than on a newly generated sample.

MusiChat is a particularly close contemporary system. It explicitly targets the limitations of prompt-and-regenerate workflows and maintains an active composition state across natural-language interactions, but it does so with a hybrid architecture that combines LLM-based reasoning and intent routing with a symbolic music engine. BeatEdit and MusiChat appeared nearly simultaneously in July 2026. We interpret this timing not as a priority contest but as independent evidence that editable and iterative music generation is becoming a distinct research direction.

A Focused Design Space and Research Gap

A broader design-space perspective has recently been developed for Music Co-Creation Systems. Silva’s systematic mapping of 46 systems organizes co-creative design decisions around musical tasks, exchanged inputs, temporal granularity, interaction protocol, interaction paradigms, generation method, and stylistic divergence. Our purpose is narrower: to isolate properties especially relevant to incremental transformation of a persistent musical artifact.

The specific gap addressed here lies at the intersection of four properties. First, the user communicates differentiated compositional operations in ordinary language. Second, the returned symbolic score is the authoritative state for the next turn. Third, editing operations define observable preservation invariants, so correctness concerns both what changes and what must remain stable. Fourth, these behaviors are learned by a general-purpose instruction LLM through state-transition supervision rather than supplied by a dedicated editing architecture or symbolic transformation engine at inference time.

This gap is deliberately scoped. We do not claim that local editing, inpainting, assisted composition, natural-language music generation, or persistent interaction are individually new, nor that fine-tuning an LLM is itself a scientific contribution. The question is whether a general-purpose instruction model can learn the resulting interaction contract reliably enough to support incremental symbolic composition, and how that capability should be evaluated without confusing syntax, operation compliance, musical characterization, and training-corpus overlap.

Operation-Aware Dialogue Dataset

The dataset exposes five user-facing operations: Create a melody, Create a melody with chords, Add chords, Inpainting, and Transpose. Creation establishes a new artifact. Chord addition pairs an unannotated melody with its annotated counterpart. Inpainting replaces one to four parsed bars while copying material outside the target. Transposition applies a sampled interval to the current artifact, including chord symbols when present.

The constructed artifact contains 496,038 JSONL records; 495,853 contain at least one supervised operation. Across them are 3,241,509 user–assistant operation instances, with a mean of 6.535 operations per record and a range of 1–20 among non-empty records.

Evaluation Protocol

Evaluation separates three questions: (1) does the model return usable ABC and perform the requested operation while preserving its invariants? (2) how do selected musical characteristics compare with IrishMan references? and (3) how much sequence overlap occurs with training material relative to held-out data?

Admission and Operation Compliance

Responses first pass ABC extraction and parser-owned syntax admission. An admitted response is one that reaches the relevant operation checker; compliance asks how well that checker judges the requested transformation. For example, if an Add chords response is malformed ABC, it is not admitted and cannot receive a conditional compliance score. If it is valid ABC but changes the melody while adding chords, it is admitted but receives poor compliance. Reporting both quantities prevents a high conditional score on a small, selectively successful subset from being mistaken for end-to-end reliability.

Admission and Compliance

The principal result concerns whether the model can participate reliably in the workflow. Of 1,750 base-model attempts, 1,234 contain extractable ABC and only 514 reach an operation checker; the fine-tuned model yields extractable ABC in all 1,750 attempts and 1,739 reach a checker. Overall checker admission therefore increases from 0.2937 to 0.9937. Conditional operation compliance among admitted turns increases from 0.7205 to 0.9798.

Operation-level diagnostics show that the gain extends beyond syntax. In the fine-tuned response set, chord addition preserves 4,639 of 4,644 compared melody bars and adds the expected quoted chord symbols in 224 of 249 admitted turns. Inpainting preserves 8,886 of 9,043 compared non-target bars and modifies 1,168 of 1,230 target bars. Transposition matches the requested key in 492 of 496 admitted turns. The adaptation therefore improves both requested changes and operation-specific preservation.

Reference-Relative Musical Characteristics

For the fine-tuned model, overlap area (OA) values across the nine features range from 0.8952–0.9724 for Add Chords, 0.8297–0.9687 for generation before harmonization, 0.9315–0.9853 for inpainting with chords, 0.8301–0.9862 for transposition with chords, 0.8727–0.9711 for melody generation, 0.8875–0.9731 for melody inpainting, and 0.7972–0.9730 for melody transposition. These values describe distributional agreement for selected features, not absolute aesthetic quality.

CTnCTR is calculable for all three chord-editing states, with OA 0.9718 for Add Chords, 0.9652 for inpainting with chords, and 0.9696 for transposition with chords. Pitch- and chord-in-scale comparisons are ceiling-heavy: reference and candidate medians are 1.0 in all ten comparisons, while candidate rates are slightly higher under the implemented definitions. These measurements should therefore be read as corpus-relative descriptors.

Concrete Multi-Turn Example

Across the fixed response sets, LoRA adaptation increases ABC extraction (1,234 to 1,750), checker admission (514 to 1,739), strict feature eligibility (14 to 1,548 before equalization), and conditional compliance (0.7205 to 0.9798). The main empirical conclusion is therefore operational: adaptation makes the tested interaction contract reliable in this domain, while the musical-feature and LCS axes answer separate questions about the resulting admitted population.

PROTOTYPE INTEGRATION WITH NONOTO

To make the intended use of ABC-LLM concrete, we developed an experimental integration with an extended version of NONOTO, the model-agnostic web interface introduced by Bazin and Hadjeres for interactive composition by inpainting. NONOTO already provides a score-oriented interaction environment with audio playback and real-time MIDI output; our extension adds the natural-language/ABC path needed for the operation-aware workflow. A user can inspect or edit musical material, request a compositional operation in natural language, receive revised ABC, visualize the resulting notation, and audition the result through the interface’s existing rendering/output facilities.

Scope of the claim

The central contribution is not the observation that task-specific fine-tuning improves a model. LoRA is the enabling mechanism, and the base/adapted comparison is a feasibility test of a more specific hypothesis: whether a general-purpose instruction LLM can learn to sustain an operation-aware interaction contract over one evolving musical artifact. The strongest conclusion supported by the experiments is therefore narrower than “fine-tuning improves music generation.” The unadapted instruction model shows conditional competence on some admitted operations—transposition is the clearest example—but is unreliable end-to-end because many responses fail extraction, parsing, or checker admission. After adaptation, almost every response reaches an operation checker and admitted responses satisfy the requested contract at a high rate.

This result complements rather than supersedes recent editing systems. BeatEdit builds explicit symbolic edit mechanisms, while MusiChat maintains persistent conversational refinement through a hybrid LLM/symbolic architecture. Our experiment supports a different design point: operation semantics, persistence, and preservation behavior can be learned directly by a general-purpose instruction model under the tested supervision and domain. It does not establish that this architecture is preferable to dedicated editors, hybrid systems, deterministic algorithms, or constraint solvers.

This interpretation also clarifies what supervision teaches. Editing examples expose before/after relations: some parts of the artifact are authorized to change and others are invariants. The gains in chord insertion, preservation outside inpainting targets, target modification, and transposition provide evidence of operation-aware behavior under these scenarios; they are not evidence of abstract musical understanding.

The memorization analysis is similarly bounded. Tonic-relative, chord-aware LCS provides a reproducible sequence-overlap measure and a held-out baseline. The results do not reveal a systematic excess of thresholded overlap, but neither low overlap nor a non-significant test establishes absence of memorization, plagiarism, authorship, or intent.

FUTURE WORK

A first extension is to decouple the requested operation from its transformation scope. The current prototype uses a whole-artifact scope for Add chords and Transpose, and selected bars for Inpainting. A more general composer’s assistant should support combinations such as “transpose bars 5–8”, “harmonize the chorus”, or “reharmonize measures 9–12”, with preservation requirements derived from both the operation and the selected region.

A second extension concerns musical domains. Ongoing work is evaluating the approach beyond Irish traditional music, with jazz and bossa nova as initial targets, including work within an ongoing undergraduate final project. LoRA suggests a practical architecture for specialization: the base weights can remain fixed while small domain adapters are learned offline and selected at runtime. This resembles, at the interaction level, selecting a corpus-specific context in systems such as FlowComposer while using a different learning mechanism.

Musician-centered evaluation is the next validation layer rather than evidence claimed by the present paper. The NONOTO integration provides a basis for studies of usefulness of successive edits, preservation of musical intent, perceived control, workflow compatibility, and authorship/ownership perceptions. Where task definitions and outputs are comparable, future experiments can also apply common operation-level measures to systems such as BeatEdit and MusiChat rather than relying only on within-model base/adapted comparison.

A deeper research direction is to combine LLM generation with explicit Constraint Programming (CP). GenCP formulates constrained generation as a Constraint Satisfaction Problem and combines language-model predictions with constraint propagation; a recent survey reviews this broader CP/generative-model lineage. For ABC, such a hybrid may depend strongly on tokenization. MidiTok demonstrates the value of musically designed tokenization for MIDI; an analogous ABC-oriented tokenizer could align variables with note events, durations, chord symbols, and barlines. The LLM could then interpret intent and propose musically plausible material while a solver guarantees selected hard properties.

CONCLUSION

This paper reframed conversational symbolic music generation as a problem of incremental composition over a persistent artifact. The question is not simply whether an LLM can generate music, but whether a general-purpose instruction model can reliably interpret successive compositional requests, change the material authorized by each operation, preserve the required invariants, and carry the resulting score into the next turn.

Under 1,750 attempted output states per model, LoRA adaptation of Llama 3.1 8B Instruct raises checker admission from 29.37% to 99.37% and conditional operation compliance from 0.7205 to 0.9798. It also raises strict musical-feature eligibility from 14 to 1,548 outputs before equalization. Within the tested IrishMan domain, the adapted model therefore becomes a reliable participant in the specified interaction contract. The result is a feasibility finding about model-side interaction reliability, not a claim that fine-tuning itself is novel or that the resulting music is aesthetically superior.

The complementary analyses deliberately support weaker claims. Distributional metrics describe selected musical properties relative to IrishMan rather than absolute musical quality, and tonic-relative LCS characterizes corpus overlap rather than proving or disproving plagiarism. The NONOTO integration illustrates how the learned behavior can be embedded in an edit–render–listen–revise workflow. Future work will generalize operation scope, test domain-specific adapters and musician-centered interaction, and investigate structured ABC tokenization with explicit constraint solving.

Generative AI Use Disclosure

The research problem and approach, system design and implementations, experimental protocol and execution, scientific analysis, and an initial complete presentation of the work were developed by the authors without generative-AI assistance. ChatGPT (OpenAI) was subsequently used for English-language editing and to help refine the organization, exposition, and rhetorical clarity of the Introduction, Related Work, Results, Discussion, Future Work, and Conclusion. The authors reviewed and edited all AI-assisted text, verified the cited sources and scientific claims, and take full responsibility for the final content.