Cabbage Logo
Back to Cabbage Site

Easier way to share presets

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:

Still no ways… I will try to uninstall everything related to Cabbage/Csound, run a ccleaner an try again

EDIT : Nope… Still crashing… I don’t understand why…

EDIT2 : Seems related to the .exe file, if I try an older Cabbage.exe file, no more crashes

Hmm. I can think why this is. I’ll take a look.

Hi Rory, I tried to refresh the preset listbox after the user saves a new preset, I’m almos there but I still have to press my “reload” button after saving to show the new preset, I don’t undrstand why I can’t trigger like a “auto-click” on the reload button right after the user clicks saves presetBug.zip (1.4 KB)

Here is the project file, let me know if you found a way to do it !

Thanks in advance,

Sorry, I didn’t implement in the listbox, only the combobox. I’ll do that now. Leave it with me. I’m currently moving through airports. Might be a day or two before I find time for it…

I just pushed through some changes, but I can’t test. There should be a new build available to test here in a few minutes. To update the listbox, or combobox, do this:

chnset "refreshfiles()", "comboI"

Where comboI is the identchannel for the listbox or combobox.