Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PresetManager query #535

Open
7sharp9 opened this issue May 9, 2024 · 3 comments
Open

PresetManager query #535

7sharp9 opened this issue May 9, 2024 · 3 comments

Comments

@7sharp9
Copy link

7sharp9 commented May 9, 2024

Hi, Im just looking at your PresetManager implementation anddd Im wondering about some of the details like why there is a set of state from the presetmanager and another from the AudioProcessorValueTreeState?

Is this to do with preserving dirty presets outside of normal state?

Thanks!
Dave.

@jatinchowdhury18
Copy link
Contributor

Just to be clear, I imagine you're referring to the chowdsp_presets module, not chowdsp_presets_v2 (v2 doesn't use the APVTS)?

The main idea is that I wanted the "current preset" to basically always have a value, and for the plugin state to always be "relative" to the current preset (which helps to manage the "dirty" state). Usually when starting up the plugin, the programmer would manually set the current preset (usually to an "Init" preset), and then from there, the plugin will always save/load the preset as part of its state. This does end up with the state sometimes being loaded twice (once from setting the current preset and once from loading the saved APVTS state). I haven't had any issues with that, but if it's causing problems, there might be a more "elegant" solution that we could find.

@7sharp9
Copy link
Author

7sharp9 commented May 9, 2024

While debugging ChowTapeModel, it did seem to take a while to save and load presets but thats not necessarily any issue, could just be debug slowing things down a lot. I was just trying to get to grips with the code. As that part was BSD license it made sense to use it rather than write my own, and I was just tryign to be clear on everything it was doing.

@7sharp9
Copy link
Author

7sharp9 commented May 12, 2024

It woudl be nice to reduce unnecessary loading as my plugon has a few areas that take a while to init, i find the ChowTapeModel takes a while to load on first opening the DAW, not sure if its preset related though as Ive not profiled it yet :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants