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: 22
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: 656
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: 22
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: 70
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.

Forum Timezone: America/New_York

Most Users Ever Online: 152

Currently Online:
6 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Chaes: 56

Skyler: 48

Derek: 46

Frodson: 45

Peter: 43

TheSmile: 43

clau_ste: 39

Nickolai: 39

JimmyM: 33

Gwen: 32

Member Stats:

Guest Posters: 1

Members: 738

Moderators: 1

Admins: 6

Forum Stats:

Groups: 13

Forums: 42

Topics: 815

Posts: 3146

Moderators: W Pirkle: 656