changing MIDI channel from onTimer / Filling MessageHolder from eventId
-
I'd like to set the MIDI channel of a Synth.playNote in onTimer. It seems I need to use Message.setChannel to do so, but with only the eventId there doesn't seem to be a way.
The Message methods seem similar to Kontakt variables like $EVENT_ID, but instead of having a specific variable that gets auto-filled, a method returns the right value for the callback we're in. Is there a way to peek directly at the objects the Message functions are getting values from? Can you fill a MessageHolder if you only know the eventId? Is there even a point in doing so outside an onNoteOn or onNoteOff callback?
I noticed playNote is fixed to channel 1, while other related commands accept a channel. Maybe I'm going about it the wrong way and should just do a PR to add playNoteWithChannel?
-
@Simon said in changing MIDI channel from onTimer / Filling MessageHolder from eventId:
I'd like to set the MIDI channel of a Synth.playNote in onTimer.
Use
Synth.playNoteWithStartOffset();
-
@Simon As usual I found that right after asking :D The lack of a channel parameter in playNote definitely threw me off.