/ HALion Developer Resource / HALion Macro Page / Templates /

Preset Browser Custom


On this page:


Path

Description

PresetBrowser Custom is a preconfigured template that can be used to manage subpresets, such as the presets of a MIDI script module or an audio effect, for example. The Scope parameter determines for which module, effect, or zone the preset management applies. The optional Section parameter determines for which part of a zone the preset management applies. The parameters Product, Load From, and Save To define the locations for loading and saving presets. The look of the controls can be adapted freely by changing the components inside the template. The template contains switches for Load, Save, and Delete which open the corresponding dialogs.

To explore the functionality and connections:

  1. Load the Init Basic Controls.vstpreset from the Basic Controls library.
  2. Open the Macro Page Designer, go to the GUI Tree and navigate to "Pages > Path & Preset Page".
  3. Select "Subpresets LFO - Custom" and click Edit Element Edit Element to examine the template.

Template Properties

PopertyDescription
NameThe name of the element. This name will be displayed in the GUI Tree.
Position/SizePosition X, Position Y, Width, Height: Position and size of the element in pixels. Position X/Y defines the position of the upper left corner.
AttachDefines how an element behaves when its parent element is resized. You can set the following parameters:
  • Left: If the parent element is resized, the element remains attached to left edge, with the specified ratio.
  • Right: If the parent element is resized, the element moves relatively to the right edge, with the specified ratio.
  • Top: If the parent element is resized, the element remains attached to top edge, with the specified ratio.
  • Bottom: If the parent element is resized, the element moves relatively to the bottom edge, with the specified ratio.
  • Left + Right: If the parent element is resized, the element is resized horizontally relatively to the left and right edges, with the specified ratio.
TooltipText that appears as a tooltip when the mouse hovers over the element.
TemplateDetermines the template to be referenced.

Template Parameters

The template provided with the Init Basic Controls.vstpreset uses LFO1 of the zone as example. The following description uses the Multi Delay effect as example. This way you have two examples you can try out for getting a better understanding of the PresetBrowser Custom template.

ParametersDescription
ScopeThe Scope parameter determines for which module or effect the preset management applies. For example, by setting Scope to @bus:0/@0:Multi Delay the preset management applies to the first effect named Multi Delay in the first bus.
ProductProduct specifies the root folder for the location of the subpresets, both for loading and saving. Set this to HALion if you want to load presets from the standard file path for subpresets. Load From (see below) must be set to the path of the folder that contains the subpresets for the specified effect, e.g., Fx/Delay/Multi Delay for the subpresets of the Multi Delay effect. When saving User subpresets, these will be written to ./Documents/Steinberg/HALion/Sub Presets/ plus the path specified by Load From, e.g., ./Documents/Steinberg/HALion/Sub Presets/Fx/Delay/Multi Delay. They are displayed with a user icon in the preset selector.

If you want to deliver your own subpresets as part of your library, you can set Product to the name of your instrument, e.g., MyProductName. This way, only the subpresets for MyProductName will be shown in the preset selector. The location of the subpresets inside the VST Sound of your library must match the path defined by Product and Load From, otherwise the preset selector cannot access these subpresets. Assuming Load From is set to Fx/Delay/Multi Delay: Then, the subpresets must be added to the folder ./MyProductName/Sub Presets/Fx/Delay/Multi Delay inside the VST Sound. If the user saves subpresets, these will be written to ./Documents/Steinberg/MyProductName/Sub Presets/Fx/Delay/Multi Delay on hard disk. They are displayed with a user icon in the preset selector.

You can also include both the HALion root folder and the root folder of your instrument by setting Product to MyProductName|HALion. The preset selector will then show the content of both locations. The path for saving a User subpreset will use the first entry specified by MyProductName as root folder.

SectionSections divide parameters into related units. For example, the parameters of zones are divided into sections like Filter, Amp, etc. The Section determines for which parameters the preset management applies. The section names can be found in the Parameter List. For example, set Section to Amp Env to load/save subpresets only for the amp envelope of a zone. If Section is not set, the preset management applies for the entire module, effect, or zone. Defining Section creates a subfolder in the subpreset path that corresponds to the name of the section. Sections can also be used within scripts. See onLoadSubPreset and onSaveSubPreset for details.
Load FromLoad From specifies the subpath to the location of the subpresets inside the root folder. The root folder is set by Product (see above). You can specify this subfolder freely. However, if you want to see the factory subpresets, Load From must be set to the path that corresponds to the module or effect specified by Scope and Product must contain HALion.

Any subpresets you want to distribute with your library must be added to the corresponding location inside the VST Sound. For example, if Load From is set to Fx/Delay/Multi Delay and Product is set to MyProductName, the subpresets inside the VST Sound must be located at ./MyProductName/Sub Presets/Fx/Delay/Multi Delay.

Save ToAllows you to specify the subpath to the location where the subpresets will be saved by default.
  • If Product has only one entry, either Halion or the name of your instrument, e.g., MyProductName, then the path of Load From will be included and prepend the path of Save To. See configurations 1 and 2 in the table below.
  • If Product has two entries, e.g., MyProductName|HALion, then only the path of Save To will be used. In this case it makes sense to set Save To to something like this: MyProductName/MySubfolder. See configuration 3 in the table below.
ExtensionAllows you to specify a file type filter, so that preset browser only shows files of that type. By default, the preset selector uses .halpreset as file type, which is the common file type for HALion subpresets. If you want to load VST presets, e.g., to exchange layers using a script, set the file type to .vstpreset.

❕ If you need further control over the content locations, you can specify the required subfolder together with the Product: MyProductName/Fx/Delay/Multi Delay|HALion/Fx/Delay/Multi Delay. See configuration 4 in the following table.

Content Locations for Different Configurations

#ConfigurationContent in Preset SelectorDefault Save Path
1

Product = HALion

Load From = Fx/Delay/Multi Delay

Save To = MySubfolder

Only subpresets from HALion, including any subpresets the user has saved on hard disk../Documents/Steinberg/HALion/Sub Presets/Fx/Delay/Multi Delay/MySubfolder
2

Product = MyProductName

Load From = Fx/Delay/Multi Delay

Save To = MySubfolder

Only subpresets from the specified library, including any subpresets the user has saved with the instrument on hard disk../Documents/Steinberg/MyProductName/Sub Presets/Fx/Delay/Multi Delay/MySubfolder
3

Product = MyProductName|HALion

Load From = Fx/Delay/Multi Delay

Save To = MyProductName/MySubfolder

All subpresets from HALion, the specified library and any subpresets the user has saved on hard disk../Documents/Steinberg/MyProductName/Sub Presets/MyProductName/MySubfolder
4

Product = MyProductName/Fx/Delay/Multi Delay|HALion/Fx/Delay/Multi Delay

Load From = deactivate, leave empty

Save To = MySubfolder

All subpresets from HALion, the specified library and any subpresets the user has saved on hard disk../Documents/Steinberg/MyProductName/Sub Presets/Fx/Delay/Multi Delay/MySubfolder

❕ The location of the subpresets inside the VST Sound must match the path defined by Product and Load From, otherwise the preset selector cannot acces these subpresets. If libraries deliver subpresets in multiple VST Sounds, all subpresets with the same path will be shown together in the preset selector.

Components inside the Template

PresetBrowser Custom Template

Controls and Subtemplates

ItemDescription
PrevA Switch control to load the previous preset. Its Value must be set to @SubPresetPrev.
NextA Switch control to load the next preset. Its Value must be set to @SubPresetPrev.
SelectorA Switch control to open the preset selector. Its Value must be set to @SubPresetSelectPopup.
textA Text control to display the name of the preset. Its Value must be set to @SubPresetName.
SaveA Switch control to open the save dialog. Its Value must be set to @SubPresetSave.
SelectA Switch control to open the preset selector. Its Value must be set to @SubPresetSelectPopup.
DeleteA Switch control to open the delete dialog. Its Value must be set to @SubPresetDelete.
BackAn Image control that provides the background bitmap for the preset name.