Layer Preset Browser Help

I am having some trouble getting a layer preset browser to work as I would like.

I want to similarly emulate the Sample Preset browser that Skylab has, however I want the browser to change the layer/zones presets with my pre-mapped samples.
I know there are templates that are supposed to allow you to do this (Preset Browser Custom, Preset Browser Module, Preset Browser) however I can’t seem to get them to work the same. I’m pretty certain that I want to use the “Preset Browser Custom”, so that’s what I’ve stuck with. Following the guidelines here: Preset Browser Custom - HALion Macro Page - Steinberg Developer Help , I’m not sure if I’m getting the Section or Scope correct. I’m certain I’ve got the other parameters correct.

The “section”, I’m not sure exactly what to put. I’ve tried a few different things. I feel I’ll probably need a script. So I’ve looked into the script that was posted to this forum to help find the Path to the VST3 Presets (Path to VST3 Sub Presets [Solved] - HALion - Steinberg Forums). I’ve changed the preset names to the ones applicable to my case and I’ve tried a few variations of the path including those suggested in the linked topic. The only issue with this, is that I haven’t exported the program as a library yet with these layer presets included. So I don’t have 1 single VST Sound file to point to. For each of my layer presets are custom, so they don’t have a vstsound file as far as I know but only sample content that they point to.


In summary, I think my first issue is:

If I haven’t made a library with layer presets yet, how do I include layer presets in the Preset Browser that don’t have a vstsound file?


I’m just not sure what I’m doing wrong. Any help will be greatly appreciated and if I need to clarify anything, I’ll be glad to do so.

Thanks,
rmjmusic
Preset Browser Custom.PNG

Hi rmjmusic,

I was struggling with this for some time. See my other thread: How to make the Sample Selector to work - Virtual instruments - Steinberg Forums

But to explain it a bit further, Skylab, Studio Strings and Hot Brass libraries have a macro page template called Sample Selector which is pre-configured to load layer presets from VST3 Sub Presets Folder. You need a script to handle the preset loading.

To give you an example you could try this:

Create an empty program and create a macro page for it. Add Lua Script module. Paste the following code:

defineParameter("SelectedPath",nil,"",function()onSelectPath()end)
defineParameter("SelectedPreset",nil,"")


function removeOldLayer()
  if oldPreset then
    this.parent:removeLayer(oldPreset)
  end
end


function appendNewLayer(progressInfo)
  if progressInfo.root then
    oldPreset=this.parent:getLayer()
    this.parent:appendLayerAsync(progressInfo.root,removeOldLayer)
    SelectedPreset = progressInfo.root.name
  end
end


function onSelectPath()
  loadPresetAsync(SelectedPath,appendNewLayer)
end

Add Sample Selector template to the macro page. You need to edit the template first so click the “e” button on the toolbar and select the text element. Connect it to the SelectedPreset parameter. See the picture:


Go back to the main macro page. Connect the SelectedPreset and SelectedPath parameters of the script to Sample Selector template. For the other parameters try:
Extension: vstpreset
Product: Skylab
Section: Layer Presets

At this point you should be able to load Skylab layer presets. You can change the Product to Hot Brass or Studio Strings to load presets from those libraries. If you leave the Section empty they will appear in a folder called Layer Presets. So Section is similar to Load From of other templates and deals with folder structure.

You can use the Sample Selector to load your own layer presets.
Create a library. Add VST3 Sub Presets Folder. Add further subfolders to create folder structure like this:

VST3 Sub Presets/Product/Sub Presets/Section

Place your layer presets in that folder.


One more thing to keep in mind when using the sample selector is that you are loading a new layer. If you connected some layer parameters or quick controls to macro page, some of the connections might be broken when you load a new layer. When you check Skylab, Studio Strings or Hot Brass scripts, a large part of the script is dealing with load handling, saving and restoring the state of parameters, reconnecting quick controls…


In summary, I think my first issue is:

If I haven’t made a library with layer presets yet, how do I include layer presets in the Preset Browser that don’t have a vstsound file?

You need to work “backwards”. Export your layer presets. Create a library, add your layer presets and build the vstsound. Save the library. Once it’s registered you can access your layer presets with the Sample Selector. Then when your “master” preset is ready export that, save as a HSSE program and add it to the same library. Rebuild the library.



***Edit:
Actually it works with user presets as well.
Do the same as above but leave Product and Section empty.
Alternatively set the Section to something like:

VST3 Presets/Steinberg Media Technologies/HALion Sonic SE/Layer

Basically just point to the folder you want to display, starting from “VST3 Presets”.

1 Like

Hi Misohoza,

This is definitely what I’m trying to accomplish. Huge thanks for pointing me in the right direction and your detailed response. I greatly appreciate your help!




I am having a little trouble though after I’ve implemented the code. The Sample Selector works as it should now. But I HALion has a crash now if I touch any of the parameters on the macro page that link to the FX in Layer 1(the layer that is being swapped out in the Sample Selector). Each Layer that is being swapped out via the Sample Selector is identical to each other, other than the fact that they are different samples (named the same though). Is this something you might know the cause of?

I’ll continue to look into the load handling, saving and restoring he state parameters…etc scripts if somehow that is causing this issue.

Thanks again for your help!

Thanks,
rmjmusic

I am having a little trouble though after I’ve implemented the code. The Sample Selector works as it should now. But I HALion has a crash now if I touch any of the parameters on the macro page that link to the FX in Layer 1(the layer that is being swapped out in the Sample Selector). Each Layer that is being swapped out via the Sample Selector is identical to each other, other than the fact that they are different samples (named the same though). Is this something you might know the cause of?

When you load a new layer preset for Halion it’s a new object. So your macro page is pointing to something that has been removed and replaced by something else. This could cause a conflict. But I think it shouldn’t crash though so you might want to report that to issues forum. It does crash here as well.

To work around this I would move the FX to Program Bus. Especially if you plan to use the same FX for all layer presets. As the Program Bus doesn’t change it shouldn’t cause problems.

Thanks again for your help and recommendations , misohoza!

Unfortunately, (as far as I know) moving the layer FX to the Program Bus won’t work in my instance as I have a good amount of FX in the Layer FX and there seems to be a limit of the amount of FX you can export in a program FX into a HALion Sonic SE patch.

Since the crash I was having was causing a “serious error”, I’ve sent the crash dump file that is generated from the crash to Steinberg Technical Support. Just as an FYI, here’s the crashdump file that was sent over:
HALion 6.zip (938 Bytes)