/MRS-Specification-RFC#11-data-model
Core Type Hierarchy
Player-Instrument-Staff Model
MRS uses a three-level model for professional orchestration semantics.Player
Instrument
Instrument Families
Measure
Measure Identity
:id— Stable UUIDv7, survives structural changes:number— Display only, can change on insert/delete:beat-start— Orchestrator-computed, absolute position
Attribute Inheritance
| Attribute | Inherits? |
|---|---|
:time | Yes, until changed |
:key, :mode | Yes, until changed |
:tempo, :tempo-text | Yes, until changed |
:rehearsal | No (single-measure) |
:barline-* | No (per-measure) |
Event
Event Position
Events have structural position (beat within measure). The orchestrator computes absolute position::at is optional (can be computed). In MRS-Ops, agents provide :beat; orchestrator computes :at.
Pitch Expression
| Type | Example | Description |
|---|---|---|
| Single note | C4.q | C4 quarter note |
| Chord | [C4 E4 G4].q | C major triad, quarter |
| Rest | r.q | Quarter rest |
Span
Span Types
| Type | Endpoint Style | Description |
|---|---|---|
slur | from/to | Phrasing slur |
tie | from/to | Tie between same pitches |
hairpin | from/to | Crescendo/diminuendo |
beam | events list | Beam grouping |
ottava | from/to | Octave transposition |
pedal | from/to | Piano pedal |
Span Immutability
Once created, span endpoints (:from, :to, :events) are immutable. To change endpoints, delete the span and create a new one.
Identifier Rules
| Type | Format | Example |
|---|---|---|
| UUID | UUIDv7 | #uuid "018c3f40-0001-..." |
| Instrument ID | [a-z][a-z0-9-]* | clarinet-bb, flute-1 |
| Player ID | [a-z][a-z0-9-]* | woodwind-2 |
| Voice ID | v1-v4 or :rh/:lh | v1, :rh |
| Tmp-ID | String starting with letter | "e1", "span-a" |
Rational Numbers
All temporal positions use exact rationals:Voices and Layers
Voices
Independent melodic/rhythmic streams within an instrument:v1throughv4for single-staff instruments:rh/:lhfor keyboard instruments (thenv1,v2within each)
Layers
Same-rhythm sub-structure within a voice:HarmonyPlan Layer
The HarmonyPlan is an embedded optional layer for chord symbols and harmonic structure:- Composing harmony before notes
- Validating notes against harmony
- Extracting harmonic context for agents