owned this note
owned this note
Published
Linked with GitHub
# MuseScore MEI
Goal: Enable MuseScore 4 to import and export MEI files
## Goals
* `File -> Open...` lists MEI files among "All supported files" and MEI is among the formats the user can select
* user is warned about MEI features that cannot be imported
* except for the `<meiHead>` which is stored away and written back in case the file will be exported back to MEI (including custom tags, e.g. `<graph />`)
* (depending on configurations under `Edit -> Preferences -> Import`) user prompt in case a decision needs to be taken, e.g. "which of the 2 encodings to use" or "how to open the MEI Corpus" (as individual files or in one file with section breaks)
* `File -> Export` lists MEI as available "Format"
* user is warned about features or metadata fields that will not be included in the exported file (as of yet)
* in case an `<meiHead>` is available from opening the file, write it back
* executing `<mscore executable> -o score.mei score.<ext>` results in an MEI export of `score.<ext>` where `<ext>` is one of the file formats that MuseScore reads
* opening an MEI file exported by MuseScore 4 and re-exporting it yields the same result
* IDs from MEI files are maintained as long as possible and written back if exported to MEI; ideally, those IDs would become part of MuseScore's "Properties" pane, which would probably make a case for including them into MuseScore's XML format, too
## Essential features
Ideally, MuseScore would be able to encode in MEI format all features that it can represent. However, a first version might have to confine itself to a subset. This section defines the essential features that might be of importance to most users.
### Staves
* name & abbreviated name
* staff brackets & which bar lines span staves
* transposing by (e.g. clarinet in Bb)
### Measures
These features can be assumed to ascribe to all staves.
* time signatures (always at the beginning of a measure)
* optional: time signatures differing between staves, e.g. https://github.com/DCMLab/corelli/blob/main/MS3/op03n10d.mscx
* "actual duration" for diverging durations such as cadenza, anacrusis, or split measures
* measure numbering (in MuseScore: "Exclude from measure count" and "Add to measure number")
* key signatures
* first/second endings ("volta")
* repeat signs
* double bar lines
* jumps, such as D.C./D.S. (al XY)
* tempo markings as "quarter notes per minute"
### Notes and rests
* pitch or percussion sound
* duration
* note value
* dots
* tuplets
* ties (tying, tied-to, both)
* grace notes (acciaccatura, appoggiatura)
* non-default note heads
* tremolo markup
* stem visibility and stem direction
* note beaming
### Markup defined by point in time / event
In MuseScore, the point in time is often implicit in the order of elements.
* clefs
* dynamics (ff, s.p, sfz etc.)
* note articulation (stacc., portato, fermata)
* ornaments such as mordents
* thoroughbass figures
* chord labels
* string
* type (e.g. Roman numeral, guitar chord)
* staff text (e.g. *espress.*)
* system text (e.g. TRIO)
### Markup defined by time spans
* slurs
* dim./cresc./decresc. both as text and hairpins
* trills
* ottava lines
* arbitrary text lines (e.g. rall./rit./string./sul C)
### Metadata
MuseScore has a few default metadata fields (key->value pairs) and users can add arbitrarily many. For some there should be a default mapping to MEI fields which users can change in the settings, with the option to add additional settings. These are the default fields and how they are normally used (if at all):
* `arranger` name
* `composer` name
* `lyricist` name
* `poet` name
* `workTitle` cycle
* `workNumber` op./catalogue
* `movementTitle` piece
* `movementNumber` no. within cycle
* `copyright`
* `source` musescore.com or IMSLP URL
* `translator` typesetter
* `creationDate` of the file
* `platform` Linux/MacOS/Windows
DCML data come with additional custom keys such as `reviewers` and `annotators`, which is where setting custom mappings would come handy. For now, the mappings can be two-way (same for import and export): advanced functionality of having an import mapping (catering to scores created elsewhere) and one export mapping (for another project's standard) is certainly beyond scope since there are metadata editors for that.
## Second-tier features
* custom positioning of any element
* line and page breaks
* pedal lines
* parts
* arpeggios
* lyrics
* breath marks
* fingerings
* incipits incl. ambitus
* courtesy display for key/time signature or clef changes
* brackets around notes and accidentals