How do you set a VST/AU Parameter from a script? and Automate?
-
Hello all,
I've been working on this problem for a while, I'd love to get some help if anyone has answers. I have some internal parameters used by my HISE scripts that need to be automatable in a plugin host. The values are stored in scriptSliders. They are linked to parameters in the VST/AU, but not to any module/scriptNode attribute. Their values change after incoming Note/CC values are received by the device, but the CC values are not statically mapped via midi-learn in HISE, because the control definitions need to be dynamically allocated depending on the mode the device is in.
Here's what I've observed so far:
- Changing the GUI scriptSlider's value in the main interface also changes the linked AU/VST parameter value.
- After linking a CC to the scriptSlider via learn in HISE, it is possible to change the value of both the scriptSlider in the main interface, and the linked AU/VST parameter, when the linked CC is received by the compiled AU/VST in the host.
- Changing the scriptSlider's value via a script DOESN'T updated the parameter value in the AU/VST, no matter what I've tried.
- Changing the AU parameter via the scriptSlider in the main interface DOES NOT trigger any automation recording into the host (checked with Ableton Live and Bitwig Studio, but I suspect it is the same in other hosts). This works in the VST correctly, provided that the parameter is the linked to a scriptSlider that is targeting a module's attribute.
So, my questions are, how can I:
- update the VST/AU parameter value from a script.
- get changes made in the UI or script of HISE to update the host for automation purposes?
Any help is greatly appreciated. I've been banging my head against this wall for a while. Here's a test patch with some simple methods I've been using to test with. I've looked around quite a bit for posts about these issues and haven't found anything relevant, but maybe I missed something?
Here's a test project demonstrating what I mean....you'll have to compile it and run it in a host to see what I'm talking about though. Ideally, using the "cycle" button in the UI should cause the VST/AU parameter to change just like it does the linked scriptSlider. In addition, sending CC9 on Chan1 will update both the scriptSlider and the VST/Param as one would expect.....but it still doesn't trigger any automation changes if the host is looking for changes in record mode.
HiseSnippet 1181.3ocsWslaaaDDdoroajZcQCPN.DAnvTUJtT1tIE0vvJV9ADRkiPkiQ+WvJxURK7pcIVtzwpF9e87j6ROB8FzaP6rbIEojkeDUX5eXMu14aFNyNC6JE9jnHgDYU9rIgDj02X2aBWMp0HLkiZeHx56r6hk3wDEQdFIRsM5fIg3nHR.xxZkSzZYUdUTxy+r+AXFl6SxYgPmKn9jekNlpx41s46nL1w3.xYzw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kzs6VkzMlFZOMsNyzivCRH9W3IUXCMsUpvFYBQiw9RwG8Msi50SeVBG.S7jJ3xvRn.sSir9PaauM8Pigsl+nuuNU7J.6K1lsVBa1dIrYmkvleZIr40KgMuYIr4muWazevxaiUhwl1jzaAMyVPVecQBaqxyVQm9IEItIYBYVc.T3JUEatNhGT7tgiiYraoil4b506BxmJRm7QIPzn4c8K97I+8e7m6+VETO2OVM68is4WBWgaZmPc5dTxU7VVGwwPiig6+M9.jDK
-
Bumping because I just came across this problem too, I noticed some commits in the Master branch related to automation but I still can't get ScriptComponent.changed() to update a DAW Automation Parameter :/
https://i.gyazo.com/831019d69eab621bc38a8e171a379478.mp4
Bottom left you can see the DAW not updating despite everything working correctly internally.