I’m confused on doing DO–WHILE:
I have an incoming trigger: basically any Note Off in Note Range (so, any 87 pp qq where pp is in my 16 note grid).
Because: reasons, I determine row (0, 1, 2, 3) and column (also 0, 1, 2, 3). Only dealing with one column at a time, because there’s other logic for Rules on other columns, just dealing with Column 0 at this point.
So basically I’m looking at pp which is the Incoming Note #, vv = Row # (used for toggling the on/off bit). I’m sending out an update back to the Controller, and sending a CC event to the sequencer. H9 is the “on” value for the button Controller LED colour and H0 is the “off” value for the button Controller LED colour.
So for the counter for a loop I need to set an initial value, and then while in the loop I need to increment it, and test to see if I stay in the loop or break out. ThIs is where I get confused in MTPro because I think I’m not getting the parallel vs linear processing difference, or I’m a bigger idiot than I previously assumed. heh No matter where the counter increment is in the Translator, it will get incremented, right?
I’m coming in with a value vv that indicates the starting Row (offset) for the incoming Note Event which indexes the toggle bucket (vv=bit offset for the bitwise toggle thingie). So I want to initially set the counter to be the same as vv, and then cycle through the 4 offset values (0, 1, 2, 3)
(where vv=existing Row Offset variable of values 0,1,2,3; note offset=variable from 0-15 indicating which specific button; toggle value=extracted bitwise value of 0 or 1 based on if it is on or off); NOTE: I need to update all 4 buttons because the column works as one ‘unit’ – not all buttons are independent. That is, if button in Row 0 is pressed while Row 3 is playing, then Row 3 turns off. Also, if Row 3 is playing, and Row 3 is pressed again, it turns off
Sorry, I’m a pseudocode whore…
{counter}=vv
{counter}={counter}+1
if {counter}>3 then {counter}=0
if {counter}=vv then Exit/Execute
Outgoing:
97 {60+note offset} {(toggle value*difference between on/off values)+off value}
B0 {40+note offset} {126-(toggle value*126)}
This is just a tiny bit of the whole project and all 4 columns do not operate the same way. It’s really beyond my understanding, but I need to make this thing do those things because: reasons. heh
in my example, will that basically cycle through all 4 values? I’m lost at when I can define the initial value of the counter and keep that outside of the loop.