Skip to content

Staff and System Begin Formats

Juliette Regimbal edited this page Jul 10, 2019 · 1 revision

Staff- and System Begin-based MEI Files

Staff-based MEIs encode every staff in its own <staff> tag. This is actually incorrect as in MEI this tag is used to represent unrelated parts of music, so using them to represent separate staves on a page is incorrect. Instead the system begin tag (<sb>) needs to be used to mark where in only one staff element a new staff would begin.

Comparison of Structures

Here is a representation of the same snippet of a syllable split across two staves in both encoding formats. Using <staff> tags:

<section>
    <staff xml:id="group1" facs="zone1" n="1">
        <layer n="1">
            <clef shape="C" line="3" />
            <syllable xml:id="first-syllable" precedes="second-syllable">
                <neume>
                    <nc oct="2" pname="a" />
                </neume>
            </syllable>
            <custos oct="2" pname="b" />
        </layer>
    </staff>
    <staff xml:id="group2" facs="zone2" n="2">
        <layer n="1">
            <syllable xml:id="second-syllable" follows="first-syllable">
                <neume>
                    <nc oct="2" pname="b" />
                </neume>
            </syllable>
        </layer>
    </staff>
</section>        

And using <sb> tags:

<section>
    <staff n="1">
        <layer n="1">
            <sb xml:id="group1" facs="zone1" />
            <clef shape="C" line="3" />
            <syllable>
                <neume>
                    <nc oct="2" pname="a" />
                </neume>
                <sb xml:id="group2" facs="zone2">
                    <custos oct="2" pname="b" />
                </sb>
                <neume>
                    <nc oct="2" pname="b" />
                </neume>
            </syllable>
        </layer>
    </staff>
</section>

Explanation

When using the <sb> tags, the staff always starts with a <sb> tag with the @facs attribute. This maps to a zone for the first staff in the facsimile. Each following <sb> tag corresponds to each following staff, with each having a @facs attribute pointing to the zone for that staff.

The system begin tag can appear either as a milestone element or contain a custos. The system begin tag can appear at the layer level or within a <syllable> element. Putting a custos inside the <sb> tag allows for a custos to exist even when the syllable continues onto the next staff.

In the <staff>-based format, the @precedes and @follows attributes on the <syllable> tags are used to represent that logically this is a single syllable but are represented as separate elements. Technically only @follows is necessary for Neon to convert it to <sb>-based, but Neon needs both attributes to properly recognize split syllables.