Based on the very useful input i have now also a solution to sync a widget value from one instance to another. Eg: the status of a Leslie Speed Switch (as displayed in the widget caption) will be synced from the Organ instance to the Main instance:
var
// Declaration of Widgets - Select and Show Presets
// IP and Port for Main and Secondary GP Instance … OSC_GetPortNumberFromTargetName
MainIP : String = “127.0.0.1”
MainPort : Integer = 54341
OrganIP : String = “127.0.0.1”
OrganPort : Integer = 54342
ShowValue : String
B3XLeslieSpeed : Widget
B3XLeslieCab : Widget
B3X_Cab_Type : String Array = [“122”, “122 A”, “147”, “3300 W”, “Studio 12”]
B3XLeslieAmp : Widget
On WidgetValueChanged (w: Widget, index: integer, Cab_Val : double) from B3XLeslieSpeed
Select
Cab_Val > 0.5 do ShowValue = “Slow”
Cab_Val >= 0.0 do ShowValue = “Fast”
End
OSC_SendStringSpecific(“/B3XLeslieSpeed/SetCaption”, ShowValue, MainIP, MainPort)
OSC_SendStringSpecific(“/B3XLeslieSpeed/SetCaption”, ShowValue, OrganIP, OrganPort)
End
On WidgetValueChanged (w: Widget, index: integer, Cab_Val : double) from B3XLeslieCab
ShowValue = MapValueToDiscreteString(Cab_Val, B3X_Cab_Type)
OSC_SendStringSpecific(“/B3XLeslieCab/SetCaption”, ShowValue, MainIP, MainPort)
OSC_SendStringSpecific(“/B3XLeslieCab/SetCaption”, ShowValue, OrganIP, OrganPort)
End
It also works with multi value switches as shown for the cabinet selection.
I also tried a shorter version using
OSC_SendStringSpecific("/B3XGAmpSelect/SetCaption", GetWidgetLabel (w), MainIP, MainPort))
but this was not working due to (timing ??) Problem - the command always sync the old/former value