I've been trying to load a MusicXML file, edit it (removing several parts), and create a PDF sheet document + midi/mp3, all of this using Python.
I've first looked at music21
, that would load my MusicXML file right, but as far as I could find, would not output a proper file (all the details in the output files have disappeared, all that's left is the notes and the title)
Then I found abjad
which looked promising. It did output great quality ly/pdf files, but there was no musicxml imported.
Then, I discovered that Lilypond comes with a musicxml2ly
script. I was able to call it and get the result lilypond file in python using sh
(great lib !) but then the abjad
lilypond
parser would not parse it (the doc says it parses a "large subset" for lilypond, without more precisions).
Finally, I found that music21
had an exporter to abjad python objects but it seems not to be present in the codebase anymore and the source code for the exporter clearly just exported the notes.
I'm a little out of options, what could I do to achieve these goals ?
(additional point : I still don't know how I'm going to do the second part, going to midi/mp3 using soundfonts, but that may not be the hardest part. Any suggestion ?)