Toggle MIDIMix LEDs In Single Translator

I realize LED toggles are a popular topic around here, but I can’t seem to find what I’m looking for: I want to toggle the LED state of the Note pads on my Akai MidiMix, ideally with a single translator.

While this can be done with a simple ga=ga^127 rule for each individual button on the device, is there any way to do it within one translator? If not, I don’t mind setting it up the tedious way :smile:

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
1 Like

Definitely wouldn’t have thought of that. It works, thanks!

Would you be able to do a Momentary version too? I found a way to do it, but again, only the long way with many translators.

Also, would it be too complicated if the Mute bank was momentary and the rest were toggles? If so, I already have a working solution that combines the one you just gave me and 8 individual buttons mapped to Mute.

For an all momentary version, you simply need to have no translators and add a MIDI route from and to MIDIMIX since they are already Momentary.

You could also add a blocking translator with an incoming action of any CC on any MIDI channel with an outgoing action of none so that the knobs and faders don’t loop back to themselves.

Exclude the note numbers your Mute Bank uses from the existing translator.

if pp==1 then exit rules, skip outgoing action
if pp==4 then exit rules, skip outgoing action
... and so on

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Awesome, thanks so much!