Sweet… thanx! I have it all written. Perfectly displays what I want in a Print() command to the logger. Now, since the Song() callback can only exist in the Gig Script, how do I update Global Rackspace TextLabel label? Widget variables are not allowed in Gig Scripts.
Thinking out of the box for a second. Set a globally visible variable in the Song() callback, and let the label widget display that global variable value?
If you already have other global rackspace labels based on the current song’s key (from system actions), then you can use a global rackspace script and changes in the system actions label to trigger the update of the next song key signature:
Give the label widgets the below handles.
Var
THIS_SONGKEY, NEXT_SONGKEY : Widget
On WidgetValueChanged(newValue : double) from THIS_SONGKEY
If InSetlistMode() Then
NEXT_SONGKEY.SetWidgetLabel(GetSongKeySignature(GetCurrentSongIndex()+1))
Else
NEXT_SONGKEY.SetWidgetLabel("(Not setlist mode)")
End
End
Try this, just a proof of concept GlobalOSC.gig (36.5 KB)
And this is the rackspace script
var BUTTON : Widget
mOSC : OSCMessage
// Called when a single widget value has changed
On WidgetValueChanged(newValue : double) from BUTTON
OSC_SetAddress(mOSC, "/GlobalRackspace/GLABEL/SetCaption")
if newValue == 1.0 then
OSC_AppendStringArg(mOSC, "On")
else
OSC_AppendStringArg(mOSC, "Off")
end
OSC_SendSpecific(mOSC, "127.0.0.1", OSC_GetGPListeningPort())
OSC_ClearArgs(mOSC)
end
Thank you both. Regardless of which solution I used, I learned new things with these snippets. I just implemented the OSC solution in another task. Thanx Paul.