The attributes block defines measure-scoped musical state. It is distinct from defaults (which are score-wide).
Attributes Block
measure 1 {
attributes {
divisions 4
key {
fifths 0
mode major
}
time {
beats 4
beat-type 4
}
staves 2
clef {
sign G
line 2
}
transpose {
diatonic 0
chromatic 0
octave-change 0
}
staff-details {
staff s1 { ... }
staff s2 { ... }
}
measure-style {
multiple-rest 0
measure-repeat 0
beat-repeat 0
slash false
}
}
}
Canonical Field Order
Within attributes, fields MUST appear in this order:
divisionskeytimestavescleftransposestaff-detailsmeasure-style
Compact Forms
For common cases, compact forms are available directly in measures:
measure 1 {
key c-major
time 4/4
clef treble
}
Key Signatures
# Compact form
key c-major
key g-major
key f-major
key d-minor
key a-minor
# Explicit form
key {
fifths 0
mode major
}
Common key modes: major, minor, dorian, phrygian, lydian, mixolydian, aeolian, ionian, locrian.
Time Signatures
# Compact form
time 4/4
time 3/4
time 6/8
time 2/2
# Explicit form
time {
beats 4
beat-type 4
}
Clefs
# Compact form
clef treble
clef bass
clef alto
clef tenor
# Explicit form
clef {
sign G
line 2
}
Common clef signs: G (treble), F (bass), C (alto/tenor), percussion, TAB, none.
Divisions
attributes {
divisions 4
}
divisions is a measure-scoped integer that defines the number of divisions per quarter note.
Staves
attributes {
staves 2
}
staves is an explicit measure-scoped count of active staves.
Transposition
transpose {
diatonic 0
chromatic 0
octave-change 0
}
| Field | Description |
|---|---|
diatonic |
Diatonic transposition |
chromatic |
Chromatic transposition in semitones |
octave-change |
Octave shift |
Staff Details
staff-details {
staff s1 {
lines 6
staff-tuning {
line 1
step e
octave 4
}
capo 3
}
}
Measure Style
measure-style {
multiple-rest 4
measure-repeat 2
beat-repeat 1
slash false
}
| Field | Description |
|---|---|
multiple-rest N |
Number of measures of multi-measure rest |
measure-repeat N |
Number of measures to repeat |
beat-repeat N |
Number of beats to repeat |
slash true/false |
Slash notation |
Rules
attributesis the canonical score-state block for measure-scoped musical stateattributesMUST remain distinct fromdefaultsdivisionsMUST appear before any other score-state field- Scalar shorthand MAY be used only where it preserves the same semantic content as the structured block form
attributesMUST emit fields in canonical order
Next Steps
- Config Block — defaults, appearance, print, import-detail, links, bookmarks
- Formatting — canonical formatting rules