Layer Preset Browser Help

Post topics about HALion scripting.
Post Reply
rmjmusic
New Member
Posts: 26
Joined: Thu Jan 04, 2018 3:22 am
Contact:

Layer Preset Browser Help

Post by rmjmusic » Wed Jan 10, 2018 7:32 pm

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: https://developer.steinberg.help/displa ... ser+Custom , 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 (viewtopic.php?f=268&t=114073). 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
Attachments
Preset Browser Custom.PNG
Scope: "Top Layer" is the name of the first layer I have in the program that will not change.
"Layer 1" is the layer within "Top Layer" that will change by the Preset Browser.
Product: "TEST MACRO" is the folder name that I have in "Documents/Steinberg/"
Section: Not entirely sure what needs to go here.
Load From: "Layer" is the folder found here "TEST MACRO/Sub Presets/" and contains the vstpresets I want to show up in the Browser.
Save To: "MyLayers" is the folder found within the "Layers" folder.
(12.96 KiB) Not downloaded yet
Cubase Pro 9.5
HALioin 6
Windows 10 Pro 64bit

misohoza
Member
Posts: 802
Joined: Sun Oct 05, 2014 12:18 am
Contact:

Re: Layer Preset Browser Help

Post by misohoza » Wed Jan 10, 2018 9:56 pm

Hi rmjmusic,

I was struggling with this for some time. See my other thread: viewtopic.php?f=269&t=112974

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:

Code: Select all

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)
  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:
Sample Selector Template.png
(255.61 KiB) Not downloaded yet
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.
Sample Selector.PNG
(67.4 KiB) Not downloaded yet

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:

Code: Select all

VST3 Presets/Steinberg Media Technologies/HALion Sonic SE/Layer
Basically just point to the folder you want to display, starting from "VST3 Presets".
Win 10 Home, 64 bit, 8 gb ram,
Cubase Pro 9, Wavelab Pro 9, Halion 6, Dorico,
NI Komplete 10 Ultimate, Ozone 7,
UR 44

rmjmusic
New Member
Posts: 26
Joined: Thu Jan 04, 2018 3:22 am
Contact:

Re: Layer Preset Browser Help

Post by rmjmusic » Thu Jan 11, 2018 2:46 am

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
Cubase Pro 9.5
HALioin 6
Windows 10 Pro 64bit

misohoza
Member
Posts: 802
Joined: Sun Oct 05, 2014 12:18 am
Contact:

Re: Layer Preset Browser Help

Post by misohoza » Thu Jan 11, 2018 7:18 pm

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.
Win 10 Home, 64 bit, 8 gb ram,
Cubase Pro 9, Wavelab Pro 9, Halion 6, Dorico,
NI Komplete 10 Ultimate, Ozone 7,
UR 44

rmjmusic
New Member
Posts: 26
Joined: Thu Jan 04, 2018 3:22 am
Contact:

Re: Layer Preset Browser Help

Post by rmjmusic » Thu Jan 11, 2018 10:37 pm

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:
Attachments
HALion 6.zip
(938 Bytes) Downloaded 62 times
Cubase Pro 9.5
HALioin 6
Windows 10 Pro 64bit

Post Reply

Return to “Halion Scripting”

Who is online

Users browsing this forum: No registered users and 1 guest