Saving presets from multiple zones using PresetBrowser Custom

Hi there,

with the Macro page designer I’ve created a Hybrid synth with multiple zones like Synth Zones, Wavetable Zones, Sampler Zones divided in multiple Layers going through multiple Busses.
Using the PresetBrowser Custom only lets me save a single zone.

Turning knobs is much fun while using the synth but Is there a script option to save all zones as one as a .halpreset or a .vstpreset within the PresetBrowser Custom?
In that way I can make a custom soundbank within my own Synth?
any help will be appreciated.

Hi @Blakemiddle

As you found out the Preset Browser lets you save and load presets for a single zone only.

You could try using layer presets. Hot Brass, Studio Strings and Skylab use this method. There is a sample selector template you can use for this. But this would mean swapping the whole layer.

Another option is to use the Preset browser with the script module. This would save the presets for the script module. But you can use onSaveSubPreset and onLoadSubPreset to save and load zone parameters too. So it’s basically up to you what you want to save and then restore from the preset. It is a bit more involved but possible.

There were a few issues when using preset browser with the script module. The browser not showing the name of the loaded preset. Not sure if it is fixed yet.

Thanks for the other option I will def look in to that :smiley: , because I think that I have to rule out the option Skylab is using as they are merely using 2 Layers, while I’m using 10 sub Layers, containing 13 various Zones and 12 Busses. Or do I get lucky because I layered those layers into 2 main Layers :blush:

Screenshot 2021-04-08 at 18.06.04 Screenshot 2021-04-08 at 18.12.02

1 Like

Probably wondering what the hell I’m building over here :grinning: It’s a Hybrid kickdrum synth for Harder Styles EDM

I’ve tried the Example of this Script some weeks ago but I don’t understand the “p1” and “p2” Parameter. What they are for? Do I have to replace this? The sript is only for one Zone?
And I also don’t understand how to set the scope. If I set it to the Script it seems that I can save and load, but the values stay the same. If I set the scope to Pitch I can’t load or save. I think I have it set to the script, but how does the Browser know what to save - Pitch or Filter?

Reading your post… I think the P1 and P2 are referring to “preset template 1 and preset template 2’” mentioned in the “Example”

P1 and P2 are just variables. Arguments used by the getZoneData and setZoneData functions. This example is to be used with 2 preset browser templates. You need to set the section of one of them to Pitch and the other to Filter. And indeed it only works for one zone. But this is easy to change.

You could try it like this:

local zoneParameters = {"Filter.Type", "Filter.Cutoff", "Filter.Resonance"}

function getZoneData()
    local data = {}
    local zone = this.parent:findZones(true)[1]
    if zone then
        for i, parameter in ipairs(zoneParameters) do
            data[parameter] = zone:getParameter(parameter)
        end
    end
    return data
end

function setZoneData(data)    
    local zones = this.parent:findZones(true)
    if zones[1] and data then
        for i, zone in ipairs(zones) do
            for parameter, value in pairs(data) do
                zone:setParameter(parameter, value)
            end
        end
    end
end

function onSaveSubPreset(section)
    return getZoneData()
end

function onLoadSubPreset(section, data)
    setZoneData(data)
end

This should save the filter parameters of first zone but apply them to all zones when you load the preset. Set the section to whatever you want. The script doesn’t use the section for anything but it will not work if you leave the section empty. So just type Filter or anything in the section field.

What I found when trying this:

  • It will not work if scope and section are not set correctly. Even if the section isn’t used by the script. It is an argument of the onLoadSubPreset function. So I guess that’s why it always has to be set.
  • It doesn’t display the preset name
  • Sometimes Halion gets confused and starts saving to and loading from different location (folder) than you have set. This can happen if you reload the script.
1 Like

This works. Thank you. In the Example I don’t use the Custom Browser Template.
But that the name will not be displayed is not nice. Maybe the selector in the Template can be set to the name and not to be used for selecting the Preset?

Maybe.

Custom Preset Browser not always showing preset name - Virtual instruments / HALion - Steinberg Forums

1 Like

OK. Thanks.