Saving data outside of presets
-
I have a cheatcode that activates a secret panel in a plugin, and I want to save the state of it without saving it in the preset (since changing presets would reset it's state and force the user to enter the code again).
What would be the best way to do that, is there a way to store data outside of a preset?
-
@blezzbeats Im confused, why cant you just save the preset? Saving the preset wont change it to the next requiring the user to re-input the values. Only if you first change the preset will it change the values.
Am I missing something?
-
@blezzbeats You can store anything you want with xml or json files
-
@trillbilly It's a sample library and all the sounds have presets, so switching presets resets the secret panel. Hence why I need to deal with them separately.
-
@Soundavid Sweet will look into that, can a JSON or XML file be bundled in with the plugin by default if you use include like with js scripts?
-
@blezzbeats You don't need to include, you can write and load xml or Json files and encrypt them with the File System API, you can store them On Init or I think you can embed the files if you store them in the AdditionalSourceCode folder but im not 100% sure of that, take a look on the Documentation https://docs.hise.audio/scripting/scripting-api/file/index.html
-
@Soundavid Thanks for pointing me to the right part of the docs I appreciate it. Always get sidetracked in there