How to have 1 button change the midi assignment of another control

Could someone help with some direction of where I should look on how to achieve this:

On VSN1, I want to have the encoder configurred to Ch1, CC30 / Name “P1: Tune” under normal conditions, but
When Button1 (momentary) is pressed, and held:

  • The midi output for the Encoder changes to Ch1, CC31 / Name Changes to “P1: SnrTune”
    When the Button is released:
  • The midi output for the Encoder reverts to to Ch1, CC30 / Name Changes to “P1: Tune”

I’m happy to reverse engineer from another solution, just looking for guidance on the best way to achieve this.

thx in advance Steve

Whoops…just looked through the other posts, and I think I see an intech video explaining this…testing now…

Ok - thanks for this video (https://youtu.be/RAby_Qoq-SQ?si=sH8Jw7vEoAVpmu--)

Got me most of the way there, but not quite.

I set the default CC = 40 via self.cc = 40,

I can check the encoder sends on cc=40, then when I press the button 1, it changes to cc41 as expected, but it does not change back to cc = 40 when toggling off on the button (ie it’s not executing the Else part of the code). This is my code on the button:

Have I done something wrong?

image

Here’s the rest of the button set-up…

I’m on a VSN1R with encoder, rather than the potentiometer used previously in the video…not sure it makes a difference.

I ended up having to re set-up the config for this, and now I can’t even get it to change to 41 (from 40), let alone back again. Not sure what is different, it looks like exactly the same set-up…to me!

Well this is a harder topic to go into, but generally the solution in the video is a good example but not a great real-world use-case.

It’s not great for a real usage because the switch between the two CCs will not reset the stored value of the Encoder/Endless, so the values will keep jumping after a switch.

You can circumvent that by using Relative Mode on the Endless/Encoder.

And by watching the video and doing the same thing as you did I can confirm that the code shown there doesn’t really work like that anymore.

I would do the following in your case instead:



This will result in a Relative Mode encoder switching between CC40 and CC41 when you press the button.