Inhaltsverzeichnis

Corpora Work Progression

This page tracks the current state of corpus work, known issues, recurring MEI encoding patterns, and links to general documentation.

General documentation

Git and GitHub

MEI and XML

Current corpus status

https://github.com/egorpol/DdT_1_vol_11#current-progress

Current corpus assignments

https://nextcloud.uni-weimar.de/f/42181526

Open bugs

Requested features / improvements

tba

Quick reference: recurring MEI topics

Rests

In MEI, ordinary rests and full-bar rests are not the same thing.

When do we use ''<rest>''?

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>

When do we use ''<mRest>''?

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>

Local recommendation

For our corpus work:

Important restriction

A layer containing <mRest/> should not also contain notes or ordinary rests. Control events such as fermatas may still occur alongside it.

Full-bar silence in different meters

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.

What about multi-measure rests?

Use <multiRest> when the source compresses several complete silent measures into a single multiple-rest symbol.

Example:

<layer n="1">
  <multiRest num="9"/>
</layer>

Local recommendation for multi-measure rests

For our project:

Empty measure vs. rest

Do not confuse:

Use <mSpace> only when the layer is intentionally empty and this emptiness is itself what needs to be represented.

Practical examples

Example 1: ordinary rest

<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>

Example 2: full-bar rest

<measure n="6">
  <staff n="1">
    <layer n="1">
      <mRest/>
    </layer>
  </staff>
</measure>

Example 3: multiple-rest in a part

<measure n="20">
  <staff n="1">
    <layer n="1">
      <multiRest num="8"/>
    </layer>
  </staff>
</measure>

Project rule of thumb

Ask:

Voice handling

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.

What is a layer?

A layer is best understood as a single rhythmic and event stream within one staff.

For beginners:

When does one staff need more than one ''<layer>''?

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.

How do we distinguish voices clearly?

At minimum:

Example:

<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>

Local project policy for layer numbering

Recommended local convention:

Shared stems and polyphonic overlap

Shared stems and polyphonic overlap are often visually complex, but the encoding priority should be:

A useful practical rule is:

Why this matters for ties and other relations

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:

  1. are there two independent rhythmic streams?
  2. are there overlapping note values that imply separate voices?
  3. are rests voice-specific?
  4. do ties or slurs belong to separate voices?
  5. would one-layer encoding become confusing?

If yes to several of these, use multiple layers.

Generalbass

MEI supports figured bass through harmonic indication markup.

The key elements are:

Which elements do we use?

For our corpus, the default pattern should be:

<harm tstamp="1">
  <fb>
    <f>6</f>
  </fb>
</harm>

This means:

How do we align figured bass with notes or harmonic events?

harm must define a point of attachment using one of these attributes:

The most common attachment methods are startid and tstamp.

For practical work, I recommend:

Example with ''tstamp''

<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>

Example with ''startid''

<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>

Ordering of figures

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 in figured bass

Accidentals can be encoded directly in the figure content.

Example:

<harm tstamp="1">
  <fb>
    <f>7♭</f>
  </fb>
</harm>

Ties

A tie connects two notes of the same pitch so that the first note sounds for the combined duration of both notes.

Basic principle

Use ties only when:

How are ties encoded?

The simplest MEI method uses the tie attribute.

Allowed values:

Example:

<layer n="1">
  <note pname="f" oct="4" dur="2" tie="i"/>
  <note pname="f" oct="4" dur="4" dots="1" tie="t"/>
</layer>

Ties across barlines

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>

Ties and layers

This point is crucial for corpus consistency:

So for local practice:

Ties on chords

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>

Local recommendation

For our project:

Tie vs slur

Do not confuse:

This distinction matters both musically and computationally.

Minimal checklist

Before encoding a tie, ask:

Barline

When barlines should run through some staves, then break, and then continue through a lower group, encode this with nested staffGrp elements.

Local recommendation:

Example: barline through staves 1-3, break, then through staves 4-5:

<staffGrp>
  <staffGrp bar.thru="true">
    <staffDef n="1"/>
    <staffDef n="2"/>
    <staffDef n="3"/>
  </staffGrp>
  <staffGrp bar.thru="true">
    <grpSym symbol="brace"/>
    <staffDef n="4"/>
    <staffDef n="5"/>
  </staffGrp>
</staffGrp>

Minimal checklist:

Staff and page breaks

For the current editorial task, also check the position of <sb> and <pb> carefully.

This is important because misplaced system or page breaks can change the number of bars per system or page and create mismatches with the facsimile layout.

Local recommendation:

Minimal checklist:

Facsimile zones

When a measure still has no facsimile mapping, add a new <zone> in the relevant <surface> and then link that zone to the measure with the facs attribute.

Local recommendation:

Example:

<surface>
  <zone xml:id="zone_new123" ulx="100" uly="200" lrx="500" lry="800" type="measure"/>
</surface>
 
<measure n="12" facs="#zone_new123">
  ...
</measure>

Minimal checklist:

Duration encoding: dur vs. dur.ppq

Please encode written musical duration with dur and, where needed, dots.

dur records the notated value, for example dur=„4“ for a quarter note or dur=„8“ for an eighth note. dur.ppq records a calculated playback/timing value in pulses per quarter note. It is not the editorial duration and does not represent the visual notation directly.

Local directive:

Reason:

Minimal checklist:

Cross-staff notation

For cross-staff chords encode it as one logical <chord> in a single <layer>, and place the low (or high) note on the other staff with staff=„5“ (use the number of corresponding staff). The lower (or higher) staff's time is then filled with <space/> so that the rhythmic alignment remains complete.

The MEI guidelines explicitly give this as an alternative for cross-staff chords. Some software handles this method better than separate cross-staff notes connected only by stem.with.

Example:

<staff xml:id="j138ax0t" n="4">
  <layer xml:id="lie03m1" n="1">
    <chord xml:id="n1v09lce" dur="8" stem.dir="up">
      <note xml:id="m11lbwz8" oct="4" pname="f"/>
      <note xml:id="ooukl9j" oct="4" pname="d"/>
      <note xml:id="dgfh734" oct="3" pname="b" staff="5"/>
    </chord>
    ...
  </layer>
</staff>
 
<staff xml:id="k10lc1io" n="5">
  <layer n="2">
    <space dur="8"/>
    <note xml:id="dfj82467" dur="4" oct="3" pname="g" stem.dir="up"/>
    <note xml:id="dfj82d467" dur="4" oct="3" pname="a" stem.dir="up"/>
  </layer>
</staff>

For mei-friend / Verovio-style workflows, this second version is often the more robust semantic encoding because it represents one chord rather than two separate events that merely share a stem.

Local recommendation: