Multiple layouts
In this image, you see three different representations of the same underlying SATB music — one with four separate staves, one with two staves (using multiple voices) and one with two staves (using notes combined into chords).
This can be encoded entirely within a single MNX document. The underlying music (the notes, barlines, etc.) is encoded only once, within the <global> and <part> elements. But there are three separate <score> elements — one for each visual representation of the music.
A <score> references a particular <layout>. The <layout> element is where the style information is contained: which parts, in which order.
{
"mnx": {
"version": 1
},
"global": {
"measures": [
{
"time": {
"count": 4,
"unit": 4
}
},
{}
]
},
"layouts": [
{
"id": "Choral4Staff",
"content": [
{
"type": "group",
"content": [
{
"type": "staff",
"labelref": "name",
"sources": [
{
"part": "soprano"
}
]
},
{
"type": "staff",
"labelref": "name",
"sources": [
{
"part": "alto"
}
]
},
{
"type": "staff",
"labelref": "name",
"sources": [
{
"part": "tenor"
}
]
},
{
"type": "staff",
"labelref": "name",
"sources": [
{
"part": "bass"
}
]
}
],
"symbol": "bracket"
}
]
},
{
"id": "Choral2StaffStemSplit",
"content": [
{
"type": "group",
"content": [
{
"type": "staff",
"label": "SA",
"sources": [
{
"part": "soprano",
"stem": "up"
},
{
"part": "alto",
"stem": "down"
}
]
},
{
"type": "staff",
"label": "TB",
"sources": [
{
"part": "tenor",
"stem": "up"
},
{
"part": "bass",
"stem": "down"
}
]
}
],
"symbol": "bracket"
}
]
},
{
"id": "Choral2StaffChorded",
"content": [
{
"type": "group",
"content": [
{
"type": "staff",
"label": "SA",
"sources": [
{
"part": "soprano"
},
{
"part": "alto"
}
]
},
{
"type": "staff",
"label": "TB",
"sources": [
{
"part": "tenor"
},
{
"part": "bass"
}
]
}
],
"symbol": "bracket"
}
]
},
{
"id": "Choral2StaffMenSplit",
"content": [
{
"type": "group",
"content": [
{
"type": "staff",
"label": "SA",
"sources": [
{
"part": "soprano"
},
{
"part": "alto"
}
]
},
{
"type": "staff",
"label": "TB",
"sources": [
{
"part": "tenor",
"stem": "up"
},
{
"part": "bass",
"stem": "down"
}
]
}
],
"symbol": "bracket"
}
]
}
],
"parts": [
{
"id": "soprano",
"measures": [
{
"clefs": [
{
"clef": {
"sign": "G",
"staffPosition": -2
}
}
],
"sequences": [
{
"content": [
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 5,
"step": "C"
}
}
]
},
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 5,
"step": "C"
}
}
]
},
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 5,
"step": "G"
}
}
]
},
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 5,
"step": "G"
}
}
]
}
]
}
]
},
{
"sequences": [
{
"content": [
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 5,
"step": "A"
}
}
]
},
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 5,
"step": "A"
}
}
]
},
{
"type": "event",
"duration": {
"base": "half"
},
"notes": [
{
"pitch": {
"octave": 5,
"step": "G"
}
}
]
}
]
}
]
}
],
"name": "Soprano",
"short-name": "S"
},
{
"id": "alto",
"measures": [
{
"clefs": [
{
"clef": {
"sign": "G",
"staffPosition": -2
}
}
],
"sequences": [
{
"content": [
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 4,
"step": "G"
}
}
]
},
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 4,
"step": "G"
}
}
]
},
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 4,
"step": "E"
}
}
]
},
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 4,
"step": "E"
}
}
]
}
]
}
]
},
{
"sequences": [
{
"content": [
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 4,
"step": "C"
}
}
]
},
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 4,
"step": "C"
}
}
]
},
{
"type": "event",
"duration": {
"base": "half"
},
"notes": [
{
"pitch": {
"octave": 4,
"step": "D"
}
}
]
}
]
}
]
}
],
"name": "Alto",
"short-name": "A"
},
{
"id": "tenor",
"measures": [
{
"clefs": [
{
"clef": {
"sign": "G",
"staffPosition": -2
}
}
],
"sequences": [
{
"content": [
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 4,
"step": "E"
}
}
]
},
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 4,
"step": "E"
}
}
]
},
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 4,
"step": "C"
}
}
]
},
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 3,
"step": "B"
}
}
]
}
]
}
]
},
{
"sequences": [
{
"content": [
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 3,
"step": "A"
}
}
]
},
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 3,
"step": "A"
}
}
]
},
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 4,
"step": "C"
}
}
]
},
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 3,
"step": "B"
}
}
]
}
]
}
]
}
],
"name": "Tenor",
"short-name": "T"
},
{
"id": "bass",
"measures": [
{
"clefs": [
{
"clef": {
"sign": "F",
"staffPosition": 2
}
}
],
"sequences": [
{
"content": [
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 4,
"step": "C"
}
}
]
},
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 3,
"step": "B"
}
}
]
},
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 3,
"step": "A"
}
}
]
},
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 3,
"step": "G"
}
}
]
}
]
}
]
},
{
"sequences": [
{
"content": [
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 3,
"step": "F"
}
}
]
},
{
"type": "event",
"duration": {
"base": "quarter"
},
"notes": [
{
"pitch": {
"octave": 3,
"step": "E"
}
}
]
},
{
"type": "event",
"duration": {
"base": "half"
},
"notes": [
{
"pitch": {
"octave": 4,
"step": "G"
}
}
]
}
]
}
]
}
],
"name": "Bass",
"short-name": "B"
}
],
"scores": [
{
"name": "FourStaff",
"pages": [
{
"systems": [
{
"layout": "Choral4Staff",
"measure": 1
}
]
}
]
},
{
"name": "TwoStaffSplit",
"pages": [
{
"systems": [
{
"layout": "Choral2StaffStemSplit",
"measure": 1
}
]
}
]
},
{
"name": "TwoStaffChord",
"pages": [
{
"systems": [
{
"layout": "Choral2StaffChorded",
"layout-changes": [
{
"layout": "Choral2StaffMenSplit",
"location": "2"
}
],
"measure": 1
}
]
}
]
}
]
}