Retrieve values of widgets from a custom module

Hello,

In a custom module, is it possible to get the value of some widgets ? If yes, I don’t understand how to do it.
(practically, I would like to be able to retrieve the value of some faders, then send these values as osc messages)

If not, is it possible to use a script widget to do that ? Is there an example of script widgets ? (I didn’t understand its usage from other threads and the doc)

Thanks !

Matthieu

Hi,

The custom module doesn’t get access the widget objects and can’t directly retrieve their value the way you describe it, it filters incoming and outgoing messages and allows you to execute scripts depending on what’s being sent or received. You can use the oscOutFilter function to store values and use them when needed, for exemple to send custom messages using the send function. Custom modules require some javascript knowledge to be used properly but can be very powerfull.

To understand how the script widget works you absolutely need to get familiar with the advanced property syntax. The attached session demonstrates a simple use case : the script widget listens for the push button’s updates (property value set to @{push_1}) and runs its script (script property) that retrieves the faders’ values and uses them to set the input’s value.

script.json (4.5 KB)

1 Like

Thank you very much, I didn’t think about storing data in the custom module !
So I tested, it works : instead of sending data directly to Cubase, now I send them to the custom module which stores them before to send to Cubase. Simple and great.
And thanks for the script example, I will study it.

Merci !

Matthieu