Skip to main content

Abstract

MRS (Music Representation Syntax) is a format for encoding musical scores optimized for AI-assisted composition workflows:
  • MRS-S: A single canonical format (S-expression based) for complete, archival-quality scores with stable UUID identifiers
  • Working Set Envelopes: Scoped MRS-S fragments with context rings for bounded agent operations
  • Synopsis: Compressed structural views providing global awareness
  • Overlays: Analytical metadata attached to score regions
Agents receive valid MRS-S and return valid MRS-S—no second syntax, no format conversion, no parsing ambiguity. See: /MRS-Specification-RFC#abstract

Motivation

MRS addresses two fundamental challenges in working with musical scores: Scale: A full orchestral score is too large for any context window. Editing measure 847 should not require loading measures 1-846. Context: Musical decisions require understanding surrounding material. An agent writing a countermelody needs to know phrase boundaries, harmonic rhythm, and thematic relationships—not just the target measures in isolation. MRS solves this through:
  • Stable UUID identifiers for measures and events (not position-dependent references)
  • Context rings providing surrounding material at graduated detail levels
  • Synopsis offering compressed structural views for global awareness
  • A single canonical syntax for all operations
See: /MRS-Specification-RFC#1-introduction

Goals

  1. Semantic completeness: Encode everything a professional engraver needs
  2. Deterministic parsing: One input → one parse tree, always
  3. Structural stability: UUID identifiers survive insertions and deletions
  4. Context-aware operations: Agents work with appropriate surrounding context
  5. Machine-friendly generation: Predictable patterns for reliable LLM output
  6. Human auditability: People can review and debug outputs
  7. Diff-friendly structure: Line-based changes produce meaningful diffs
  8. Renderer-agnostic semantics: Describe what, not how to draw
See: /MRS-Specification-RFC#1-2-goals

Non-goals

MRS explicitly does not attempt to:
  • Encode detailed visual layout (beyond optional hints)
  • Provide a programming language (no loops/macros/conditionals)
  • Define synthesis/playback behavior
  • Replace domain-specific formats (e.g. audio, MIDI, engraving source)
See: /MRS-Specification-RFC#1-3-non-goals

Terminology

Key terms used throughout the spec:
TermDefinition
ScoreA complete musical work in MRS format
PartA single instrument or voice throughout a score
StaffA visual grouping of five lines; parts may have multiple staves
VoiceAn independent melodic/rhythmic stream within a staff
MeasureA metrical unit bounded by barlines, identified by UUID
EventAn atomic musical occurrence (note, rest, chord), identified by UUID
SpanA relation connecting multiple events (slur, beam, hairpin)
SynopsisA compressed structural view of the full score
Working Set EnvelopeA scoped MRS-S fragment with context for agent tasks
Context RingSurrounding material at reduced detail level
OverlayAnalytical metadata attached to score regions
OrchestratorSystem that coordinates agent tasks and manages the full score
See: /MRS-Specification-RFC#1-4-terminology