Hi,
The following will do the trick, the translators in preset 0 are just housekeeping translators. The single translator for this project is 1.0 (Preset 1 translator 0)
I used the global variable g0 to keep the current state of all LED’s in a bitmap.
I shift the bit into to position then toggle it. Then I read the bit back and send it. I ignore the Solo button as it just functions to change the values that the mute/solo buttons send.
I set up preset 0 translator routing to and from MIDIMIX.
For more information about device selection, see this tutorial.
I don’t put any MIDI thru path so knobs and faders will do nothing but you could add that path if you would like. You might want to also determine if you want to send the MIDI messages elsewhere with either a thru path, another translator (with different routing) or both.
Here are the rules:
// ignore solo button toggle
if pp==0x1b then exit rules, skip outgoing action
// get current state from bitmap
// shift note number
tt=1<<pp
// toggle it
g0=g0^tt
// now place the bit
rr=g0>>pp
rr=rr&1
if rr!=0 then rr=127
Log "Log value of g0=0x%04x g0%"
MIDIMIX-toggle-LEDs.bmtp (2.0 KB)
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz