


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.Will  Â
Thanks Will as always!
I hope some of them could share to starting point 🙂
Best,
Jean
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 hostMessageInfo;
hostMessageInfo.hostMessage = sendGUIUpdate;
GUIParameter param;
param.controlID = parameter_to_update;
param.actualValue = std::stod(newvalue_as_string);
hostMessageInfo.guiUpdateData.guiParameters.push_back(param);
pluginHostConnector->sendHostMessage(hostMessageInfo);
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.

jim said
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 hostMessageInfo;
hostMessageInfo.hostMessage = sendGUIUpdate;
GUIParameter param;param.controlID = parameter_to_update;
param.actualValue = std::stod(newvalue_as_string);hostMessageInfo.guiUpdateData.guiParameters.push_back(param);
pluginHostConnector->sendHostMessage(hostMessageInfo);
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. Â
Hi Jim,
Thanks for your reply. I've already done a presets management but I couldn't figure out to save/load any preset. If you can share more details I'll be appreciated.
Cheers,
Jean
I forgot to mention that Will prepared this document last year describing some of the thing that you'll need to do here;
https://www.willpirkle.com/Downloads/AN10_PRESETS.pdf
There he gives a good outline on the approach to trigger GUI parameter updates from a file and then how to trigger calls to that from guiParameterChanged().
Â
The first thing I did when implementing this was just learning how to write out a list of my current parameters.
For that include and and use std::ofstream;
It should default output to either your desktop or the current project folder. Later you can learn how to get to the directory you actually want to be writing to.
Plenty of resources online for using fstream. I could explicitly state code that I'm using but you'll probably be trending differently. Much info online anyways + for string handling, parsing via spaces, using getline() etc.
If you can create a list of your parameters then loading them back should be relatively easy referencing Wills document above.
Actually the PresetHelper bonus parameter should be in your project right now so you can also use that, to write out a preset file or check how he has done it. Documentation here.
Note that we're using our own preset formats and not standard vst3presets though I guess you could emulate that format if you wanted.
Cheers
Most Users Ever Online: 294
Currently Online:
8 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Chaes: 56
Skyler: 48
StevieD: 46
Derek: 46
Frodson: 45
Peter: 43
TheSmile: 43
Nickolai: 43
clau_ste: 39
jeanlecode: 37
Member Stats:
Guest Posters: 2
Members: 795
Moderators: 1
Admins: 6
Forum Stats:
Groups: 13
Forums: 42
Topics: 862
Posts: 3400
Newest Members:
AP, Liv, Wojciech Jakóbczyk, markb, marcTark, Jon_1, John Thursday, JK, kyrandian, F_MarchalModerators: W Pirkle: 706