Post by redheronmusic on Jan 13, 2023 1:46:36 GMT
So we want some panic code to loop through 88 notes and 16 channels, sending note off.
This should work
If M0 == F0 7D 01 0E #
If QE == 1 # only execute for on action
Ass Loop1 = 0
While Loop1 <= F
Mat Temp = 80 + Loop1
Ass Loop2 = Note_min
While Loop2 <= Note_max
Snd Temp Loop2 00
Mat Loop2 = Loop2 + 1
Mat Loop1 = Loop1 + 1
But, it alternates between sending 88 notes for one channel, then 40 for the next. Cannot find any logic error in the code.
Appears the 128 loop infinite safety counter is not getting reset.
Fortunately, in this instance, we can loop for all 128 MIDI note values, and align the infinite loop safety with our next channel, but this may not always be the case.