W Pirkle said
You have to do this using an internal plugin preset system. Not all APIs have the ability to sort the presets this way. It is not trivial to implement, but several users have made their own custom preset controls within ASPiK and their plugins which can be found on this Forum.
Thanks Will as always!
I hope some of them could share to starting point 🙂
Hi Jean, be aware that this will require some time, effort & a careful choice of approach.
The way I implemented preset management is only one possibility, I made several choices you may want to make differently. My intention was just to have a relatively basic preset loader because for Ableton and some other DAW's VST3 preset loading either didn't exist natively or was poorly implemented.
Off the bat I had to make a choice where to store my preset files - AppData makes sense for Windows.
Then I created a function for writing presets to that folder as a text file. The format goes preset name first, then a spacebar seperated enumeration of the current parameter values. New lines separate each preset in the file.
I set the function to be called via a 'save preset' menu option that presents the list of all available presets to overwrite to, with an additional first option to 'write here' to the currently loaded preset.
That call is triggered from the extremely useful guiParameterChanged() function found in plugincore.
I then built a function PresetManager() which is again called from guiParamterChanged() this time via a seperate GUI menu dedicated to loading presets.
The PresetManager reads the chosen preset from the file and then updates the plugin using code looking something like this ;
hostMessageInfo.hostMessage = sendGUIUpdate;
param.controlID = parameter_to_update;
param.actualValue = std::stod(newvalue_as_string);
This will update the GUI parameters of the plugin which from there sets everything else internally.
Custom menu option objects are then needed to dynamically load names from the preset file.
Optionally load the preset list from initPluginParameters() and then add the preset names from that to the internal midi parameter list.
Then a method for accepting/writing preset names is required.
You should potentially be able to do what you wanted but you'll have to implement most of the above first and will likely lose compatibility with the default preset loading method.
I'm happy to provide more details if you're still wanting to try however.
+Check out Will's implementation of the PresetHelper bonus parameter which handles writing preset files as well.
Most Users Ever Online: 152
Currently Browsing this Page:
Guest Posters: 1
Moderators: W Pirkle: 656