I am configuring a Midi Keyboard and am building a control grid the same width as the number of keys (starting at note 0). Using midi 16,69, I would like to control whether the keys latch, or work in piano mode.
I tried this :
switch(midi.control(16,69),0,midi.note(1,x+1),toggle(midi.note(1,x+1)))
But for some reason when midi(16,69) isnt 0, it still wants to function like a toggle.which is weird. Plus the values persists.
I then tried this
switch(midi.control(16,69),0,midi.note(1,x+1),latch(midi.note(1,x+1),midi.note(1,x+1)))
Which almost works, but the values persist from even when it's not latched, so any key I've touched is lit with it's last value
Anyone have any ideas on how to accomplish this so when I toggle on the latch key the source isn't activated by default?