A call to MetaMessage() results in a NegativeArraySizeException.
The reason is that the defaultMessage Array in MetaMessage has got only a length of 2. So it always throws a java.lang.NegativeArraySizeException (Invalid meta event. data: [-1, 0] );
A solution is to change the default message initialisation to
private static final byte[] defaultMessage = { (byte) META, (byte)0, (byte)1, (byte)0 };
as it is done in the reference implementation of javax.sound.midi.MetaMessage( http://developer.classpath.org/doc/javax/sound/midi/MetaMessage-source.html )
A call to MetaMessage() results in a NegativeArraySizeException. The reason is that the defaultMessage Array in MetaMessage has got only a length of 2. So it always throws a java.lang.NegativeArraySizeException (Invalid meta event. data: [-1, 0] );
A solution is to change the default message initialisation to private static final byte[] defaultMessage = { (byte) META, (byte)0, (byte)1, (byte)0 }; as it is done in the reference implementation of javax.sound.midi.MetaMessage( http://developer.classpath.org/doc/javax/sound/midi/MetaMessage-source.html )