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
/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
/MRS-Specification-RFC#1-introduction
Goals
- Semantic completeness: Encode everything a professional engraver needs
- Deterministic parsing: One input → one parse tree, always
- Structural stability: UUID identifiers survive insertions and deletions
- Context-aware operations: Agents work with appropriate surrounding context
- Machine-friendly generation: Predictable patterns for reliable LLM output
- Human auditability: People can review and debug outputs
- Diff-friendly structure: Line-based changes produce meaningful diffs
- Renderer-agnostic semantics: Describe what, not how to draw
/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)
/MRS-Specification-RFC#1-3-non-goals
Terminology
Key terms used throughout the spec:| Term | Definition |
|---|---|
| Score | A complete musical work in MRS format |
| Part | A single instrument or voice throughout a score |
| Staff | A visual grouping of five lines; parts may have multiple staves |
| Voice | An independent melodic/rhythmic stream within a staff |
| Measure | A metrical unit bounded by barlines, identified by UUID |
| Event | An atomic musical occurrence (note, rest, chord), identified by UUID |
| Span | A relation connecting multiple events (slur, beam, hairpin) |
| Synopsis | A compressed structural view of the full score |
| Working Set Envelope | A scoped MRS-S fragment with context for agent tasks |
| Context Ring | Surrounding material at reduced detail level |
| Overlay | Analytical metadata attached to score regions |
| Orchestrator | System that coordinates agent tasks and manages the full score |
/MRS-Specification-RFC#1-4-terminology