Path to VST3 Sub Presets [Solved]

Hi.

I have a library which consists of one program preset and 6 layer presets. The program preset has a macro page with a menu to load one of the layer presets. I’m using this script:

path=("vstsound://EBAC9E0818AD4AD09537B38D43E05B6E/VST3 Presets/Steinberg Media Technologies/HALion Sonic SE/")

preset={"Leeds Townhall Organ 1.vstpreset","Leeds Townhall Organ 2.vstpreset","Leeds Townhall Organ 3.vstpreset","Leeds Townhall Organ 4.vstpreset","Leeds Townhall Organ 5.vstpreset","Leeds Townhall Organ 6.vstpreset",}

presetName={"Preset 1","Preset 2","Preset 3","Preset 4","Preset 5","Preset 6",}



function onSelectedPresetChanged()
  layers=this.parent:findLayers()

if layers then
  for i, layer in ipairs(layers) do
this.parent:removeLayer(layer)
end
end

layer=loadPreset(path..preset[SelectedPreset])

if layer then
  this.parent:insertLayer(layer,1)
end
end
defineParameter("SelectedPreset",nil,1,presetName,onSelectedPresetChanged)

This works as long as all presets reside directly in VST3 Presets folder of the library.

But I’d like to move the layer presets to VST3 Sub Presets folder of the library, so they don’t appear in media bay as they only serve as sublayer presets for the program (like Studio Strings and Hot Brass).
I have tried the obvious, change the path in the script to:

path=("vstsound://EBAC9E0818AD4AD09537B38D43E05B6E/VST3 Sub Presets/Steinberg Media Technologies/HALion Sonic SE/")

and move the layer presets to the VST3 Sub Presets folder, but that doesn’t work.

Does anyone know what’s the correct path to the VST3 Sub Presets folder? Or how to make this work?
There’s no easy way to check as the presets in that folder don’t appear in mediabay.

I don’t think these are presets in the normal sense. if you look at the Studio Strings scripts, there doesn’t seem to be any reference to a specific load path.

I’m wondering if there is a vstsound container loaded with the program preset instead of a vstpreset.

All I know so far is that appendLayer and removeLayer are the functions used, but I haven’t been able to work out exactly how it works or where it is loading the layers from.

loadPresetAsync and LoadProgress are also giving some clues in the manual, but I’m still doing some reading.

Haliotron behaves in the same way and it’s always had me curious.

Hi AposMus.

Thank you for your reply. It took me a while to figure this out. The path for the VST3 Sub Presets folder is: “.AppData/Steingerg/”
That’s if you place the layer presets directly in VST3 Sub Presets folder. If you create further subfolders, you need to include them in the path.(.AppData/Steinberg/Subfolder/…)

So in my case this was:

path=("vstsound://EBAC9E0818AD4AD09537B38D43E05B6E/.AppData/Steinberg/")