Cabbage Logo
Back to Cabbage Site

Easier way to share presets

I’m just trying to use the example you provided, when the file explorer shows, I put a name ans save, and then, Cabbage window became blurry with the message that the program stops working

Where are you trying to save them to? I’m wondering if it’s a permission issue? I just tried again here and I’ve no issues. Also, can you try commenting out the contents of the save file instrument and see if taht gets you past the issue. At least we might narrow down where the problem is.

Alright, it was my Csound version, not up to date, so I can successfully save a preset file that way, but when I open it, it doesn’t restore the state of the synth :confused:

My bad haha ^^ I found the culprit :slight_smile:
chnset i1, "att" chnset i1, "dec" chnset i1, "sus" chnset i1, "rel"

When I correct that to
chnset i1, "att" chnset i2, "dec" chnset i3, "sus" chnset i4, "rel"

It works perfectly :smiley: Sure I’ll have to save lots and lot’s of variables, but as it works perfectly I won’t complain!

Thanks a lot for providing this nice workaround ! If there wasn’t the VST issue, my synth would have be finished!

Glad you got it to work. It’s a bit of coding, but ultimately you gain more control this way. I think the new mechanism for setting presets names when saving is a good addition, so thanks for prompting that.

I wouldn’t be too concerned about the VST issue. I think this move from Steinberg is more an attempt to get the big fish to move on from VST2.4 and embrace VST3. If I was you I would release your synth anyway. I will try to get a new Windows build done in the next day or so. You probably have enough work to be doing with your new preset system in the meantime!

1 Like

Hey Rory, I’m noticed a weird behaviour of this trigger
if changed:k(chnget:S("openFile")) == 1 then

If I try to open the same preset (let’s say, after tweaking the synth I want to reload the preset)
I put a prinks to debug and it seems like if I try to load the same file 2 times in a row, the trigger is not triggered

Could you please have a look ?

Thanks in advance,

That makes sense because you’re not changing the name of the file. In that case it would probably be best to add an update button that will overwrite the previous file without opening a file dialogue?

It hardly makes sense to keep showing the dialogue even when the filename remains the same?

Yes :slight_smile: I added a “reload” button, that reset the preset to it’s original state, thanks for the tips !

Hey Rory, I managed to add a listbox that lists all the .pres files in a folder, so you can click to load them. (Like when using snaps but the .pres are easier to share)

So now, I just need a refresh button to re-populate the list box when the user saves a new preset

Is there a way to trigger that repopulation ? (Without closing the plug-in)

Thanks in advance,

I’ll take a look. Did you try using an identchannel and sending a populate() identifier to Cabbage from Csound? I can’t recall if support for updating a file list is there, but if it’s not I’ll add it.

1 Like

I tried sending a populate the the box (identchannel(“boxl”))

chnset “populate(”*.press",“presets”)",“boxI”

But because of the quotes I can’t do that without an error.

Alright, Let me know if that was not implemented !

Try:

populate(\"*.press\",\"presets\")","boxI"

You need a \ before each quote that appears as part of the string.

You needn’t bother testing that, it don’t work. But I’ve added a way of doing it. I’ll post a few more details once I get around to building a test version for Windows. That VST2 thing messed up all my automated builds.

Yeah, no more error but it doesn’t work as you said.
But thanks for the backslash tip :slight_smile:

Alright, I’ll try again when you will release the new binary !

Thanks a lot !

I found an other issue :
With the code you provided above :
If I save a preset and then load it right after, nothing happens.
So then I try to re-run the plugin in Cabbage and it results in a freeze

Do you notice the same behaviour ?

EDIT : I tried also in LMMS after exporting, and the same, LMMS freezes

Is this just with the new version I posted or has this problem been there all along? I’m seeing the same thing.

[edit] Add ficlose SFileName to the instrument that saves the files. That seems to fix the problem.

Btw, I sorted the automated Windows build. The most up to date binaries can be found here. Just click anyone in green to go to artifacts. That should give you the full installer. I’ve fixed those issues you were seeing yesterday if you want to try out the latest build.

1 Like

Will try it right now :slight_smile:
Thanks a lot !

EDIT : Cabbage crashes on startup… :confused:

Ha. That’s not a great start! I’l have a look.

it’s working fine for me. Can you try opening it again. Sometime if you try to run straight after the install it doesn’t seem to work.

Yeah…

Btw, in the meantime, I managed to create a preset manager based on single files : presetmanager2.zip (1.4 KB)

Just uncrompress everything and load the .csd file.
You can save a preset using the save button anywhere you want
If you save a preset in the “presets” folder in will appears in the listbox after the next plugin startup.

To open a preset you have 2 ways : the open button to search for any files on your computer, and the listbox to quickly load a preset saved in the “presets” folder

you can reload the lastest preset using the “reload” button.

For some reason, the preset name doesn’t displays properly when you use the open button (maybe because open load the path with “/” and the listbox load path with “”

Maybe it will be useful for someone :slight_smile: