Search code examples
xmlmusic-notationmusicxml

Finding note onsets in musicXML


I am trying to parse a list of which pitch classes are being played at each division in a musicXML file with java and jSoup. The output should look like this (one line per division):

A C E
A C
A C D
(for instance)

I could fill up this array based on the note durations, given the number of divisions in the piece. But I can't seem to find the start time of the notes. Is there an easy way of parsing that?

The musicXML specification has a duration and a pitch (which I can parse), but I am confused about the start time of the note.


Solution

  • If is included in a note, it starts at the same time as the previous note I believe, see.

    The backstep and forward elements keep track of the time.

    The parser I've developed is available here. People who are interested are free to use the code/library.