An easy way to parse musicXML files in java
For a recent project, I wrote a musicXML parser in java. The code is available on Bitbucket.
MusicXMLparserDH is a java musicXML parser that parses a musicXML file in Note objects with have properties such as pitch, accidental, duration, start time etc. It outputs an ArrayList that contains all of the Notes in sequence. A list of notes per time slice is also provided. The main time saver in using this library is that the note onsets are already calculated.
The motivation for this library was my need for an easy way to read in a large corpus of music and use it in a format easily usable for algorithmic optimization/analysis.
In the future, the Note structure will be expanded to include more characteristics. (One could fairly easily do that).
An export function will also be added that allows a user to manipulate notes and change them in the original file.
Do you want to contribute something to the code? Contact me.