Music is in the air – MEI and TEI Publisher

On Wednesday, July 8th we had the opportunity to join another e-editiones online event, this time a session dedicated to MEI (Music Encoding Initiative). Giuliano Di Bacco and Dennis Ried introduced us to MEI and challenges of publishing MEI and MEI-in-TEI collections on the web (see slides). Wolfgang Meier presented early results of his work on integration of MEI into the TEI Publisher.

As we learned from Giuliano’s and Dennis’ introduction MEI, like the TEI, is an umbrella term which simultaneously describes an organization, a research community, and a markup language ( It’s almost 20 years since the first public presentation of the XML schema created by Perry Roland (Univ. of Virginia) for the representation of music notation. Now it has become a thriving community of around 400 members worldwide, specialists from various music research groups, including technologists, librarians, historians, and theorists.

This open-source effort to define guidelines for encoding musical documents in a machine-readable structure draws in many aspects on TEI: using an ODD metalanguage to define both the schema and encoding guidelines, dividing the document into metadata, facsimile and text parts, recording logical and structural divisions of the document (albeit named differently) or "borrowing" a number of element names from TEI to deal with metadata, textual content, critical apparatus, linking etc.

Nevertheless, MEI was designed to specialize in the encoding of music documents, therefore MEI data is predominantly about the meaning of the music notation: notes, rests, chords, measures. That said MEI allows for multiple additional layers of annotations:

  • about the visual aspects of the notation, and/or of the features of a physical copy of a score
  • metadata
  • editorial markup

While MEI encoding allows for sophisticated analysis of various features of the musical piece, rendering of MEI documents often poses a substantial challenge. We need to consider that music notation is a very complex system; actually, many systems were developed since the medieval times, and MEI strives to give a sophisticated representation not only of the symbols but of their meaning and of the logic that brings them together in pieces of music of all ages. However, it is still difficult, if not impossible, to render graphically all the nuances of the encoding.

Major breakthrough in this respect has been the creation of the Verovio music engraving library
which is considered the most advanced solution in the field to generate score visualisations in SVG.

Verovio is quite helpful to render the notation for the most common use cases for MEI:

  • to create transcriptions/editions of music pieces
  • to produce bibliographies and catalogs

Difficulties arise when we need to deal with mixed textual and musical content:
from music treatises (see Thesaurus Musicarum Latinarum), composers’ letters quoting musical phrases, to opera librettos and listening guides, papers including snippets of music notation (e.g. music textbooks)… Such situations often require the simultaneous use of both TEI and MEI (and for instance a MEI file can be referenced in a TEI document using the “ element). Giuliano and Dennis walked us through a number of different approaches employed in various projects, where tools specialized just for a single vocabulary do not meet their ideal criteria for broad application:

  • ease of setting up
  • TEI and MEI support
  • facsimile integration

Following this cue, Wolfgang has demonstrated his new pb-mei web component which uses Verovio under the hood to generate SVG representation of the score. For TEI documents applying “ element to include a pointer to a MEI encoding of a music notation it is very straightforward to adjust the ODD to transform this pointer to a pb-mei component, as demonstrated in the pb-mei demo.

Demo page of the pb-mei component

This proved to be a very pleasant surprise and a convincing argument that TEI Publisher could be adapted to fit the needs of MEI community. A short discussion followed ranging from detailed questions on MEI encoding, through workflows on creating MEI sources cf. Verovio editor to information important for preparing an ODD and customization modules for supporting MEI in TEI Publisher. We agreed to work with Giuliano and Dennis on including MEI-in-TEI and pure MEI examples in the next minor version of the TEI Publisher to demonstrate fully its capability.

We were happy to see that this event gathered the audience of around 17 participants and are looking forward to establishing a monthly meetup online to provide an arena for lively discussions on subjects of interest to the community. Please get in touch if you’d like to discuss a particular topic.

TEI Publisher 6

Today the new TEI Publisher 6.0.0 is finally out. This is a major release introducing the refactored and extended component library as well as numerous bugfixes and new features.

All Publisher’s web components are now available as a LitElement library distributed via npm. While invisible to users, this redesign greatly improves modularity and simplifies updates of Publisher-based applications. It also facilitates embedding of Publisher custom components into CMS systems (e.g. Hugo or WordPress) and other application frameworks (like angular, vue or react).

This version also brings extended internationalization and full localization into 19 languages, simplified styling, support for data organization based on subcollections, several new and enhanced components (including one for notated music encoded in MEI), improved ODD editor and major extension and revision of the documentation.

Demo page of the pb-mei component

More information about this release can be found on the TEI Publisher blog.

A 3-part online course on TEI Publisher 6 has been led by Wolfgang Meier in June 2020. Video recordings of all the sessions, and a walk-through for the assignments are available for self-study.

Our special thanks for supporting this release go to:

  • Numerous community members who helped to translate and proofread language files via Crowdin
  • Swiss Nationale Infrastruktur für Editionen – Infrastructure nationale pour les éditions for funding a large part of work on the web component refactoring.
  • ACE – Austrian Corpora and Editions of the Österreichische Akademie der Wissenschaften for a small grant to enhance toggling mechanisms