Update value of widget without excuting the onValue from Custom Module?

I'm trying to update some toggle switches from my custom module, listening from the oscInFilter from Cubase commands. Each toggle has an OnValue send("/address", args) which goes through the custom module and sends back to Cubase.

When listening to the oscInFilter, I'm using receive("/SET", "/toggleAddress", value) , to update the toggle widgets value. I want to update the toggle switch but not have it activate the onValue command, otherwise, what I'm experiencing now is an infinite loop.

Any suggestions?


Don't use /SET, it's meant to simulate a user interaction and will make the widget send its value, write this instead

receive('/toggleAddress', preArg1, preArg2, value)
// or if no preArg
receive('/toggleAddress', value)

onValue will be triggered but no message will be sent (precisely to avoid feedback loops).

1 Like