saveInPreset vs custom prefFile vs what?
-
I have a problematic with something that should be simple...
- I have an oversampling knob, going from 2x to 16x (plus its on/off button).
- I don't want it to be save in presets for obvious (at least to me) reasons
So I write the value in a pref file and recall it upon load, easy peasy.
Now, when I have several instances in a DAW, they might require different OS factors. But when the DAW session load, all instances are loading the last OS factor saved in pref file (and even the OS on/off state which is even worse)...
No saveInPreset, No pref file possible, so what's left?
-
@ustk one option is to add a "oversampling lock" button that will prevent changing the oversample factor when loading presets. Then you make the oversample factor part of the user preset system and the people can engage that button if they want to use a "sticky" setting.
I would go for the pref file solution and live with the fact that multiple instances will share the same value - if an end user ends up having to distinguish the oversample factor across instances, it'll most likely be more efficient to set it to the highest setting and then bounce the track.
-
@Christoph-Hart The problem the 2nd solution is that the conflict happens between different DAW projects too so it's not a viable solution.
Solution 1 seems a good idea
-
@Christoph-Hart said in saveInPreset vs custom prefFile vs what?:
one option is to add a "oversampling lock
I think we solved this problem a while back with the is internal preset thingy in the preset handler
-
@d-healey I must explore this solution!
-
@ustk This is the discussion - https://forum.hise.audio/topic/6410/restoring-properties-with-daw-session/17?_=1754778579355
-
@d-healey I was right on it
I'll check more deeply tomorrow, but for now I don't see where knowing if it's DAW or not can allow to block a knob from being recalled. Unless using a trickery to save the prev value on preCB and restore on postCB... A bit dirty but why not...
-
@ustk Yeah if I remember correctly in the preload callback you check if it's an internal load, if it's not then you store the value of the control in a variable.
Then in the post callback you again do the check but this time you load the value from the variable.