Interactive music encoding with Verovio

Authors: Pugin, Laurent / Hankinson, Andrew

Date: Monday, 4 September 2023, 9:15am to 5:45pm

Location: HNI, Room F1.110 <hni:measure>


Verovio ( is an open-source software library for engraving music scores encoded in MEI. It is a flexible tool that can be used in a wide range of applications. Projects use Verovio in the context of digital critical editions, genetic editions, early music, audio alignment, online editing, music addressability, visualization, performance, and even composition via artificial intelligence. Verovio is written in C++, but it can also be used in diverse programming ecosystems, including as a JavaScript toolkit in web-pages, or as a module in Python environments.

One of the unique features of Verovio is that it renders music notation into SVG where the original structure of the MEI is preserved as much as possible. Not only is the original XML tree structure of the MEI preserved in the SVG, but also element XML IDs and element names through corresponding SVG class names. Verovio features a set of methods for retrieving information about MEI elements in the rendering context, including time-related information in MIDI sound files—another output format that Verovio can produce. This design allows the SVG music notation to serve as an interaction layer for building dynamic applications of various kinds.

In this full-day workshop, participants will be provided with an overview of the Verovio project and its philosophy. The overview will cover different use-cases and explain how Verovio can be integrated in an application. You will also learn about the current development status and about the latest additions. Most importantly, you will follow a step-by-step introduction on how to integrate Verovio in a JavaScript web environment, from the most basic use case to more advanced, interactive, and project specific ones. A similar approach will be provided for Python integration, with some examples on how music encoding data can be processed in scripting environments.

There are no specific prerequisites for attending the workshop. However, we believe it would be more interesting for people having at least one of the following: some understanding of MEI (or another music encoding scheme), some knowledge of music notation, or some minimal programming skills (JavaScript or Python). Participants are expected to bring their own laptop. No specific tool is required since we will be using online tools.

The learning outcomes for the workshop will be:

  • to understand the overall architecture of Verovio and the ways it can be used.
  • to know how to create a minimal webpage integrating Verovio rendering.
  • to understand how the SVG output in Verovio acts as an interaction layer.
  • to know how to interact with the music notation in the webpage with JavaScript and CSS.
  • to understand how to load Verovio in Python scripting environments.
  • to know how to write a minimal script that processes music encoding files with Verovio.

About the authors

Laurent Pugin is co-director of the RISM Digital Center and is the lead developer of Verovio. Previously, he was a postdoctoral researcher at McGill University and a visiting scholar at Stanford University. He is also co-applicant of LinkedMusic, a research project based at McGill University. Laurent Pugin has been a member of the MEI board and co-chair of its technical team since 2014. In 2019, he completed a habilitation in both musicology and digital humanities at the University of Bern where he has been teaching for many years.

Andrew Hankinson is senior software developer at the RISM Digital Center where he leads the development of RISM Online. He was a postdoctoral researcher at the University of Oxford and senior software engineer for Digital Collections Discovery at the Bodleian Libraries. Andrew specializes in web technologies for building scalable and usable search and retrieval systems. He has held positions on the MEI board and with the Executive of the IIIF Consortium. He has been an active contributor to MEI for many years.

Contribution Type