Regarding the Global State On Rackspace callback function - is the function executed after the new rackspace has been activated and its respective widgets initialized, or, is it called prior to the new rackspace activation?
Where in this series of events does the callback function get executed?
This solution does work but it raises an interesting question with how to handle different MIDI devices that might be introduced through Rig Manager and selecting a different rig. Instead of sending MIDI control messages directly to the device (e.g. nanoKONTROL2) it might be better to send values to the widgets in the de-activated rackspace in the hope that those widgets are still in a state where they can send the CC message to the mapped device.
Yes - it works! So on the rackspace de-activate callback function I simply turn the button widget off. I also have set the button widget to use its default value on rackspace activation if the default button state is “on”.
Well… mostly works. On two back to back rackspaces with multiple variations each, sometimes the 4th button has an intermittent issue getting the correct lit state. Must be a timing issue because I haven’t found a consistent pattern.
If the ‘Sync’ feature works for your controller, then I’d definitely recommend just adding widgets in every rackspace, rather than chasing down issues with callback timings.
I’m leaning towards that solution. Someone suggested a feature for hidden widgets that could only be seen in edit mode. That would be ideal in this situation.
The hidden widget feature works great in 4.5! This has solved all the problems with resetting the nanoKontrol2 button state when changing rackspaces. I have removed all the custom scripts.