MIDI remote API / Is it possible to create parent subpages?


let’s assume I want to switch functions between encoders and faders.

This is what the current code regarding the host-binding sort of looks like:

page.makevaluebinding(pushencoders, abc.mValue.xyz).setSubpage(xyzControl);
page.makevaluebinding(faders, def.mValue.uvw).setSubpage(uvwControl);

I want to make the faders control the values the pushencoders are currently controlling and the other way around, so the code changes to:

page.makevaluebinding(faders, abc.mValue.xyz).setSubpage(xyzControl);
page.makevaluebinding(pushencoders, def.mValue.uvw).setSubpage(uvwControl);

The ‘setSubpage’ part has to be exactly the same in both examples, that’s a given.

I want to make the whole thing switchable, let’s assume a function for that is already existent.

Now, it would be convenient if I could create a parent subpage that contains the already set subpages, something like:

page.makevaluebinding(pushencoders, abc.mValue.xyz).setSubpage(xyzControl).setSubpage(fadersInControl);
page.makevaluebinding(faders, def.mValue.uvw).setSubpage(uvwControl).setSubpage.(fadersInControl);

page.makevaluebinding(faders, abc.mValue.xyz).setSubpage(xyzControl).setSubpage(pushencodersInControl);
page.makevaluebinding(pushencoders, def.mValue.uvw).setSubpage(uvwControl).pushencodersInControl);

Subpages ‘fadersInControl’ and ‘pushencodersInControl’ would be the parent subpages in that example.

When switching between subpage ‘fadersInControl’ and ‘pushencodersInControl’, subpages ‘xyzControl’ and ‘uvwControl’ should be activated as well.

If I program it like above in the 3rd code example, only one subpage area is activated.

Is that the general rule, is it always following the MacLeod principle ?

Or is it possible to create a parent subpage in any other way ?


You can make the custom variable.

Or you can make a subPage for both options. If you are in subPageA, the Encoders control Pan and the Faders control Volume. If you are in subPageB, it’s the other way around.

Or do you search for a global settings, something like Mackie Control Protocol does?

Hey Martin,

thanks for your reply.

Triggering a second subpage via a customValueVariable triggers that subpage but deactivates every other subpage, hence my fear that there can be only one subpage activated.

Your subpageA / subpageB suggestion unfortunately is not possible while maintaining the subpages ‘xyzControl’ and ‘uvwControl’ in my 2nd code example. Those subpages would have to be activated together with the subpages A/B.