STATE/SET state Remote OSC command


I am hoping that the /STATE/SET state OSC remote command will allow me to remotely set the state of a widget without sending its values out.

Can someone help me with an example?

I have a widget id "PA12" with a switch that toggles between two values, 1 and 2. I have tried



/STATE/SET {"PA12":1}


/STATE/SET ("PA12":1)

to no avail. Thank you!

Maybe set the Bypass property of your switch to true

Setting a widget's value without making it send a message is done by sending the same message it would send (matching address and preArgs) to o-s-c. /STATE/SET purposely triggers message sending but I guess it would do no harm to add an optional parameter that prevents it.

Forgive me, let me be a bit more clear in my use case.

I have a switch in O-S-C that toggles a behavior in a different software, let’s call the address /oscfunction 0 and /oscfunction 1. I do this with in OnValue script.

The other piece of software sends out a different OSC address, let’s call it /oscfunctionstate at regular intervals. Therefore, the two addresses are different, the one that elicits the behavior in the remote software and the one that polls the current status of the function and reports it back to O-S-C.

Therefore, I need the OSC address of the switch to be the same as the intervallic incoming message, I.e. /oscfunctionstate, but to NOT execute the OnValue script that sends the other OSC message outbound.

Does this make sense?

When a widget receives a message its onValue script is executed but send() doesn't have any effect*, what you describe seems to comply with this default behavior.

*the baserule is that widgets only send messages when interacted with from the interface.

Ok I didn’t understand that. So any part of the script that is not a send() will execute, but the send() will be skipped over?

That's correct.

1 Like