Sustainability of Digital Formats: Planning for Library of Congress Collections

Introduction | Sustainability Factors | Content Categories | Format Descriptions | Contact
Format Description Categories >> Browse Alphabetical List

Music Encoding Initiative (MEI) Format Family

>> Back
Table of Contents
Format Description Properties Explanation of format description terms

Identification and description Explanation of format description terms

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:

  • Wide range of notation, not just CWMN
  • Coordination of notation with digital images and audio
  • Support for optical music recognition (OMR)
  • Support for encoding scribal/editorial intervention
  • Ability to capture source variants and describe their differences

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:

  • MEI v2.1.1 (2013): See MEI Guidelines Release 2013.
  • MEI 3.0.0 (2016): association of MEI elements with external code lists, such as Standard Music Font Layout (SMuFL); expanded metadata capabilities, such as the inclusion of non-MEI metadata formats; improved representation of typographic details; description of MEI components using Scalable Vector Graphics (SVG); revision of the MEI Guidelines and Data Dictionary (formerly known as the "Tag Library"). See MEI Guidelines, v3.0.0..
  • MEI 4.0.0 (2018): The Neume Module was redesigned for MEI 4.0.0. MEI 4.0.0 greatly facilitates the description of source material. Most of the new elements are modeled after respective elements in TEI, but some are specific to MEI. The FRBR implementation of MEI has been lightly revised in v 4.0.0. A significant change to MEI is the removal of the @subtype attribute. Since the combination of @type and @subtype allowed only two levels of type classification, it has been decided that @type should allow multiple values. This allows as many levels of typing as necessary. In MEI 4.0.0, a larger number of attributes are now available on all elements. This list now includes @class, @follows, @next, @precedes, @prev, @resp, and @type.

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:

  • mei-all: The full MEI Schema. This is the most permissive version of MEI.
  • mei-CMN: Validates MEI files that express common Western music notation. See Repertoire: Common Music Notation from MEI Guidelines. The guidelines state, "Arguably, the most important element of the CMN module is the measure element." It is a structural unit inside section elements and contains 'events' such as notes, chords and rests as well as 'control events' such as slurs and indications of dynamics.
  • mei-Mensural: Mensural notation was used from the late 13th century to about 1600, preceding the development of Common Music Notation (CMN).  Originally, all notes were written in solid, filled-in form ("black notation"). In the mid-15th century, scribes began to use hollow note shapes ("white notation"), reserving black shapes only for the smallest note values. This customization validates MEI files that express white Mensural notation. It will raise validation errors if elements like measure exist in the MEI encoding. See Repertoire: Mensural Notation.
  • mei-Neumes: Validates MEI files that express Neume notation. See also

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.

Local use Explanation of format description terms

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.

Sustainability factors Explanation of format description terms

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 Some earlier versions of the RNG schemas can be found at 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


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

Quality and functionality factors Explanation of format description terms

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

File type signifiers and format identifiers Explanation of format description terms

Tag Value Note
Filename extension mei
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="".
Indicator for profile, level, version, etc. See note.  An optional attribute meiversion can be applied to the meihead element. See See example from Early Music Songscapes project.
XML namespace declaration See note.  The MEI namespace is
Pronom PUID fmt/965
As of May 2019, PRONOM does not distinguish between different versions of MEI. See
Wikidata Title ID Q50308939
See Applies to all versions of MEI.

Notes Explanation of format description terms


MEI objectives: On, the goals of MEI are expressed in "The Music Encoding Initiative strives to create a semantically rich model for music notation that:

  • accommodates the encoding of common Western music, but is not limited to common music notation;
  • is designed by the scholarly community for scholarly uses, but does not exclude other uses;
  • provides for the common functions of traditional facsimile, critical, and performance editions;
  • has a modular structure that permits use dependent on the goals of scholars;
  • is based on open standards and is platform-independent;
  • and permits the development of comprehensive and permanent international archives of notated music as a basis for editions, analysis, performances, and other forms of research."

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

Format specifications Explanation of format description terms

Useful references


Last Updated: 08/21/2020