Just figured this out.
While the event listener listens for MidiEvents, most of them are also ChannelEvents, which is an detention of MidiEvent. The ChannelEvents have the info you need to load the channels of your synth.
Here is an example in Kotlin, within the onEvent callback.
var channel = 0
if(event is ChannelEvent){
Log.i("ChannelEvent", "${event.getChannel()}")
channel = event.channel
}
if (event is ProgramChange){
synth.channels[event.channel].programChange(event.programNumber)
}
The ProgramChange event has the channel number and instrument voice to load your synth.
How to handle Pitch Bend in Event Listener?
Originally posted by @ghopretz in #25 (comment)
How to handle Pitch Bend in Event Listener?
Originally posted by @ghopretz in #25 (comment)