re: I don't know of any way to have that button pass something to my SB code?
The G array is common to both input and output modules. In the output module, capture the button value and store in a G memory location, such as G00. Say value 0 = preset A, value 7F = preset B. In input module, use the G00 value to determine which preset is currently displayed, send those values to the layout, discard the others.
re: don't understand other suggestions.
Lets look at the duplicate set of controls version in more detail
in relationships / other, we have ability to turn on/off MIDI receive and transmit for a control, using another control. In this case, we want a set of controls to only RECEIVE or TRANSMIT when the specific preset is selected.
Make a Preset A button, toggle, no midi receive (going to control it with a supercontrol, and don't want it getting out of sync with its supercontrol)
Build your set of controls for Cc 1-13.
In each of these controls, under relationships tab, for both MIDI Enable and MIDI Receive Enable, select the preset A button. (This completely disables the control unless the preset button A is active.)
Duplicate the page
On the duplicate page, change the Preset A label to Preset B. Check that all controls now have the Preset B button selected for MIDI Enable / MIDI Transmit Enable.
In another convenient location, add a Preset Selector Button A/B, make supercontrol, make the Preset A & Preset B buttons above subcontrols.
We need a unique MIDI message to allow SB to select between the presets on receive. Lets use F0 58 58 00 xx F7, a synthetic SysEx message, where 00 = Preset A, 7F = Preset B. We could use a Cc, but you never know when a Cc will be used by another device somewhere in your rig. 58 58 is a header that no other known device should use, 00 is our first unique message, xx is the MIDI value we are switching on 00 = A, 7F = B.
So in the Preset A/B button, assign MIDI value SysEx, 58 58 00 V, MIDI off 0, MIDI on 127
So now in your inbound SB code
- before sending the Preset A values, SND F0 58 58 00 00 F7
- before sending the Preset B values, SND F0 58 58 00 7F F7
Test work to this point. Hopefully:
- the SB code properly populates the preset settings to the correct control
- operating the current preset A/B controls should send MIDI to the device, the unselected set of controls should do nothing.
Once this is working, we can go to the next step of moving the controls into panels, using show / hide to only show the active preset, etc.