Generic Midi: How to toggle over certain value?

I am just getting started with companion and the generic midi module. It works great! I use it with vvvv to map to parameters. For the midi port I just LoopBe, which works great as a virtual port.

Since I want 2 way communication, I have enabled the Feedback option for a button like so:

If I send a value of 127 it works and switches.

But how can I set it so that it switch when it is OVER a certain value, say 64 and more. Do I use variables for that? I didn’t see anything that immediately jumped out as a solution. Intuitively it would just be “> 64” with variables enabled, but that doesn’t work.

Thanks for any hints.

Hello;

Thank you for your question - the answer isn’t as easy as you might expect, but it’s certainly doable, and ultimately more flexible, since it uses a trigger instead of a feedback.

Basically, create a trigger where the Event is “On Variable Change”, and the Variable is “Is a MIDI Message incoming?”
Then, create 4 conditions, each on being the internal condition “Check boolean expression”. Make one for the message type (cc in your example), one for the channel, one for the controller number and lastly one for the value, in this case > 64.
Then add your action, which can just be a simple button color change, or any action you like!

Let me know if you have any questions!

1 Like

Thanks for getting back with a solution. Admittedly, it’s not a simple solution, especially if I want that behavior on a lot of buttons, as I would need 1 trigger for every button, which would become unwieldy quite quickly I imagine.

Maybe the Feedback value field could get support for expressions, so that we could just have a > and a value for example.

To explain, I am using these midi buttons in vvvv (I actually made a short video about how easy it is to use the Streamdeck with vvvv using Companion: https://www.youtube.com/watch?v=qPGjBehMlfc). There all Midi values are remapped to a float of 0.0 to 1.0. Since buttons are usually a boolean value, that is usually represented by any value above 0.5 = true. Therefore it would be great to show any Midi value above say 64 to showing the activated state.

I could also imagine where I would want to show different colors depending on a value, say 64 - 80 = green, 81 - 100 = yellow, 101 - 110 = orange and 111 - 127 = red. It seems like this also would not be possible easily right now. This again would be great to be able to just enter an expression like “64 < 80”.

Thanks for considering!

Here’s a simpler solution. No need for triggers, and easy to copy.

1 Like

Thanks, Andy, that looks like exactly what I was hoping for :slight_smile:

1 Like