Change constant cc amount to act as switch

I have a controller that sends a constant cc of 127 and I want it to switch between 127 and 0 (on/off) with each press. I’ sure MTP can do this but I can’t figure out how?

Hi,

Please find the attached. In rules, we toggle the value of global variable “ga” and then send the value on each press. In this example, I’m using CC21 on MIDI CH 1 for both input and output

Here are the rules:

// toggle value
ga=ga^1
//defalult value =0
qq=0
// otherwise send 127
if ga==1 then qq=127

My aliases are set up as follows:

You can learn more about aliases from this tutorial.

toggle-cc-2025-09-19.bmtp (1.1 KB)

Steve Caldwell
Bome Customer Care


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

Brilliant! Thanks so much Steve, I’ve been using Midi Translator pro for at least ten years and it’s a major part of my studio!

1 Like