Preset Folders | Recent Uploads & Activity | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Preset Folders
Avatar
Member
Members
September 27, 2021 - 5:23 pm
Member Since: June 1, 2021
Forum Posts: 37
sp_UserOfflineSmall Offline
Is it possible to add folders in the preset section? Like Waves and SoundToys have their own preset section?
For example my project has internal preset parameter and I'd like to add folder like that;
- Drum
  • a
  • b
  • c
- Guitar
  • a
  • b
  • c

Thanks,

Jean

Avatar
Admin
October 11, 2021 - 1:34 pm
Member Since: January 29, 2017
Forum Posts: 698
sp_UserOfflineSmall Offline

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 

Avatar
Member
Members
October 14, 2021 - 11:56 am
Member Since: June 1, 2021
Forum Posts: 37
sp_UserOfflineSmall Offline

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

Avatar
Admin
October 15, 2021 - 12:49 pm
Member Since: January 1, 2020
Forum Posts: 107
sp_UserOfflineSmall Offline

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.

Avatar
Member
Members
October 19, 2021 - 6:22 am
Member Since: June 1, 2021
Forum Posts: 37
sp_UserOfflineSmall Offline

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

Avatar
Admin
October 21, 2021 - 12:58 pm
Member Since: January 1, 2020
Forum Posts: 107
sp_UserOfflineSmall Offline

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

Avatar
Member
Members
October 26, 2021 - 10:12 am
Member Since: June 1, 2021
Forum Posts: 37
sp_UserOfflineSmall Offline

Thanks Jim.

I'm looking on this and I'll let you know if everything goes OK 🙂

Cheers,

Jean

Forum Timezone: America/New_York

Most Users Ever Online: 152

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: 786

Moderators: 1

Admins: 6

Forum Stats:

Groups: 13

Forums: 42

Topics: 853

Posts: 3385

Moderators: W Pirkle: 698