Using this thread I have figured out how to use getData(), but instead of getting anything with 0x51, I am getting random values such as [B@37d78d93, [B@29d74462 and [B@1c5ca652
Outputting the meta message itself also results in similar values such as javax.sound.midi.MetaMessage@364d4fca, javax.sound.midi.MetaMessage@5581f86d and javax.sound.midi.MetaMessage@3f011b2b
For example, using
System.out.print ("the meta message is " + mm + ", ");
System.out.print ("the type of meta message is " + mm.getType());
System.out.println(" and the data is " + mm.getData());
outputs
the meta message is javax.sound.midi.MetaMessage@3f011b2b, the type of meta message is 81 and the data is [B@1c5ca652
How can I use the value at the end of the outputted mm
value or the values taken from mm.getData()
to get the tempo of a MIDI file?