Saving presets in VSTPlugin

Hi, I’m starting to figure my way around VSTPlugin. I need to save a number of presets for each VST that I’m going to work with, so that I can change presets programmatically within a loop. In my test case, I attempted to save about 30 presets for an example VST (i.e., Xfer Nerve). Through the Nerve GUI, I was able to specify each preset. (drumkit) Then I used the VSTPluginGui browser to “Save as” each preset, using the same name as shown in the plugin. I went through all 30 presets with no error messages shown. However, only the first 24 preset files were actually saved in my preset folder. I observed the same behavior when calling savePreset directly from sclde (no error message, but file was not created/saved).

Is there actually an explicit limit of 24 presets which can be saved (on Windows 10)? If so, can that limit be overridden by specifying a higher limit as a parameter somewhere? Or does the code need to be modified?

Is there some other workaround that would permit saving more than 24 presets, if that limit is immutable? Could banks be used to provide multiple sets of up to 24 presets each?

Thanks.

Regards,
Michael Kaplan

Just for reference, here’s the same answer that I gave on Facebook:

Is there actually an explicit limit of 24 presets

There is certainly no such limit… You can create as many presets as you like. I just programmatically created 30 presets for some random plugin. Maybe you accidentally saved some presets under the same name?

BTW, note that “savePreset” and “loadPreset” are asynchronous commands, which means that if you want to read/write a bunch of presets programmatically in a loop, you have to do it in a routine and insert “s.sync” statements appropriately.

1 Like

PS: if you cross-post on Facebook, at least include the link to the forum post, so I could have written my answer here in the first place. For technical questions, the forum is always preferrable because it is searchable and archived and therefore helps future users. Facebook posts, on the other hand, are quickly lost forever in the ether.

1 Like

I’m not sure what I did to screw up the process earlier. Let’s chalk it up to pilot error. I’ve got it working now. Thanks.

Apologies for cross-posting. I wasn’t sure where I’d get the quickest response. Going forward I will restrict my technical queries to scsynth.org. Thanks.