mnxconverter

A Python package for converting between MusicXML and the new MNX format.

Disclaimer

This is alpha software! The MNX format is being actively designed — so anything in this code might change.

This converter is also very limited in scope at the moment. So far, it only reliably converts the types of notations described in Comparing MNX and MusicXML.

Goals and non-goals

The goals of this code are:

Non-goals are:

How you can help

If you work with music notation software, your feedback is highly valued and appreciated. Here are specific types of help we want:

  1. Feedback on concepts. Read through the abstractions in mnxconverter/score.py. These classes are very closely aligned with the concepts of the MNX specification in general. Do they make sense? And do you envision it would be doable to integrate MNX in your notation app — for both import and export?

  2. Feedback on converter accuracy. Run the converter on your MusicXML files. Does it do the right thing? (Keep in mind the scope of the importer is still quite small.)

  3. Help with test cases. Have a collection of zany MusicXML files? Help expand the test suite and find bugs in the converter.

  4. Help with coding. Help implement new MNX features. Anything that’s been specified in the spec is fair game for being implemented here.

Installation

This requires Python 3.7.

First, make sure you have lxml installed:

pip install lxml

To convert a MusicXML file, outputting the MNX file to standard output:

python convert.py your-file.musicxml

To run the test suite:

python runtests.py

Test suite

To add a test to the test suite, put two files in the tests directory: a MusicXML file and the expected MNX output. Make sure they have the same name, with two different extensions: .musicxml and .mnx. From then on, runtests.py will find the new test.

At the moment, the test runner looks for an exact match in the generated MNX markup. It would be better to ignore order of attributes, etc.

Credits

This is developed by Adrian Holovaty of Soundslice and the W3C Music Notation Community Group.

The MNX format was originally designed by Joe Berkovitz.

MusicXML was originally designed by Michael Good.