I am using jFugue 4.03 and attempting to read in a song using the MusicXML reader class. Something odd is happening upon read in - the tempos are not being acknowledged. Here is a code snippet that I am trying, just to mock up what the "music string" looks like after it has been read in from the parser.
Player player = new Player();
//read in using the XML parser. Displaying it as a string literal for clarity
player.play("T60 V0 A3q B3q C3q B3q V1 A2h C2h | T120 V0 A3q B3q C3q B3q V1 A2h C2h");
On my machine (Windows 8 x64, Java 1.7.0_40) I hear the output of 2 measures of 2 voices playing [good so far], but they are at the same tempo (60bpm).
Any idea what I'm doing wrong?
I found a work around by moving the T120 after the second V0, not before it.
Player player = new Player();
player.play("T60 V0 A3q B3q C3q B3q V1 A2h C2h | V0 T120 A3q B3q C3q B3q V1 A2h C2h");
In general, I used the following regex to post-fix my tempos when reading in from a MusicXML file:
Pattern tempoFixedPattern = new Pattern(pattern
.getMusicString().replaceAll("(T[0-9]+) (V[0-9]+)", "$2 $1"));