I've searched for a while now, and can't find an answer for what I want to do.
I want to play a midi file, and display the notes on the screen as it plays. When a note stops playing, it should disappear off the screen.
I can play a midi with a sequencer, but have no idea of how to get the notes its playing, or when it stops playing a note.
I've looked into ControllerEventListeners and MetaEventListeners, but still don't know how to do this.
Any help would be appreciated.
That's what you should do:
You have to implement
Receiver
and thenand after that, the next method will be triggered every time an event occurs:
and if you want, you can use this class too:
This is a FAQ.
Connect you own Receiver to the sequencer's Transmitter.
See the DumpReceiver in the MidiPlayer for an example.