Remark: this repository is no longer used for Verovio developments. The code has been refactored and moved to the Verovio repository.
LibMEI is a C++ library for reading and writing MEI files
It is developed by the Distributed Digital Music Archives and Libraries Lab at the Schulich School of Music at McGill University, Montréal, Canada
This is a modified version that is used for generating C++ code for Verovio. The main differences with LibMEI are:
- it generates only attribute classes (Mixin in LibMEI),
- each attribute has a C++ type deduced from the MEI schema or given in a separted configuration file,
- it uses the MEI page-based customization not included in the MEI 2013 v2.1.0 (see MEI).
LibMEI is released under the MIT license.
There is a modified CPP script tools/lang/cplusplus_vrv.py
that can be activated with the -l vrv
language option.
Additional C++ includes are in the tools/includes/vrv
directory. The code will be generated into a ./libmei sub-directory at organized in Verovio.
A compiled version of the 2013 schema with the latest page-based customization is available in mei/xxxx-xx-xx/mei-page-based.xml.odd
.
To generate the code, simply
python3 tools/parseschema2.py -l vrv -o path_to_verovio_directory -i tools/includes/vrv mei/2013-11-05/mei-page-based.xml.odd
Remark: you will need the lxml
and pyyaml
packages to be installed for this to run.