How to preselect songs while playing (TouchOSC)

I’ve noticed that I couldn’t easily find how to make Gig Performer send out the song names of the setlist so I’ll summarize it here:

Built-in way
If you’re fine with the port and IP address defined in the global settings this script is the easiest (learned from @pianopaul some time ago. Put it into your desired callback, for example when the setlist or song changes):

    OSC_SendStringSpecific("/SetList/GetSongList","","127.0.0.1",OSC_GetGPListeningPort())

It uses the integrated OSC functions listed here: https://gigperformer.com/docs/GP4UserManual/osc-messages.html

Custom way
If you need more control over the ports, addresses, strings and so on, you can read and send the songs names this way (inside a callback) and also clear the remaining slots:

    var i : index = integer
        For i = 0; i < GetSongCount(); i = i+1 do // Sends out the song names with their index attached
            OSC_SendStringSpecific("/SongName"+i,GetSongName(i),DestinationIP, DestinationPort)
        End
        For i = GetSongCount(); i < 80; i = i+1 do // clears the empty ones at the end of up to 80 slots for example
            OSC_SendStringSpecific("/SongName"+I,"",DestinationIP, DestinationPort)
        End

Please replace “DestinationIP” and “DestinationPort” with your individual settings.

For TouchOSC see also New version of TouchOSC with scripting apparently

1 Like