Internally Routed OSC?

Is it possible to route an OSC message from GPScript back to Gig Performer? I’m trying to set a global widget value on Song Change, i.e.:

On Song(oldSongIndex : integer, newSongIndex : integer)
OSC_SendIntegerSpecific("/GlobalRackspace/PART1", 1, "127.0.0.1", 54344)
End

I can’t address the widget directly in a gig script.

Yes, you can. I usually use the function to get GP’s listening port, rather than hardcode it: OSC_GetGPListeningPort()

Widgets are floats/doubles, so I wouldn’t send integers. Also, the widget settings will show the full address - you are missing the ‘SetValue’:

On Song(oldSongIndex : integer, newSongIndex : integer)
    OSC_SendDoubleSpecific("/GlobalRackspace/PART1/SetValue", 1.0, "127.0.0.1", OSC_GetGPListeningPort())
End
1 Like

Thanks @rank13…that’s a great tip about the listening port.

1 Like

You can also have the script send midi messages to the internal “Local GP Port” to achieve a similar outcome (e.g. the widget would be midi learned to this message).

1 Like

The use case seems interesting to me, could you elaborate a bit about your use case? What are you trying to achieve, some kind of variations in the Global Rackspace?

I *thought I had a specific use case scenario for this workaround for my customization of @rank13’s Quantized Song Part gig file: Synchronized Ableton Scenes/GP Song Parts with Auto Advance

I was not getting the song part to reset at index 0 after a song change or so I thought. As it turns out, it was resetting in GP, but because I didn’t have my Ableton scenes correctly named to mimic the song parts, when I would switch songs it would play the last triggered Ableton Scene. This is because it couldn’t find a correct matching OSC address and as such, it would trigger the global playhead and Ableton would start playing the last active scene. Once I corrected the scene names to match my part names, all was working as expected.

Nevertheless, it’s always nice to learn that something can be done, even if doesn’t yet need to be done for my use.

2 Likes