Hi, in Lemur you should use a switch and not a pad because a switch stays on when pressed, when you press again it is off.
Then thr switch sends and osc message to switch the rackspace, this is already running you said.
In gigperformer scripting you should use the on Deactivate event to send ans OSC Message that the switch goes back to unpressed.
The correct message you should find in the Lemur documentation.
Also in the on Activate event you can send a message to Lemur so that the switch goes on.
This is important when you switch the rackspace manually in GigPerforwr and not via the iPad.
This weekend I can do a proof of concept and come back to you.
Thanks, that would be really helpful! I didn’t find a documentation on how to send OSC messages with GP script, neither did I find the proper message to set the switch status in Lemur…
“/Pad/Left” is a string, not an OSC message. It’s unclear whether GP Script should support implicit conversion of strings to OSC addresses so right now, there’s a group of functions that you can use to create OSC messages. Below is a example from my test system that’s not actually good for anything other than making sure GP Script and the runtime system actually does what it’s supposed to do
on OSCMessageReceived(m : OSCMessage) Matching "/def"
var size : integer
myMessage : OSCMessage // We will create a new message
size = m.OSC_ArgCount(); // Get the number of arguments in the received message
Print(m.OSC_GetArgAsInteger(1)) // Print the first argument ASSUMING it is in fact a string
m.OSC_Send() // Send it to the default IP address/port defined in GP options
// Initialize a new OSC message
myMessage.OSC_SetAddress( "/David")
myMessage.OSC_AppendIntArg( 42)
myMessage.OSC_Send()
myMessage.OSC_SendSpecific("192.168.0.45", 8045) // Send to an arbitrary IP address/port
end
In Lemur documentation found an example how to set the content of a text widget in lemur: /Container/Text1 @content "Hello !!!"
When I do that in scripting:
myMessage.OSC_SetAddress( "/Container/Text1")
myMessage.OSC_AppendStringArg( "@content Hello !!!")
And check in Osculator, I see that this is sent:
/Container/Text1 ,s @content Hello !!
Now my question, how can this string be generated: /Container/Text1 @content "Hello !!!"
The option seems to have no effect
When the option is checked or unchecked, in OSCULATOR I always see the
additional “,s” for every String Argument added
I created a M4L patch which I use in Ableton Live and the OSC Message without the “,s” is working fine.
The Objects' Attributes include all those Object parameters which are editable in real-time, either through instructions in a script with the function setattribute(object,'name', value), or directly through an OSC command in the form /Container/Fader @grid 1 (activate the Fader's Grid parameter), /Container/Fader @rect 300 100 60 200 (change the object's position to X=300 and Y=100, and the object's dimension to W=60 and H=200), or /Container/Text @content "Hello !!!" (change the displayed text). The Lemurs iPad OSC listening port is 8000.
I just tested this on my system and it works perfectly.
Create a label called MyLabel in Lemur
Then write the following code
// Called when rackspace is activated
On Activate
var myMessage : OSCMessage
myMessage.OSC_SetAddress("/MyLabel")
myMessage.OSC_AppendStringArg("@content")
myMessage.OSC_AppendStringArg("Hello")
myMessage.OSC_Send()
End