This page tracks the current state of corpus work, known issues, recurring MEI encoding patterns, and links to general documentation.
tba
tba
tba
In MEI, ordinary rests and full-bar rests are not the same thing.
<rest> = a non-sounding event with a specific written duration<mRest> = a complete measure rest, independent of meter<multiRest> = multiple consecutive complete-measure rests compressed into one symbol, typically in parts<mSpace> = an explicitly empty measure, where no musical content is encoded but nothing is considered missing
Use <rest> when the source shows a rest with a specific notated duration inside the rhythmic flow of the layer.
Typical cases:
Example:
<layer n="1"> <note pname="c" oct="4" dur="4"/> <rest dur="4"/> <note pname="d" oct="4" dur="2"/> </layer>
Use <mRest/> when the layer is silent for the entire measure and the source expresses that as a full-bar rest.
This is the preferred encoding for a complete measure rest because it does not depend on the current meter.
Example:
<measure n="12"> <staff n="1"> <layer n="1"> <mRest/> </layer> </staff> </measure>
For our corpus work:
<rest> for ordinary rests with explicit duration inside a measure<mRest/> when a whole measure is silent in that layer<rest> just because the meter happens to allow it<mRest/> when the notation is semantically a “whole measure rest”
A layer containing <mRest/> should not also contain notes or ordinary rests.
Control events such as fermatas may still occur alongside it.
A full-bar rest should usually still be encoded as:
<mRest/>
This remains true in different meters:
The point of <mRest> is that it means “this whole measure is silent”, regardless of how many beats the measure contains.
Use <multiRest> when the source compresses several complete silent measures into a single multiple-rest symbol.
Example:
<layer n="1"> <multiRest num="9"/> </layer>
For our project:
<multiRest> only when the source actually presents a compressed multi-measure rest<multiRest> in score-like encodings<mRest/> elementsDo not confuse:
<rest> = actual notated rest event<mRest> = actual complete-measure rest<mSpace> = explicitly empty measure with no encoded content
Use <mSpace> only when the layer is intentionally empty and this emptiness is itself what needs to be represented.
<measure n="5"> <staff n="1"> <layer n="1"> <rest dur="4"/> <note pname="e" oct="4" dur="4"/> <note pname="f" oct="4" dur="2"/> </layer> </staff> </measure>
<measure n="6"> <staff n="1"> <layer n="1"> <mRest/> </layer> </staff> </measure>
<measure n="20"> <staff n="1"> <layer n="1"> <multiRest num="8"/> </layer> </staff> </measure>
Ask:
<rest><mRest><multiRest>
In MEI, a <layer> is an independent stream of events on a staff. A staff may contain more than one layer in order to represent multiple voices.
A layer is best understood as a single rhythmic and event stream within one staff.
For beginners:
Use more than one layer when the notation clearly contains multiple independent voices on the same staff.
Typical cases:
Do not create extra layers just because stems point in different directions once or twice if the passage is still best understood as one continuous voice.
At minimum:
n valueExample:
<staff n="1"> <layer n="1"> <note pname="g" oct="4" dur="2"/> <note pname="a" oct="4" dur="2"/> </layer> <layer n="2"> <rest dur="2"/> <note pname="e" oct="4" dur="2"/> </layer> </staff>
Recommended local convention:
layer n=„1“ = upper voice or primary voicelayer n=„2“ = lower voice or secondary voicen=„3“, n=„4“, etc. when genuinely requiredShared stems and polyphonic overlap are often visually complex, but the encoding priority should be:
A useful practical rule is:
This matters because some relations are layer-sensitive.
For example:
So unstable or inconsistent layer assignment can create problems later.
When deciding whether to split into layers, ask:
If yes to several of these, use multiple layers.
MEI supports figured bass through harmonic indication markup.
The key elements are:
<harm> = the harmonic indication as the attached object<fb> = the figured-bass container<f> = one individual figure or component inside the figured bass signFor our corpus, the default pattern should be:
<harm tstamp="1"> <fb> <f>6</f> </fb> </harm>
This means:
harm provides the attachment pointfb says this is figured bass / Generalbassf holds the visible figure component
harm must define a point of attachment using one of these attributes:
startidtstamptstamp.geststamp.real
The most common attachment methods are startid and tstamp.
For practical work, I recommend:
startid when the figure clearly belongs to a specific encoded note or eventtstamp when the figure is best attached to a beat position in the measurestartid when stable note-level linking matters for editorial or computational reuse<measure n="1"> <staff n="1"> <layer n="1"> <note pname="c" oct="3" dur="1"/> </layer> </staff> <harm tstamp="1"> <fb> <f>6</f> </fb> </harm> </measure>
<measure n="1"> <staff n="1"> <layer n="1"> <note pname="c" oct="3" dur="1" xml:id="b1"/> </layer> </staff> <harm startid="#b1"> <fb> <f>6</f> <f>4</f> </fb> </harm> </measure>
The order of f elements is significant. Figures should be encoded in the order they appear, usually top to bottom on the page.
So this:
<fb> <f>6</f> <f>4</f> </fb>
is not just an arbitrary list; the order carries meaning.
Accidentals can be encoded directly in the figure content.
Example:
<harm tstamp="1"> <fb> <f>7♭</f> </fb> </harm>
harm + fb + f as the default structurestartid for note-bound corpus work when possibletstamp when note-level linking is not practicalA tie connects two notes of the same pitch so that the first note sounds for the combined duration of both notes.
Use ties only when:
The simplest MEI method uses the tie attribute.
Allowed values:
i = initialm = medialt = terminalExample:
<layer n="1"> <note pname="f" oct="4" dur="2" tie="i"/> <note pname="f" oct="4" dur="4" dots="1" tie="t"/> </layer>
A tie may continue into the following measure.
Example:
<measure n="1"> <staff n="1"> <layer n="1"> <note pname="g" oct="4" dur="2" tie="i"/> </layer> </staff> </measure> <measure n="2"> <staff n="1"> <layer n="1"> <note pname="g" oct="4" dur="2" tie="t"/> </layer> </staff> </measure>
This point is crucial for corpus consistency:
So for local practice:
The tie attribute can also be used on chord.
When used on a chord, it acts as shorthand for multiple ties on all unchanged pitches in the chord.
Example:
<chord dur="4" tie="i"> <note pname="f" oct="4"/> <note pname="a" oct="4"/> <note pname="c" oct="5"/> </chord> <chord dur="4" tie="t"> <note pname="f" oct="4"/> <note pname="a" oct="4"/> <note pname="c" oct="5"/> </chord>
For our project:
tie on note for simple casestie on chord only when the shorthand is genuinely clearnote elements insteadDo not confuse:
This distinction matters both musically and computationally.
Before encoding a tie, ask: