THank you
I’m developing a chord-building system where individual notes are entered sequentially. Only note-on messages are passed through, allowing me to audition and sustain the chord as it’s being constructed. Once I’m satisfied with the chord, a global note-off message is sent to release all notes.
Additionally, I’ve implemented a trigger that replays the full chord: it sends a combined note-on/note-off message containing all stored variables, enabling me to recall and play the entire chord with a single input. This functionality is already fully operational.
My next step is to add an “undo” button, allowing me to remove the most recently entered note from the stored chord before committing or replaying it.
I use this first translator to store the last used variable into zz
tt=0
if ha==-1 then Goto ‘found’
tt=1
if hb==-1 then Goto ‘found’
tt=2
if hc==-1 then Goto ‘found’
tt=3
if hd==-1 then Goto ‘found’
tt=4
if he==-1 then Goto ‘found’
tt=5
if hf==-1 then Goto ‘found’
tt=6
if hi==-1 then Goto ‘found’
tt=7
Label ‘found’
// determine which value to populate
if tt==1 then zz=ha
if tt==2 then zz=hb
if tt==3 then zz=hc
if tt==4 then zz=hd
if tt==5 then zz=he
if tt==6 then zz=hf
if tt==7 then zz=hi
if tt==8 then zz=hj
I use a second translator that simply send the “zz” variable as a note off message to cancel the last note
the above 2 translators are already working
Where it gets tricky is that I am looking for the undo button to work decrementally when I press it more that once, so if last variable stored is hc, I want to undo hc with the first press, then undo hb with the second press, then undo ha and make zz=-1 with the third press
I also made a third translator to turn the current zz variable into -1 everytime I press the undo button to “empty the variable”
if zz==ha then ha=-1
if zz==hb then hb=-1
if zz==hc then hc=-1
if zz==hd then hd=-1
if zz==he then he=-1
if zz==hf then hf=-1
if zz==hi then hi=-1
if zz==hj then hj=-1
I am hitting a wall now with the decremental function