Cabbage Logo
Back to Cabbage Site

Solution for user-made presets?

Thanks @Retornz, I took a look at your simple example, and I can see the issue. My first attempt at a fix does indeed fix the problem, but causes issues with standard string comboboxes :rage:

I’ll take another look when I get a chance, but it might be Monday before I get something. I’m not sure if it’s any good to you, but I wrote a channel save and channel recall opcode read and write to JSON. It means you don’t have to keep track of all the parameters you want to save.

1 Like

As I was walking away from my machine the answer came to me :rofl: Comboboxes that scan directories automatically add a ‘Please Select…’ as the first item, although it doesn’t do anything. String comboboxes don’t, which explains why the indexing got all messed up. I guess the question is, do we need the ‘Please Select…’ item or can we drop it?

1 Like

I think I’ve fixed this now. Please test in the latest beta builds. Be careful, when setting the value of a string combobox, you need to pass the string, not the index:

combobox bounds(170, 126, 180, 15) populate("*.pres", "presets") channel("box") channeltype("string") identchannel("boxI") value("1-some.pres")
combobox bounds(170, 186, 180, 15) items("this", "that", "the other") channeltype("string") value("that")
1 Like

To me, for Listbox / Combobox the “please select…” is not necessary (in my Cabbage build for ToneZ I got rid of it).
I can understand when people would like to have this indication, so maybe the best would be to enable it by default but have something like : selectindicator(false) that could be set to Combobox & Listbox to remove this “Please select…” ?

I actually got rid of it. Removing it makes things a little more consistent across widgets, and I don’t think it will break backward compatibility. So I think your preset manager should now work again :wink: I’ve been recommending it to users quite a bit!

Thanks for all the work and how quickly you did this. I am eager to try it out but I fear I have a much bigger problem now. Cabbage won’t start at all… (I posted this in another thread where it is more related: Entry Point Not Found)

So when I try the new “presetManager_CBBOX_BUG.zip” file after downloading the newest version of Cabbage, it seems to work. However, after saving the preset, the combobox starts blinking for some reason

ComboboxBlink

Oh :flushed: thanks for testing, I’ll take a look!

1 Like

Thanks again for making these changes so quickly. I tested this with an instrument you can find here: https://gitlab.com/RZ-FZJ/rz-cabbage-recipes. It seems to work without any problems. I even don’t have the ‘blinking problem’.

@RZorn, @hdale94, what platforms are you on? I wonder if the issue is OS dependant?

Win10 64-bit. The blinking problem is with the custom solution that @Retornz provided, and not the “named snapshot” mode.

The snapshot mode works great, but @rorywalsh is it possible to remove presets from the snapshot mode without going into notepad and editing the .snaps file? I think the consumer expects a simple way of removing presets, which was why I was leaning towards the custom solution.

I can take a look. Maybe a right-click on the preset to delete? I was working of the simplified zip that @Retornz posted. I didn’t try his more involved custom preset manager system.

Yeah that works, but maybe with a confirmation window so the user doesn’t accidently remove a preset?

I was also using the simplified one.

@hdale94, I got this sorted now, the flickering that is. I just have to look into another bug before I return to the removing presets ideas :wink:

1 Like

I’m just looking into this now. It seems that I can’t access a right-click in a combo box without some serious reconstruction of the combobox widget. This leaves the option of modifying a filebutton to add a remove preset mode? It’s just about the only thing that will work for this?

Using a filebutton to remove presets is a nice way to do it yeah :+1:

I’ve just started a new build that will allow users to remove the currently selected preset by setting the mode() of a file button to ‘remove preset’. Here’s an example:

<Cabbage>
form caption("Presets") size(370, 280), colour(58, 110, 182), pluginid("MPre")
keyboard bounds(10, 90, 345, 95)
rslider bounds(12, 8, 85, 79), channel("att"), range(0, 1, 0.01), text("Att.")
rslider bounds(98, 8, 85, 79), channel("dec"), range(0, 1, 0.4), text("Dec.")
rslider bounds(184, 8, 85, 79), channel("sus"), range(0, 1, 0.7), text("Sus.")
rslider bounds(270, 8, 85, 79), channel("rel"), range(0, 1, 0.8), text("Rel.")
combobox bounds(74, 190, 100, 25), populate("*.snaps"), channeltype("string")
filebutton bounds(12, 190, 60, 25), text("Save"), populate("*.snaps", "test"), mode("named snapshot")
filebutton bounds(12, 220, 60, 25), text("Remove"), populate("*.snaps"), mode("remove preset")
</Cabbage>

Check it out and let me know if there are any issues. I also fixed that earlier bug.

1 Like

When I export as a .vst, it doesn’t export the presets it seems like. Other than that it works nicely :+1:

Only thing I’m thinking of is perhaps the delete confirmation window visuals could match the save window for consistency, and maybe having a singular button for “no” or “cancel” as they kind of do the same thing yeah?

To have it export the presets use the bundle() identifier. I’ll update those other things when I get a chance. I’m not a fan of the popup boxes, and I think giving users the option to remove presets is a little dangerous, but the community has spoken on this one. I’ll take a back seat :rofl:

1 Like

I think it’s nice to be able to clean up the preset combobox when working on your own presets. If someone is working on a preset, he/she could be making some backup presets along the way. So then in the end you might want to remove the presets that now are unnecessary, and keep the final one :+1: