Setting exposed parameter values
-
Hey all,
I'm at a loss to figure out a way to update an exposed parameter value in a VST/AU (a HISE parameter with the isPluginParameter enabled) from a script.
In my compiled plugin:
My parameters show up in the plugins device view, and I can change the internal HISE parameter by changing the value in the plugins generic GUI in the host.
Any control widgets (e.g. ScriptSlider) I have in the HISE GUI for the plugin that are linked to parameters with isPluginParameter enabled are capable of changing the internal HISE parameter as well as updating the value in the generic GUI in the host.
I can use MIDI assignment in HISE's editor to link MIDI controllers to the controls in HISE's GUI (e.g. ScriptSlider) and the incoming CC's change the internal parameter, the HISE GUI object (e.g. ScriptSlider), and the value in the Host's generic GUI.
However, when I use a script to intercept the CC's and forward them to the ScriptSliders or their targets, everything works (HISE control updates, internal parameter updates) except for the update to the Host's generic GUI for the linked parameter. Furthermore, having isPluginParameter enabled for a HISE internal prevents the CC from being received in the script and updating its targets unless the HISE GUI window is open. (when it's open, things work ALMOST as expected with the exceptions noted above....when it's not open, no CC initiated changes get through via the script).
I've tried scripting to the ScriptSliders that are connected to the internal parameters as well as to the target parameters themselves, and neither updates the stored value in the Host's plugin window. I've also tried with both a deferred script and a non-deferred one, with no apparent difference.
Can anyone else confirm this? Is this expected behavior? Seems a bit screwy.
I can work around this for most situations and use the internal CC mapping capabilities for what I need, but there are a few parameters that need to be stored with the plugin instance in a project that aren't connected to an parameter, but instead just stored in a ScriptSlider and updated via the script. Is there another way I could do this? Am I missing something here?
Thanks for looking, cheers :)
a
-
I've been struggling with this problem since I wrote this post originally. I came up with a solution, basically to rearrange my scripts so that the CC reception was in its own script. It had been in the main interface script, since the CC's were controlling scriptSliders that were attached to module attributes. I moved the CC receive functions to their own script, and used setAttribute to target the sliders in the main interface script. Just chiming in here to let anyone that comes across this know how the problem was solved.
Now I have some other problems. It seems impossible to set a AU/VST parameter directly from the script by this method. Sending a value to the linked scriptSlider causes a change to it, and it's linked attribute, but doesn't change the VST/AU parameter value in the host. I'll make a separate post for that problem, though.