java - Android: How to retrieve MIDI events at the right time? -


i trying retrieve midi events at right time midi file, within android app.

the following code works on standard jvm (on computer), using javax.sound.midi api.

sequencer sequencer = midisystem.getsequencer();  sequence sequence = midisystem.getsequence(new file(filename)); sequencer.setsequence(sequence);  sequencer.open();  sequencer.gettransmitter().setreceiver(new receiver() {     @override     public void send(midimessage message, long timestamp)     {         system.out.println(arrays.tostring(message.getmessage()));     }      @override     public void close()     {     } });  sequencer.start(); 

unfortunatelly, javax.sound.* package not available on android. porting android available on github (https://github.com/kshoji/javax.sound.midi-for-android) code sample above doesn't work (sequencer.gettransmitter() returns null).

does know how that? didn't found interesting library (http://www.midi.org/aboutmidi/android.php) want do.

thank you.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -