Issue with OSC from local to global rackspace

I am having issues with the connection from the local Rackspace to the global Rackspace using OSC, and I suspect that there is a bug.

Goal: When I switch the Rackspace, I want the StreamingAudioFilePlayer to select a corresponding track that has the same name as the Rackspace. For example, local Rackspace Demo selected → OSC → Global Rackspace → SAFP → track Demo selected.

In principle, this works with a bit of scripting. However, the whole thing is not stable. Sometimes it works and sometimes it doesn’t.

Included is an example where it doesn’t work. I hope it is reproducible. GP sends out the OSC, as seen in Wireshark, but nothing is received in the Global Rackspace.

To make it work, press the button next to the text “Arturia”, save the gig file, close GP(!), and open it again.

I’m sorry that I couldn’t find a smaller example file, but the whole thing is quite shaky. Even small modifications can make it work again, but as the file gets larger (more Rackspaces loaded), the chance increases that it won’t work anymore. This is the smallest example I found.

And for the records: GP 5.0.9 , MacBook M1Max and Studio M1Max, Sonoma 14.5

PossibleBug.zip (850.5 KB)

It seemed to work ok for me. But you don’t need to use OSC at all. The global rackspace script can use the On Rackspace callback, which means you can remove all of the local rackspace scripts and just use this in the global rackspace script:

// Called when you switch rackspaces
On Rackspace(oldIndex : integer, newIndex : integer)
    set_track (GetRackspaceNameAtIndex(newIndex))
End

Edited to remove my mistake.

There is nothing wrong with that script - to what error are you referring?

The phrase “and not found” that I highlighted in red.

Edit: Ah sorry, I wasn’t looking close enough. Please ignore.

Two Boolean operators and a Boolean variable, but it looked like a misplaced phrase in the middle of the code… funny… :stuck_out_tongue_winking_eye:

Why did I miss that? It does exactly what I want. Thanks.