MIDI In Split does not work after overriding on note event

Hi, I’m using gig performer MidiIn to split sounds.
I’ve also manually mapped note events that change variation through the note event callback.
The sound works and the variations change, *but the split configured on the MidiIn block is ignored. Below is my sample code

omni : MidiInBlock
omni1 : MidiInBlock
omni2 : MidiInBlock

On NoteEvent(m : NoteMessage) from omni

If GetNoteNumber(m) in [0..11] Then
	   GetNoteNumber(m) == 4 do SetVariation(0)
	   GetNoteNumber(m) == 5 do SetVariation(1)
	   GetNoteNumber(m) == 6 do SetVariation(2)
	   GetNoteNumber(m) == 7 do SetVariation(3)
	   GetNoteNumber(m) == 8 do SetVariation(4)
	   GetNoteNumber(m) == 9 do SetVariation(5)
	   GetNoteNumber(m) == 10 do SetVariation(6)
	   GetNoteNumber(m) == 11 do SetVariation(7)


How can I resolve this?

Use SendNowRespectingParameters


If you would slightly modify your callback as On NoteEvent(m : NoteMessage) Matching [C-2..B-2] from omni, you shouldn’t have this issue anymore and it would also avoid you an If statement for each note out of this range and of course a callback called when not necessary.

And by the way, welcome to the GP community forum :wink:

1 Like

Oh thank you very much, that’s elegant.
And sure, looking forward to learning more!!

1 Like