An OSC 'SwitchToRack' question

Hi all,

I have been re doing my setup with the new TouchOSC app (which is a vast improvement on the last version). And I’ve managed to do most of the things I wanted to do thanks to the time savers in GP4 and the hive mind here, but I am stuck with one small (easy?) thing…

I have used the ‘pager’ control in touchOSC and assigned the /GigPerformer/SwitchToRack OSC function to it, which works a treat when operating it from the iPad. Switching the page, switches the rackspace in GP and displays all of the relevant controllers for that rackspace etc.

However, I also use a footswitch to change the rackspace via MIDI PC messages when my fingers are busy. But the pager control in touchOSC doesn’t change with it… which it’d be nice if it did!

So presumably the /GigPerformer/SwitchToRack command isn’t bidirectional or perhaps its not as simple as all the widgets that just work? So I assume I’d need a script to do this that says something like; when receiving MIDI PC change x, send /GigPerformer/SwitchToRack message to touchOSC…?

Sorry if this is a simple one that I should know, It’s the first script I’ve needed in this version of GP (my last one needed loads that I copied from here without properly understanding!). So my scripting ability has probably diminish since then I’m afraid!!

Thanks for your help.
Tim

Do you have an OSC monitor to check which OSC messages are sent? We have a few references here:

I’m using Hexlers Protokol and as you can see, the message sent from touchOSC using the ‘SwitchToRack’ (first image) does not get sent from GP (second image) when switching rackspace… only the rackspace name (halfway down the list) and all the widgets.

That message is a command to Gig Performer to switch to another rack. The message is not echoed nor should it be. The response is the indeed supposed to be the new rackspace name and updated widgets.

Did I miss something?

The feature request to add a new response message when the rackspace is changed, that sends out the current rackspace index.

/CurrentRackspaceIndex Index (Integer)

Is that in our tracking system?

I will add it.

2 Likes

Ok, I thought you’d say something like that…

So is there a way to script this response? Or should I go about this a different way?

Yes, you could use GP script to create your own OSC message that sends out the rackspace index.

What does this accomplish? If you send out a “SwitchToRackpace”, you get back the new info (name, widgets) – why is this necessary?

When you’re also using a midi controller to change rackspaces, but still want your OSC app/device to be in sync and reflect the current rackspace in whatever selection widget you’re using.

@TimHartnell add this as a Gig script (Window > Show Gig Script Editor). Update the IP and Port variables to what you need.

// Called when you switch to another rackspace
On Rackspace(oldRackspaceIndex : integer, newRackspaceIndex : integer)
    Var osc : OSCMessage
        ip : String = "127.0.0.1"
        port : Integer = 8000
    OSC_SetAddress(osc, "/CurrentRackspaceIndex")
    OSC_AppendIntArg(osc, newRackspaceIndex)
    OSC_SendSpecific(osc, ip, port)
End

It does that - it sends the rackspace name

That doesn’t help if you have a numerical rackspace selector widget and you want it to reflect the rackspace number.

And if you move a rackspace position? I don’t think we send a notification for that via OSC and so that would mess everything up

I think that would be the same issue with re-arranging songs. User beware.

1 Like

The ‘pager’ widget in TouchOSC can add some nice flexibility in having dedicated widgets per rackspace, if that’s what you need. Having the rackspace index sent back to it just makes sure you’re always in sync, regardless of how you change rackspaces (osc app or controller).

TouchOSCpager

Yes that’s exactly what I’m doing… Just tried your script, but it still isn’t working for some reason…

Do you have any other controls that are updated by messages from GP?

I’m just trying to pinpoint whether it’s something just with the script, or whether you can’t get any messages sent by GP to be received by TouchOSC.