Referencing Widgets in Gig Script?

Hello! Wondering what the best practice is for this scenario:

Quick big picture: I have multiple instances of GP running. One of them is my main instance that I will always be viewing, the others are instances for different members of the band. Because I can really only view one instance at a time on my laptop I will be looking at my instance with their instances in the background. I want to be able to see which rackspace/variation the other players are using in my main instance. I’ve successfully got a script running in a Rackspace script that uses OSC to send Widget caption/labels and Rackspace/Variation names from a ‘player’ instance to the main ‘instace’ whenever there’s a change in rackspace/variation in the player instance. That’s all working great.

My question: is having this script live in a Rackspace script the best option? As I build up a library of different Rackspaces I will have to manually copy the script into each one. My concern is that if down the road I need to make some additions/changes to the script I’ll have to update the script into all of the variations. This doesn’t feel very efficient/foolproof.

I tried copying the script into the Global Rackspace, but of course the named Widgets are not in the Global Rackspace, they are in the Current Rackspace. Then I tried moving the script into the Gig Script and Widgets can’t be variables at that level.

Am I missing a trick? Or is the only option to keep the script at the Rackspace level?

Why do you need a script in the other instances?
Gig Performer automatically sends OSC messages when rackspaces or variations are switched.


As @pianopaul observed, OSC messages will be sent automatically. But if you need the same code in every rackspace and you want to be able to change it easily, why can’t you use the GP a script Include statement?

1 Like

I guess because I’m sending not only the Rackspace name but also the Captions from widgets from the ‘player’ instances to be displayed in Text Labels in the ‘main’ instance.

Here’s the script from the Rackspace in a ‘player’ instance:


MixerIP : String = ""
MixerPort : Integer = 54344

Lead1_Macro1_Name : Widget
Lead1_Macro2_Name : Widget
Lead1_Macro3_Name : Widget
Lead1_Macro4_Name : Widget

on activate
    OSC_SendStringSpecific("/GlobalRackspace/Lead1_Macro1_Name/SetCaption", GetWidgetLabel(Lead1_Macro1_Name), MixerIP, MixerPort)
    OSC_SendStringSpecific("/GlobalRackspace/Lead1_Macro2_Name/SetCaption", GetWidgetLabel(Lead1_Macro2_Name), MixerIP, MixerPort)
    OSC_SendStringSpecific("/GlobalRackspace/Lead1_Macro3_Name/SetCaption", GetWidgetLabel(Lead1_Macro3_Name), MixerIP, MixerPort)
    OSC_SendStringSpecific("/GlobalRackspace/Lead1_Macro4_Name/SetCaption", GetWidgetLabel(Lead1_Macro4_Name), MixerIP, MixerPort)
    OSC_SendStringSpecific("/GlobalRackspace/Lead1_Rack_Name/SetCaption", GetVariationName(GetCurrentVariation()), MixerIP, MixerPort)

on variation ( oldVariation : integer, newVariation : integer)
    OSC_SendStringSpecific("/GlobalRackspace/Lead1_Rack_Name/SetCaption", GetVariationName(GetCurrentVariation()), MixerIP, MixerPort)

This way when I’m looking at my ‘main’ instance I have text labels for each of the ‘player’ instances that update as they change their racks/variations. It’s an improvisational band so it’s useful for me to know what VST they are playing and what the parameters that their MIDI controllers are controlling.

Ah, that might be the trick I was looking for. So, each rackspace would have a simple include statement then I would store the above script in an external file. So, down the road the if I wanted to add say a 5th Macro, I could just update it in the external file. Is that correct?