Post by motmeister on Jul 4, 2018 19:46:14 GMT
Good afternoon!
Consider this code:
#Send 64 notes each time a midi note 12 is played on the keyboard
#—————————
# filter out input of any notes except midi note 12
NX 00-0B = XX +B
NX 0E-7F = XX +B
#—————————-
# ignore/block the note on for midi notes 12 and 13
90 0C-0D = 90 0C +B #block note on for notes 12 and 1
#—————————-
ASS L03 = D0 #note Length
ASS L04 = 40 #number of notes
ASS L00 = 0 0 0 #clear L00-L02
#—————————-
# clear the global note counter when midi note 13 off is received
IF M00 == 80 0D
80 0D = 80 0D +B
ASS G00 = 0
END
#—————————-
# when a midi note 12 off is received:
IF M00 == 80 0C #is the incoming midi note off 12?
80 0C = 80 0C +B #block note off for note 12
IF L00 < L04 +L #if Counter is LT L04
MAT G00 = G00 + 1 #increment global note counter
SET LB1 G00 +D #put it in label slot 1
MAT L01 = 20 + R4F #calculate Random note between 20 and 6F
MAT L05 = L00 + 1 #change Loop note counter to 1-based for Display only
SET LB0 L05 +D #put the modified loop note counter in label slot 0
SND 90 L01 6F +DL02 #send a note on with a velocity of 6F
MAT L02 = L02 + L03 #add L03 to the timer
SND 80 L01 00 +DL02 #send a note off for the same note
MAT L02 = L02 + 1 #move the timer forward by 1ms
MAT L00 = L00 + 1 #increment the Counter
END
END
I’m using it in apeMatrix. It appears this board doesn’t support image uploads, only URLs, so I’m going to have to describe what happens verbally...
Midi routing:
ApeMatrix internal keyboard ——> Streambyter
Streambyter ——> SynthMasterOne
At the start, the label slots are both “—“.
I press midi 13 (C#0 on the internal keyboard) to clear the global note counter G00.
I press midi 12 (C0) to trigger the first 64 notes.
64 notes play and the labels now show “64 64” (64 notes this pass, 64 notes total).
I press midi 12 again to trigger 64 more notes.
64 notes play and the labels now show “64 128” (64 notes this pass, 128 notes total)
The third time I press midi 12, the labels show “1 129”.
It’s clear to me that I have hit that runaway ceiling of 128 loop iterations, but I don’t understand why. I left the loop AND the pass through the code in between presses of midi 12 on the keyboard. Shouldn’t the runaway limit be reset? Am I missing something? I ALWAYS appreciate your help.
Dennis
Consider this code:
#Send 64 notes each time a midi note 12 is played on the keyboard
#—————————
# filter out input of any notes except midi note 12
NX 00-0B = XX +B
NX 0E-7F = XX +B
#—————————-
# ignore/block the note on for midi notes 12 and 13
90 0C-0D = 90 0C +B #block note on for notes 12 and 1
#—————————-
ASS L03 = D0 #note Length
ASS L04 = 40 #number of notes
ASS L00 = 0 0 0 #clear L00-L02
#—————————-
# clear the global note counter when midi note 13 off is received
IF M00 == 80 0D
80 0D = 80 0D +B
ASS G00 = 0
END
#—————————-
# when a midi note 12 off is received:
IF M00 == 80 0C #is the incoming midi note off 12?
80 0C = 80 0C +B #block note off for note 12
IF L00 < L04 +L #if Counter is LT L04
MAT G00 = G00 + 1 #increment global note counter
SET LB1 G00 +D #put it in label slot 1
MAT L01 = 20 + R4F #calculate Random note between 20 and 6F
MAT L05 = L00 + 1 #change Loop note counter to 1-based for Display only
SET LB0 L05 +D #put the modified loop note counter in label slot 0
SND 90 L01 6F +DL02 #send a note on with a velocity of 6F
MAT L02 = L02 + L03 #add L03 to the timer
SND 80 L01 00 +DL02 #send a note off for the same note
MAT L02 = L02 + 1 #move the timer forward by 1ms
MAT L00 = L00 + 1 #increment the Counter
END
END
I’m using it in apeMatrix. It appears this board doesn’t support image uploads, only URLs, so I’m going to have to describe what happens verbally...
Midi routing:
ApeMatrix internal keyboard ——> Streambyter
Streambyter ——> SynthMasterOne
At the start, the label slots are both “—“.
I press midi 13 (C#0 on the internal keyboard) to clear the global note counter G00.
I press midi 12 (C0) to trigger the first 64 notes.
64 notes play and the labels now show “64 64” (64 notes this pass, 64 notes total).
I press midi 12 again to trigger 64 more notes.
64 notes play and the labels now show “64 128” (64 notes this pass, 128 notes total)
The third time I press midi 12, the labels show “1 129”.
It’s clear to me that I have hit that runaway ceiling of 128 loop iterations, but I don’t understand why. I left the loop AND the pass through the code in between presses of midi 12 on the keyboard. Shouldn’t the runaway limit be reset? Am I missing something? I ALWAYS appreciate your help.
Dennis