ASPiK SDK
Loading...
Searching...
No Matches
Using the Preset Helper

ASPiK projects include another bonus hidden PluginParameter that will help you create preset C++ code for your plugins. This is especially useful when the plugin contains a large number of parameters and GUI controls. TO use this feature, you need to add a button to your GUI to use during development when you will be generating and saving the factory presets. You will then most likely want to hide or simply delete the button from the GUI for your plugin's final release version. To use this control, you just move the GUI into a state that you want to freeze as a preset and then click the button. A file-save dialog will open to allow you to save the TXT file to your disc. Note that each file contains exactly one preset.

To use the helper, open the GUI Designer and drag a Text Button object on to the canvas. You can use any kind of button, but the Text Button does not require a graphics file, so it is ideal for a control we are going to hide/delete later. Other than sizing and titling the button, the only other thing you need to do is link it to the WRITE_PRESET_FILE contrtol ID (tag). Your GUI might look like this in the Designer:


Now run the plugin and adjust the GUI controls to some great settings. Then click the helper button and a dialog will appear asking you to save the file. It will be named "Preset_X" so be sure to change the X to something else and don't accidentally overwrite your own files.


When you've collected enough presets, you can open the TXT files and paste the code into the PluginCore::initPluginPresets( ) function (see the SDK documentation for creating factory presets). You may need to tweak the code a bit (you only need to declare the preset pointer once at the top of the function) but otherwise it will paste right in.