Send Midi note/cc to toggle controller LED on bypass?

With Bypass mapped to a Midi controller button: I’d like the LED on that button to turn on or off accordingly. The button matrix would light up and nicely reflect the current state of the preset.

  • send a preset Midi message (note or cc) back to the controller when bypass is toggled OFF by a button press, to turn LED on
  • and a different message when turned ON, to turn the LED off again

Is this possible? I tried looking in the forum threads, and various posts touch upon sort-of similar issues, but as a beginner I’m not quite able to figure it out. The controller I wish to use is a Machinewerks CS X51, but I guess this would apply with other devices too.

Hey, @johanw, a patch I recently put up here does effectively that (but with a bit of extra fanciness).

That patch is for a Novation LXCL: a controller that responds to sending the same note/cc id back with different velocities/values to give different colours. Your patch will be much simpler, I think, as that one colours the LEDs according to the velocity slider. You just want On/Off.

So your first task is to find out what you need to send to your CS X51 in order to turn on a given LED.

(should be) All very doable; let us know when you’ve found out what to send back to Machinewerks

1 Like

Hi @resonotter, thanks a lot! This sounds like the device is going to be usable indeed.

The default setting for the buttons on CS X51 is to send note on/note off. Pressing the topmost button sends note 60 with velocity 127 when pressed, and note 60 with velocity 0 when released. (I should note here that my Midi knowledge is not deep, but at least this is visible in the Midi monitor.) Looking at your patch, the following is a first step:

With a pipe that takes Midi in and immediately sends it back out, the buttons light up as long as they are held down. Adding a filter to block Note off, the buttons stay lit after being pressed. However, toggling on gets me only halfway there :grinning: Perhaps this is what’s been discussed in this thread. Did you solve this kind of problem in your patch?

EDIT – user error alert! It turns out that contrary to what I was thinking, the CS X51 editor does in fact work, and with toggle functionality. I’ll proceed from here, and report on progress :slight_smile:

I’m glad about that because getting Midihub to turn a Momentary into a Toggle is decidedly tricky!

So when you send note 60 @ velocity 127 back to CS X51 does the correct button light up?
If so you’re set with just a X51_InX51_Out, aren’t you? (Add a velocity Rescale to get them to slow-flash.)

1 Like

I love this. For once, my gear works as intended :slight_smile:

  1. In the CS X51 editor, set the button to use CC instead of Note, both for output (“BUTTON”) and input (“LED”), and toggle = on,
  2. In the Midihub editor, add the pipe you wish to toggle and map Bypass to the button,
  3. and add a Rescale pipe after the pipe: Kind = CC, and set In Low = 0, Out Low = 127, In High = 127, Out High = 0.

Now the button light turns on when the pipe is active, and off when bypassed. Great.

The only issue here is that all other CC’s are also inverted. This can be fixed by setting Id in the Rescale pipe to the CC of the button. But then, there’s 24 buttons … my guess is that a “virtual” pipe and filters will help with this.

1 Like