Can I update a parameter on my node from inside the C++
-
Custom c++ node. I have loads of parameters. I have one parameter that changes a bunch of internal state variables, and also changes the values of the incoming UI parameters. Is there a way to update the scriptnode UI with the relevant new parameter?
-
@Orvillain Global cable perhaps? So you send back what you want to the UI
-
@ustk @Orvillain Yes Global cables, though it can become fairly cumbersome it there are a lot of parameters you need to set. Luckily you can pack a lot of info into 1 cable however.
You just need to create the global cable, use Tools>Create C++ Code for Global Cables, copy the code printed in the console, and HISE guides you on the rest (subclass your node from the cable manager template, etc.)
It's all here:
https://docs.hise.dev/scriptnode/list/routing/global_cable.html
-
Thanks ! I'll check it out.
-
Is there a way to update the scriptnode UI with the relevant new parameter
Not without hacks. The best way of thinking about this is a black box communication of parameters into the node. Now if you want to update a UI state that you display on the plugin interface, global cables (and their data callback) are the way to go, there you can easily pack everything up into a nice JSON and send it back to HISE Script (on a deferred thread!), but I wouldn't recommend going the extra mile of updating the internal scriptnode parameters only so that you can look at them in the network with the right value.