Linked Sliders Automation conflict
-
@DanH said in Linked Sliders Automation conflict:
Do you know if there are any examples of how to use these APIs
I'm using it here, but not for the same purpose - might still be helpful for you:
https://codeberg.org/LibreWave/RhapsodyBoilerplate/src/branch/main/includes/LookAndFeel.js#L29@DanH said in Linked Sliders Automation conflict:
Do I now need to set the automation up as a data object or is it already there somewhere?
See the very first function in the docs I linked to ;)
-
@d-healey Oh wait, sorry I'm getting confused! I don't want to control CC automation, only the standard DAW automation (is there a specific term for this?).
-
@DanH said in Linked Sliders Automation conflict:
only the standard DAW automation
That's the isPluginParameter setting you mentioned. You'll probably also need to enable the isMetaParameter property too if you have one knob controlling another.
-
There's also this thing but it looks complicated - https://docs.hise.audio/scripting/scripting-api/userpresethandler/index.html#setcustomautomation
-
@d-healey I tried it and it doesn't make a difference in the DAW...
-
Can you make a simple test project to demonstrate the problem in isolation?
-
@d-healey Thanks, I'll stick with the hack for now!
-
@d-healey well its as simple as linking two sliders, setting them both as isPluginParameter enabled and then automating them in different directions in the DAW...
But I can if you want me to!
-
@DanH Ah in that case I don't see any way to avoid a conflict. If they are linked twice trouble will follow :)
-
@d-healey that's the conclusion I have arrived at.
Thanks!
-
@DanH said in Linked Sliders Automation conflict:
A hacky solution could be to use a separate set of sliders for ones that need linking, and check the value of the button when scripting their callbacks...
I did the once, the key is to use a hidden slider for automation. You can achieve that by calling hiddenSlider.changed() in the GUI slider's onControlCallback, which tells the DAW that the last touched control was the hidden slider.
Of course it goes without saying that the hiddenSlider should have isPluginParameter = true, meta control and parameter name set, while the gui one shouldnt so it doesn't pop up in the automation list.
Then in the hidden control's automation callback, set the value of the gui controller, repeat the stuff it does (but refer to the guiSlider's value even though you're currently in hiddenSlider's callback), repaint it if it's using a paint routine or LLAF, and you're set.
It spams the component list but isn't otherwise messy. It's highly functional as you can always gate off the setting of the guiControl's value and its function stuff with a simple check for existing links.
-
@aaronventure Thanks, that's more or less what I did this morning, works perfectly well, just a bunch of extra work!