1

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.

Matthieu Brucher
  • 21,634
  • 7
  • 38
  • 62
dorien
  • 5,265
  • 10
  • 57
  • 116

2 Answers2

1

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.

dorien
  • 5,265
  • 10
  • 57
  • 116
1

MusicXML has a timeline with a measure that programs need to keep track of for exact starting time. Note elements move it forward unless there is a chord child element. Forward and backup elements can also move it forward or backward within a measure. If you need precise starting times at a piece-wide level, your program needs to keep track of those too. MIDI has a somewhat similar structure. You may find the MusicXML tutorial helpful at http://www.musicxml.com/tutorial/.

Michael
  • 733
  • 3
  • 8