Skip to content
Laurent Pugin edited this page Jun 8, 2023 · 60 revisions

Implementation status for MEI support

Input / output

File opening

Status ✅

MEI files can be imported from the Open... menu with a selection of *.mei files:

image

Previously opened MEI files appear in the file list with a dedicated <xml> 🎵 MEI file icon:

image

The Preferences dialog includes a MEI checkbox option Import MEI layout in the Import section:

image

File saving

Status ✅

MEI files can be saved through the Export... menu that includes an MEI section. The MEI section includes an option Include page and system breaks as well as the standard part extraction option:

image

User feedback

Status ✅

When possible, some feedback is provided when features cannot be imported. The feedback is shown in dialog that allows for the process to be continued if desirable:

image

Additional lower-level feedback might be provided in the logs

Metadata

Status ⚠️

The following metadata tags from the score properties are exported to the MEI header:

  • Work title
  • Arranger
  • Composer
  • Copyright
  • Lyricist
  • Translator
<meiHead>
    <fileDesc>
        <titleStmt>
            <title>Work title</title>
            <respStmt>
                <persName role="arranger">Arranger is me</persName>
                <persName role="composer">Composer is me</persName>
                <persName role="lyricist">Another lyricist</persName>
                <persName role="translator">Deepl</persName>
            </respStmt>
        </titleStmt>
        <pubStmt>
            <date isodate="2023-05-09-14:34:46" />
            <availability>
                <distributor>CC-By</distributor>
            </availability>
        </pubStmt>
    </fileDesc>
</meiHead>

⚠️ The following tags are currently not preserved since no obvious place in MEI-Basic has been found:

  • Creation date
  • Platform
  • Source

When importing and MEI file, the values in the MEI header (if found) as set back as score properties. The entire MEI header is also preserved. When exporting again to MEI, the original header is re-exported as such and the score properties are ignored. However, the original MEI header can be deleted from the score properties dialog.

Command-line

Status ✅

The conversion from and to MEI through the MuseScore is possible with standard MuseScore command-line options.

For example, converting a MuseScore file to MEI:

mscore file.mscz -o file.mei

Converting and MEI file to MuseScore:

mscore file.mei -o file.mscz

The option -f can also be added to by-pass score corruption warnings.

Core features

General score structure

Status ✅

The score structure is encoded in the top-level scoreDef that is the first child of score.

Since there is not direct mapping of part structure from MuseScore within the MEI scoreDef, the part structure is preserved through label and labelAbbr within staffGrp or staffDef elements.

Bracket supported are bracket, brace, bracketsq and line.

Relevant tests:

Known limitations:

  • Bar line spanning in MuseScore is defined on a staff level. In MEI, this is defined through [email protected]. The current implementation, the value for @bar.thru is determined by the spanning of the first staff, and only for the first level of nesting staffGrp.

Layout option

Status ✅

The layout option in the export dialog and the import preferences (see above) triggers writing and reading pb and sb elements.

When writing, all page and line (system) breaks are encoded into the MEI. The ones manually entered in MuseScore have a @label="manual".

When reading the MEI, only pb and sb with @label="manual are set as page and line breaks and all the others are ignored.

Relevant tests:

Title frame (page head)

Status ✅

The top (first) text frame in MuseScore is encoded as pgHead. Text elements are placed and size according to their type:

  • Title: top-center, size x-large
  • Subtitle: top-center, size large
  • Composer: bottom-right, size normal
  • Poet (lyricist): bottom-left, size normal
  • Instrument excerpt: top-left, size normal

The pgHead is organized in <rend> elements (up to 9) representing positions aligned with @halign and @valign. Each text element is encoded in its own <rend> with the desired @fontsize. The type of the text element is encoded in @label. For example:

<pgHead>
   <rend halign="center" valign="top">
      <rend label="title" fontsize="x-large">Ach Gott und Herr</rend>
   </rend>
</pgHead>

Text element on multiple lines is supported will be encoded as mixed content and lb.

Known limitations:

  • Text formatting (i.e., italic, bold, etc.) within a text element is currently not preserved.

Transposing information

Status ✅

Transposing information is encoded in [email protected] and [email protected]

Relevant tests:

Measure numbering

Status ✅

Measure number in MuseScore are integers automatically incremented. They are encoded in measure@n. When a measure is excluded from the measure count in MuseScore, no @n is provided.

Irregular (e.g., a pickup measure) will be have a measure@metcon="false".

MuseScore also has the option of adding a number to the measure count. The value is taken into account when writing and reading measure@n.

Relevant tests:

Known limitations:

  • The MuseScore barline type Reverse final does not exist in MEI, it is exported as double dbl barline.
  • Measure numbers with text (e.g., 3a) are represented by text elements in MuseScore and are currently not exported.

Time signatures

Status ✅

Time signature changes occurring at all staves are encoded in a scoreDef change. When the time signature change is not the same on all staves, or is occurring only on some staves, a scoreDef with appropriate staffDef descendants is generated.

Relevant tests:

Key signature

Status ✅

Key signature changes work as time signature. That is, there are encoded in a scoreDef when the same for all staves or in staffDef when not.

Relevant tests:

Clefs

Status ✅

Relevant tests:

Notes and rests

Status ✅

Supported chord, note and rest durations range from long to 512th. Chord with different note durations are not supported.

Stem direction are encoded in @stem.dir. When the stem direction is set for notes within a beam, then all notes have a @stem.dir. (This could eventually be changed to beam@place if it is added to MEI-Basic.)

Stemless notes are encoded with @stem.len="0". (This could eventually be changed to @stem.visible if it is added to MEI-Basic.)

Relevant tests:

Known limitations:

  • Enclosing accidentals are not supported (not available in MEI-Basic).
  • Triple flats / sharp are not preserved in the import.

Grace notes

Tuplets and beaming

Tuplets are encoding with tuplet elements with corresponding @num and @numbase. Bracket and number styles and tuplet placement are encoded in @num.place, @num.visible, @num.format, @bracket.place, @bracket.visible.

Beams automatically calculated in MuseScore are exported as beam elements. However, these are not reimported as such. During the import, beam are ignored and beaming is performed by the MuseScore beaming algorithm.

Beam modes in MuseScore (e.g., forcing the start of a new beam, or joining beams) are exported as @type attributes as follow:

  • Beam start as beam@type="mscore-begin"
  • Beam middle (joining of a beams) as note|rest|chord@type="mscore-beam-mid"
  • No beam as note|rest|chord@type="mscore-beam-none"
  • 16th sub beam as note|rest|chord@type="mscore-beam-begin16"
  • 32nd sub beam as note|rest|chord@type="mscore-beam-begin32"

Status ✅

Relevant tests:

Known limitations:

  • Nested tuplets (tuplet within tuplet) are not supported.
  • Since @breaksec is not available in MEI-Basic, these are represented with the @type attribute. This can be changed if eventually @breaksec is added to MEI-Basic
  • Feathered are not supported.

Ending and repeat signs (jumps such as D.S. or D.C.)

Tempo markings

Dynamics (ff, s.p, sfz etc.)

Fermata

Figure bass and chord labels

Additional text directives

Slurs and ties

Additional features

Note articulation (stacc.)

Ornaments such as mordents and turns

Ottava lines

Hairpins

Clone this wiki locally