Meico is a converter framework for MEI files. Even though MEI is a quasi-standard for digital music editions, there is few software support for it. If you want to listen to the music in your MEI file, you need a MIDI or audio export. If you want to process the musical data (e.g., for Music Information Retrieval), there are many better suited formats and representations than MEI. With meico we address these issues. Meico implements methods to convert MEI data into the MSM (Musical Sequence Markup) format, an intermediate format that we defined for further use in other projects. From MSM, the MIDI export and audio rendering are quite straight forward. Currently, meico is a beta release. The following features are implemented:
- MEI to MSM conversion (with variable time resolution in pulses per quarter, ppq),
- MSM to MIDI conversion,
- MIDI to audio PCM and MP3 conversion (with freely choosable SoundFont and Downloadable Sounds),
- MEI processing functions (validation,
xml:idgeneration, resolution of elements with
- MSM processing functions (remove rest elements from the score, expand repetitions encoded in the
- an instrument dictionary that uses several string matching algorithms to map staff names to MIDI program change numbers,
- basic MIDI and audio playback,
- two standalone modes (command line mode, window mode),
- processing of XML sources with XSLT stylesheets, e.g. to convert MEI to MusicXML using the Music Encoding Initiative’s
mei2musicxml.xslstylesheet from the MEI Encoding Tools GitHub.
There are several features open, though. Currently, meico ignores any MEI data that is concerned with expressive performance (tempo, dynamics, articulation, ornamentation). Several MEI elements and attributes are not supported so far (e.g.
lyrics). The MEI file must be unambiguous, i.e., it should not contain any variants (
choice etc.). A tool to resolve ambiguity is under construction and will soon be published. We are also developing a schematron rule set to give detailed feedback on the supported and unsupported MEI elements when an MEI file is loaded into meico.
How to use meico?
Meico can be used in several different ways. The jar file (see the latest release) is a standalone runnable Java program. We have tested it under Windows, Mac OS and Linux. The only prerequisite is that you have a Java 1.7 (or higher) Runtime Environment installed on your computer.
Starting the standalone jar without any command line options will start the window mode of meico. Simply drag your MEI, MSM, MIDI, and Wave files into the window. You can find context information on each interface element in the tooltips and statusbar. There are several additional functions accessible via right click. If you have several mdivs in your MEI document you will get an individual MSM instance for each movement. Conversion from MIDI to audio may take some time when it is a long piece. We have not built in a progress display yet. Just be patient until the conversion button changes its color back and the audio data appears. To get better quality sounds than Java’s built-in default instruments (those used for the Midi playback function), we recommend downloading one of these soundfonts and use it via right clicking the Midi-to-audio conversion button, option “Choose soundbank”.
The command line mode expects the following command line options:
java -jar meico.jar [OPTIONS] FILE
||show this help text|
||validate loaded MEI file|
meico will output a revised MEI file
||resolve elements with
||apply an XSL transform
||convert to MSM|
||convert to MIDI (and internally to MSM)|
||suppress program change events in MIDI, all music will be played by piano|
||do not use channel 10 (drum channel) in MIDI|
||set MIDI tempo (bpm), default is 120 bpm|
||convert to Wave (and internally to MSM and MIDI)|
||convert to MP3 (and internally to MSM and MIDI)|
||use a specific sound bank file (.sf2, .dls) for Wave conversion|
||write additional debug versions of MEI and MSM|
The final argument should always be a path to a valid MEI file (e.g.,
"C:myMeiCollectiontest.mei"); always in quotes! This is the only mandatory argument if you want to convert something.
The third way of using meico is as a Java programming library. Its
Audio classes are the most important to work with. Class
meico.app.Main demonstrates the use of meico (method
commandLineMode() is best suited as tutorial). With
meicoPy.py we have also a demo script that shows the usage of meico in Python. Unfortunately, we have no API documentation, yet. But the source files are extensively commented and should suffice as makeshift.
We further provide a Python3-based REST API for meico.
Meico can quickly be built using Ant:
$ git clone https://github.com/cemfi/meico.git
$ cd meico
meico.jar can be found in
Meico makes use of the following third party libraries:
– XOM v1.2.10 by Elliotte Rusty Harold, GNU Lesser General Public License (LGPL) version 2.1.
– Java-String-Similarity v0.13 by Thibault Debatty, MIT license.
– MigLayout v4.0 by Mikael Grev (MiG InfoCom AB), BSD and GPL license.
– the FileDrop class v1.1.1 by Robert Harder, Nathan Blomquist and Joshua Gerth, Public Domain release.
– Jing v20091111 by James Clark (Thai Open Source Software Center Ltd), see
copying.txt provided in file
– Saxon v220.127.116.11 HE by James Clark (Thai Open Source Software Center Ltd), Mozilla Public License Version 2.0.
– Java LAME v3.98.4 by Ken Händel and Nico Waldispühl, GNU LGPL version 3.0.
– MEI Common Music Notation Schema (
mei-CMN.rng), Educational Community License (ECL) 2.0.
– parts of
MidiToWavRenderer.java, an add-on to the JFugue library, LGPL license.
We publish meico under GNU LGPL version 3.0 Meico development is part of the ZenMEM project which is funded by the German Federal Ministry of Education and Research (funding code 01UG1414A–C).
If you use meico in your project make sure that you do not conflict with any of the above licenses.