|Introduction | Sustainability Factors | Content Categories | Format Descriptions | Contact|
|Full name||Music Encoding Initiative (MEI) Format Family|
The Music Encoding Initiative (MEI) is an open-source effort to define a system for encoding musical documents in a machine-readable structure. MEI brings together specialists from various music research communities, including technologists, librarians, historians, and theorists in a common effort to define best practices for representing a broad range of musical documents and structures. MEI is designed by the scholarly community for scholarly uses. This does not preclude other uses, but means that the primary use of MEI is in the assembly of scholarly editions and collections of music converted to digital form from print or manuscript.
The origin of MEI was based on requirements for music librarianship and cataloging. However, the scope has widened to cover not only full scores of Common Western Music Notation (CWMN), but also other repertoires like Mensural Notation and Neumes. Describing variations between editions and tracking editorial interventions became important use cases of MEI. As a result, MEI has developed into a multi-faceted framework, which can be customized to support a wide range of different use cases, while still maintaining compatibility with data designed for other purposes. Its modular approach allows support of new musical repertoires and features without increasing complexity for other users. Integration with other formats like the Functional Requirements for Bibliographic Records (FRBR) model, the Metadata Encoding and Transmission Standard METS, or the Text Encoding Initiative (TEI) is part of the design of MEI.
Strengths and special features of MEI as a music notation format include:
The MEI format is formalized in the MEI schema, a core set of rules for recording physical and intellectual characteristics of music notation documents expressed as an eXtensible Markup Language (XML) schema using the Relax NG (RNG) schema language. The schema is complemented by the MEI Guidelines, which provide detailed explanations of the components of the MEI model and suggestions for best practice.
The model underlying MEI recognizes four distinct aspects of music notation: logical; gestural; visual; and analytical. The logical domain includes the musical content or structure including pitches, time values, articulations, dynamics, and all other elements—defined as the symbols that communicate the composer’s intentions. The gestural domain relates to a performed interpretation of the logical domain (i.e., it encodes information that may be added by a performer such as explicit realizations of "swing" or rubato). The visual domain describes the contributions of an editor, engraver, or typesetter, and encodes information about the physical appearance of the score, such as symbol locations, page layout, or font. Finally, the analytical domain covers commentary and analysis of the music document in any of the three previous domains. As stated in Meico: A Converter Framework for Bridging the Gap between Digital Music Editions and its Applications (2018) by Axel Berndt et al, "The attempt to meet the requirements of all four domains makes MEI a very extensive and complex format so that even the most recent MEI schema definition (v3.0.0) does not cover it entirely. In addition, digital music editions do not have to address all four domains. Many music editions focus on the visual domain. In this case, the MEI encoding describes sheet music documents but not necessarily provides a complete or unambiguous encoding of the logical domain."
The history of MEI development began with a research project around 1999 at the University of Virginia. See Notes/History below for more detail on the early history. Key chronological versions of MEI have been:
At a minimum, a valid MEI-encoded file contains two structures within the parent <mei> element: the <meiHead> and <music> elements. The <meiHead> structure contains metadata elements that describe the work, including information about authorship, encoding standards, and provenance. The <music> structure contains information regarding the encoded music itself. The music notation is represented using XML tags, arranged in a hierarchical relationship.
The MEI Schema may be customized to express and validate different types of music documents. The approach used for customizing MEI schemas is based on the "One Document Does-it-all" (ODDs) approach developed by the TEI Consortium. See Note below on TEI and its approach to schema customization. MEI is distributed with the following pre-prepared customizations:
Customization is possible at the level of individual elements, but MEI also has modules that can be included or excluded through the ODDs customization process. Examples, with relevant links to the MEI Guidelines, include: tablature (see Repertoire: String Tablature); facsimile, for incorporating scanned images (see Elements of the Facsimile Module); midi (see Musical Instrument Digital Interface (MIDI)); lyrics (see Lyrics and Performance Directions); edittrans (see Editorial Markup); and critapp (see Critical Apparatus).
|Production phase||When used for creating music notation documents, MEI is primarily based on existing examples of musical notation that have been transcribed and/or scanned as images. Since the format supports very rich metadata about both the original source and the conversion and encoding processes used, it can also serve as a final-state archival format.|
|Relationship to other formats|
|Has subtype||Various chronological versions, not described separately on this website at this time.|
|Defined via||XML_1_0, XML (Extensible Markup Language) 1.0|
|Defined via||Relax NG XML Schema language.|
|LC experience or existing holdings|
|LC preference||For works acquired for its collections, the Library of Congress Recommended Formats Statement, indicates that MEI is a preferred format for Musical Scores - Digital.|
|Disclosure||The Music Encoding Initiative began as a research project at the University of Virginia. Since 2014, the MEI family of formats has been developed and maintained through an open-source effort hosted at the Akademie der Wissenschaften und Literatur in Mainz, Germany. See MEI By-laws and MEI Board.|
The latest version of the MEI schemas in the RELAX NG schema language are at https://music-encoding.org/resources/schemas.html. Some earlier versions of the RNG schemas can be found at https://music-encoding.org/archive/. RNG schemas and source code in a meta-schema language developed by the TEI Consortium, known as the “One Document Does-it-all” (ODD) format, are also available in combined packages for versions since 2010 from https://github.com/music-encoding/music-encoding/releases/.
According to the Wikipedia entry for MEI, "MEI is often used for music metadata catalogs, critical editing (particularly of early music), and OMR-based data collection and interchange." OMR is Optical Music Recognition. According to the MusicXML Format Preservation Assessment from the British Library Digital Preservation Team, "MEI has carved out a useful role for itself within the music research and scholarly music editing communities." The MEI website maintains a list of projects employing MEI and a bibliography of articles about use of MEI.
Tools for working with MEI files are available at https://github.com/music-encoding/encoding-tools. Included are XSLT stylesheets for: upgrading from one version of MEI to another; converting MEI to other formats (e.g., MusicXML, MARC, MODS, etc.); and converting other formats to MEI (e.g., MusicXML, MARC). In May 2019, a list of Tools on the MEI website listed seven community-developed tools. For example, SibMEI is a plugin for generating MEI files from the popular Sibelius scorewriter software and LibMEI is a C++ library for reading and writing MEI files. Tools for rendering/displaying MEI include: MEILER and Verovio.
In Meico: A Converter Framework for Bridging the Gap between Digital Music Editions and its Applications (2018), Alex Berndt et al, introduced a converter framework for MEI. This framework takes advantage of other free and open-source tools.
Some scholarly projects take advantage of commonalities between TEI and MEI. An example is Early Modern Songscapes.
|Licensing and patents||The schemas, documentation, and tools are licensed for free use under the Educational Community License, Version 2.0.|
Transparent to a human reader or with a text editor. Comprised entirely of XML with element names consisting of familar terms related to the presentation of music, such as <score>, <keysig>, and <staff> and related to the semantics of the music itself, such as <measure>, <chord>, and <note>. MEI markup can be viewed and edited by a wide-range of generic tools for XML. However, like many other XML-based formats, MEI files are typically large and verbose and require domain-specific expertise to interpret. See XML Format Preservation Assessment from the British Library Preservation Team. MEI encoding makes extensive use of attributes rather than using child elements. See XML Elements vs. Attributes and Appendix E of Transforming XML into Music Notation for arguments in favor of each alternative. The latter compares MEI and MusicXML.
MEI documents may depend for the full rendering intended by creators on associated image, audio, or video files. MEI does not limit the formats for media files that can be used. Transparency depends on the particular formats used.
|Self-documentation||The <meihead> element has a rich set of child elements to describe the file, encoding details, the relationship of the electronic text to its source or sources, and a full bibliographic description of the underlying work. An optional FRBR module can be used to describe relationships between the underlying work and expressions of the work. An MEI file can also incorporate metadata in other XML schemas in <extmeta> elements. See Metadata in MEI for details.|
|External dependencies||None beyond software or stylesheets that can render MEI files for display or editing. However, the number of software applications that render MEI is small. See Adoption above.|
|Technical protection considerations||The MEI Guidelines make no mention of encryption or other technical protection.|
|Normal rendering||Although not strictly a format for text, formats for notated music share distinctions in functionality that are common with text. An MEI instance can be used to display a score that can be viewed and printed. MEI supports markup of textual sections such as preface, dedication, and abstract in a way that supports indexing for search. Words in lyrics can potentially be searched individually by generic text-indexing software, although hyphenation and spacing may be problematic, depending upon project-specific choices. See, for example, http://ems.digitalscholarship.utsc.utoronto.ca/islandora/object/ems%3A73#/ and its corresponding MEI file. In this example, the lyrics presented at the bottom of the web display are derived from an associated TEI file; that file provides a better encoding for indexing.|
|Integrity of document structure||MEI represents the semantic structure of a score: key; measures (bars); notes with pitch and duration; musical parts for different instruments; lyrics/words, etc. MEI can also represent the structure of textual content such as front matter and the structure of editorial commentary connected to music elements.|
|Integrity of layout and display||MEI is typically used for the preparation of a digital musical text based on an existing music document. Projects choosing to use MEI, typically make project-specific decisions about the way they want to be able to present documents in their collections. Music may be transcribed manually and marked up so that it can be "engraved" to an image format, often to a vector graphics format such as SVG. Another available option is to incorporate facsimile images of each page. Markup from the facsimile module uses a child surface element for each page, with attributes specifying dimensions and a label for the page. A surface element has at least one child graphic element, allowing for images at different resolutions. A surface element may have child zone elements; coordinates for a zonedefine a space relative to the coordinate space of its parent surface. A zone can contain descriptive metadata or be related to a particular element in the musical content, e.g., a particular note element. MEI does not limit the formats that can be used for images, which are referred to by URL rather than embedded in the MEI file, but the guidelines provide a list of image formats, that are described as "widely used at the present time, and are likely to remain supported by more than one vendor’s software."|
|Functionality beyond normal rendering||In contrast to simply representing text documents, MEI is designed to represent the semantics of music notation and characteristics for display and performance. The linkAlign module makes it possible to align recorded media (audio, video) with elements in the encoded music notation. This allows for synchronization between the music notation and audio or video files. The multimedia files are referred to by URL and not embedded in the MEI file.|
||This extension is used in MEI-provided sample encodings and documented in PRONOM entry for MEI.|
|Internet Media Type||Not found.||Comments welcome. In 2013, there was a discussion on the MEI-L mailing list about what to use for file extension or Internet media type (MIME type). See, for example, message from August 15, 2013. No resolution was reached and no Internet media type has been registered.|
|Magic numbers||See note.||PRONOM recognizes as MEI instances files that begin with <?xml version="1.0" followed, after up to 512 bytes, by the namespace declaration string xmlns="http://www.music-encoding.org/ns/mei".|
|Indicator for profile, level, version, etc.||See note.||An optional attribute meiversion can be applied to the meihead element. See https://music-encoding.org/guidelines/v4/content/metadata.html. See example from Early Music Songscapes project.|
|XML namespace declaration||See note.||The MEI namespace is http://www.music-encoding.org/ns/mei.|
||As of May 2019, PRONOM does not distinguish between different versions of MEI. See http://www.nationalarchives.gov.uk/PRONOM/fmt/965.|
|Wikidata Title ID||Q50308939
||See https://www.wikidata.org/wiki/Q50308939. Applies to all versions of MEI.|
MEI objectives: On https://music-encoding.org/about/, the goals of MEI are expressed in "The Music Encoding Initiative strives to create a semantically rich model for music notation that:
MEI and the Text Encoding Initiative: The Music Encoding Initiative has been strongly influenced by the Text Encoding Initiative (TEI). In particular, the basis for customizing MEI schemas, adopted in 2011, is the "One Document Does-it-all" approach developed by the TEI Consortium. Files that control customization are known as ODDs. See The Music Encoding Initiative as a Document-Encoding Framework (2011) for an introduction to the use of ODDs for MEI.
The TEI consortium collectively develops and maintains a standard for the representation of texts in digital form. Its chief deliverable is a set of Guidelines which specify encoding methods for machine-readable texts, chiefly in the humanities, social sciences and linguistics. Since 1994, the TEI Guidelines have been widely used by libraries, museums, publishers, and individual scholars to present texts for online research, teaching, and preservation. The TEI Consortium is a nonprofit membership organization composed of academic institutions, research projects, and individual scholars from around the world. Major versions of the TEI Guidelines have been numbered Pn. P5 was introduced in late 2007 and is still current in 2019, with many extensions in intervening releases. For more information on P5, see TEI: P5 Guidelines.
From the start, the TEI was intended to be used as a set of building blocks for creating a schema suitable for a particular project. See TEI: Getting Started with P5 ODDs, which describes how to produce a customization of the TEI P5 schema. There is no single DTD or schema which is the TEI; users choose from the available modules (see 1.1 TEI Modules in the TEI P5 Guidelines). The three basic modules, core, header and textstructure are almost invariably included. The slideshow An Overview of TEI Tagging or Anyone for Pizza? from 2004 describes a previous mechanism for TEI customization, used with P3 and P4. Although the precise technical details are no longer used, the general concept of the "pizza model" is still helpful as an explanation.
A brief introductory video on TEI is at https://youtu.be/NsrV_htpvlI. The most recent documentation on customization of TEI is at Clause 23.4.2 Validation Constraint and 23.5 Implementation of an ODD System in the TEI P5 Guidelines.
TEI customization is effected using the TEI Roma processor. The compilers of this resource have not located a MEI-specific version of Roma and assume that MEI projects start their customization by uploading the ODD file for one of the existing MEI customizations. The customization help at TEI: Customizing the TEI with Roma indicates that completely new elements can be added. The compilers of this resource have been unable to determine whether MEI projects take advantage of this flexibility. Comments welcome.
Comparisons of Music Notation Formats: The following resources include discussions of music notation formats and include MEI in a comparison. Transforming XML into Music Notation (2003) has an appendix that highlights some technical differences between MEI and MusicXML. The archived Agenda Discussion from the W3C Music Notation Community Group documents a 2015 discussion soon after the group's formation. The discussion included compiling strengths and weaknesses of MEI as compared to MusicXML. RfC: Musical notation files (2018) summarizes a 2018 discussion on which music notation formats, if any, should be supported in Wikimedia.
The origin of MEI is as an XML DTD developed by Perry Roland at the University of Virginia in 1999. In 2006, the University of Virginia Library provided support for a 2-year pilot project to demonstrate the capability of MEI to represent a sample of music scores and to ensure that the semantic information encoded in MEI could be rendered as music notation. This was followed by collaborative projects with funding from the National Endowment for the Humanities (NEH) and the German Deutsche Forschungsgemeinschaft (DFG). The grants supported workshops attended by an international groups of digital technologists and scholars representing musicology, music theory, and librarianship. The first of these workshops (in July 2009) marked the beginning of MEI development as an international community-driven effort. In 2010, MEI 2010-05 was released. According to MEI Tag Library, 2010-05 Release, this version appears also to have been known as 1.9b. A paper presented in 2011, The Music Encoding Initiative as a Document-Encoding Framework indicates, "Recent changes in the Music Encoding Initiative (MEI) have transformed it into an extensible platform from which new notation encoding schemes can be produced." The paper discusses the move to use the ODDs framework developed by TEI for schema customization. Version 2.0.0 of MEI was released in 2012, followed by versions 2.1.0, 2.1.1, and 2.1.2 in 2013 and 2014. Versions 3.0.0 and 4.0.0 were released in 2016 and 2018, respectively. For more detail on the history of MEI, see An introduction to MEI, which has a section on the history of MEI, and MEI at 15, a presentation from 2015.
The current governance structures for MEI were introduced in 2014. Since then, the MEI website has been hosted at the Akademie der Wissenschaften und Literatur in Mainz, Germany.
Developments to the MEI framework and guidelines are produced by the MEI Technical Team which prepares new releases of MEI by reviewing and implementing revisions and features requested by the community. See https://music-encoding.org/community/technical-team.html.