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> <global> <measure-global> <directions-global> <time signature="4/4"/> </directions-global> </measure-global> <measure-global/> </global> <part id="soprano" name="Soprano" short-name="S"> <measure> <directions-part> <clef line="2" sign="G"/> </directions-part> <sequence> <event value="/4"> <note pitch="C5"/> </event> <event value="/4"> <note pitch="C5"/> </event> <event value="/4"> <note pitch="G5"/> </event> <event value="/4"> <note pitch="G5"/> </event> </sequence> </measure> <measure> <sequence> <event value="/4"> <note pitch="A5"/> </event> <event value="/4"> <note pitch="A5"/> </event> <event value="/2"> <note pitch="G5"/> </event> </sequence> </measure> </part> <part id="alto" name="Alto" short-name="A"> <measure> <directions-part> <clef line="2" sign="G"/> </directions-part> <sequence> <event value="/4"> <note pitch="G4"/> </event> <event value="/4"> <note pitch="G4"/> </event> <event value="/4"> <note pitch="E4"/> </event> <event value="/4"> <note pitch="E4"/> </event> </sequence> </measure> <measure> <sequence> <event value="/4"> <note pitch="C4"/> </event> <event value="/4"> <note pitch="C4"/> </event> <event value="/2"> <note pitch="D4"/> </event> </sequence> </measure> </part> <part id="tenor" name="Tenor" short-name="T"> <measure> <directions-part> <clef line="2" octave="-1" sign="G"/> </directions-part> <sequence> <event value="/4"> <note pitch="E4"/> </event> <event value="/4"> <note pitch="E4"/> </event> <event value="/4"> <note pitch="C4"/> </event> <event value="/4"> <note pitch="B3"/> </event> </sequence> </measure> <measure> <sequence> <event value="/4"> <note pitch="A3"/> </event> <event value="/4"> <note pitch="A3"/> </event> <event value="/4"> <note pitch="C4"/> </event> <event value="/4"> <note pitch="B3"/> </event> </sequence> </measure> </part> <part id="bass" name="Bass" short-name="B"> <measure> <directions-part> <clef line="4" sign="F"/> </directions-part> <sequence> <event value="/4"> <note pitch="C4"/> </event> <event value="/4"> <note pitch="B3"/> </event> <event value="/4"> <note pitch="A3"/> </event> <event value="/4"> <note pitch="G3"/> </event> </sequence> </measure> <measure> <sequence> <event value="/4"> <note pitch="F3"/> </event> <event value="/4"> <note pitch="E3"/> </event> <event value="/2"> <note pitch="G3"/> </event> </sequence> </measure> </part> <layouts> <system-layout id="Choral4Staff"> <group-layout symbol="bracket"> <staff-layout labelref="name"> <part-layout part="soprano"/> </staff-layout> <staff-layout labelref="name"> <part-layout part="alto"/> </staff-layout> <staff-layout labelref="name"> <part-layout part="tenor"/> </staff-layout> <staff-layout labelref="name"> <part-layout part="bass"/> </staff-layout> </group-layout> </system-layout> <system-layout id="Choral2StaffStemSplit"> <group-layout symbol="bracket"> <staff-layout label="SA"> <part-layout part="soprano" stem="up"/> <part-layout part="alto" stem="down"/> </staff-layout> <staff-layout label="TB"> <part-layout part="tenor" stem="up"/> <part-layout part="bass" stem="down"/> </staff-layout> </group-layout> </system-layout> <system-layout id="Choral2StaffChorded"> <group-layout symbol="bracket"> <staff-layout label="SA"> <part-layout part="soprano"/> <part-layout part="alto"/> </staff-layout> <staff-layout label="TB"> <part-layout part="tenor"/> <part-layout part="bass"/> </staff-layout> </group-layout> </system-layout> <system-layout id="Choral2StaffMenSplit"> <group-layout symbol="bracket"> <staff-layout label="SA"> <part-layout part="soprano"/> <part-layout part="alto"/> </staff-layout> <staff-layout label="TB"> <part-layout part="tenor" stem="up"/> <part-layout part="bass" stem="down"/> </staff-layout> </group-layout> </system-layout> </layouts> <score name="FourStaff"> <page> <system layout="Choral4Staff" measure="1"/> </page> </score> <score name="TwoStaffSplit"> <page> <system layout="Choral2StaffStemSplit" measure="1"/> </page> </score> <score name="TwoStaffChord"> <page> <system layout="Choral2StaffChorded" measure="1"> <system-layout-change layout="Choral2StaffMenSplit" location="2"/> </system> </page> </score> </mnx>