Quick Sign In:  

Forum: General Discussion

Topic: Script question, can I 'sync' pad pages between controllers?
I want to switch between pads on 2 controllers at the same time. I'm trying to set an action on my "Hotcue_mode" button that will set a variable '%HotCueMode' to '1', and that will be later be read by second controller to change the pad mode. I also have a second "Sampler_Mode" button that will set the '%HotCueMode' to '2'.
I got this setup and tested and it works, in that in my var_list I can see %HotCueMode change between 1 and 2 when I press the corresponding buttons.

Sampler_Mode Button Code
pad_pages 2 ? shift : pad_pages 2 & set '%HotCueMode' 2


On my second controller, I have a button set up, technically a 'Bar CC', called PMXSampleMode, and I have attempted the code

var_equal "%HotCueMode" 1 ? pad_page 1 : pad_page 2


and I also attempted

var_equal "%HotCueMode" 1 ? pad_page 1 : "%HotCueMode" 2 ? pad_page 2


With no success. Am I approaching this correctly. Can I change pad_pages with a simple variable read? The second controller is a virtualController through LoopMidi. I'm writing the controller definition and mapper myself so I can add midi attributes if needed.

Any help is greatly appreciated.

Please and Thank You

Dwaynarang
 

Posted Sun 07 Jan 24 @ 4:54 am
locoDogPRO InfinityModeratorMember since 2013
you're setting '%HotCueMode' but trying to read a var called "%samplemode"
 

Posted Sun 07 Jan 24 @ 5:01 am
Thanks for the quick reply. Fixed the variable reference, but still not working yet. Is this a valid approach though?
 

Posted Sun 07 Jan 24 @ 5:18 am
There are some limitations in what you're trying to do.
Since pad_pages are best to be independent between different controllers (e.g. one controller having it's pad page set to hotcues while a second controller having it's page set to sampler) you cannot control the pad page of one controller from another, unless you "force" all pad pages to become one, which IMHO defeats the purpose of having multiple controllers connected.

The only exception on this, is that by default the skin and the "first/primary" controller pad pages are linked together. So, you can change pad pages on skin/GUI and your controller will follow.
But it you select to have them operate independently from each other, then you need to use the actions that will change pad pages on the device you want them to change.

So, generally, it is possible to control pad pages via script, but due to some "limitations" it needs to be done on the device you want the change to happen.
 

Posted Mon 08 Jan 24 @ 7:13 am