Restoring properties with DAW session
-
@David-Healey Would there be any way to make it so that the values don't update visually every time you change a preset?
In my case the button opens a panel and it’s quite abrupt seeing it open and close every preset change. Could this be to do with where the code is placed?
It’s a trade off between the option to say, browse presets without turning off the arp every time or the unaesthetic UI value jump.
-
@cassettedeath Remind me what this thread's about again, I'm too lazy to read through
-
@David-Healey Restoring values in a daw session without the save in preset flag
-
@cassettedeath What is the solution that was provided that you're currently using but isn't working as you expect? Do you have a simple snippet?
-
@David-Healey Snippet ```
code_textconst uph = Engine.createUserPresetHandler(); const var Knob1 = Content.getComponent("Knob1"); reg knobValue; uph.setPreCallback(function(presetData) { if (!uph.isInternalPresetLoad()) knobValue = Knob1.getValue(); }); uph.setPostCallback(function(presetFile) { if (!uph.isInternalPresetLoad()) Knob1.setValue(knobValue); }); -
@cassettedeath Is the goal to keep the leave the panel's open/closed state unchanged between preset changes?
-
@David-Healey yes that would be good
I suppose the values have to jump from what’s saved in the preset to the previous value?
-
@cassettedeath Is there a reason you need to save the button value in the preset at all?
-
@David-Healey Just so the setting saves in the DAW project. I.e the user has the chord button on for a project - reopens the project and that setting is still on
-
@cassettedeath I'll do some tests
-
@cassettedeath Well according to my brain this should work, but it doesn't and I don't know why, maybe there's a bug...
HiseSnippet 1322.3ocsW0saaaCElxNpH1cccEXWWnFrKbFBbsaZbR1vvb7eqFKI0HNMa.ACEzRzVDQlzfhxoFEAXnOA6QXOBauA6oXuAaWu61kYGJJYI43rkYzpKRv47c946bH4gz8DbahuOWfLJd5rIDjwGY1eFS51zESYntsPF2yTR7knFylf88INHCi7eiBynvZnvu+5qaf8vLaRhJD5LN0lbHcLUlnsW8uk540A6PNkNNk0OudWaNqI2iG.7HuYEzDr8E3QjiwJyxYhdA12EY74l6YOvo19N3cGTq1fcqZ6r+vJU2GSHC1dm81lricM6pCqgq.rtsCUxE8kXf8Hi0Zvcl02keISmfyn9zAdDkPUTeHyZ0c3dNpRToE0zk54zKtA4ifnzKockW2t9TyinNz45SZaeRHfUhGoafF4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