Cabbage Logo
Back to Cabbage Site

Solution for user-made presets?

The latest beta that is currently cooking allows users to reselect an item, at which point it will return the state back to how it was before editing. It will be available here once it’s done. Let me know how it goes. :+1:

I fear there is still a bug in the save mechanism if one overwrites a preset:

https://drive.google.com/file/d/1AjcKPW6Wi_Bgsp8o4RLRaP_lHOPHDJm1/view?usp=sharing

I loaded the preset “e-piano” then I changed the sustain (just to create a difference) and saved it under the same name. Then the combobox jumps to the last preset, “organ”. Selecting “e-piano” again shows that it did the save/overwrite correctly just did not stay with that preset.

Thanks. I was sure there might be some teething issues with this!

I think I know what is going on here. In the previous system jumping to the last preset made sense as the last preset was always the most recent one. Thanks, I’ll take a look today and hopefully find a fix.

That’s fixed now. You can grab the latest build when it’s done. Let me know :wink:

I will try it out. Does the build also include the stack dump mentioned in the other post Hello Cabbage falls very often. Any suggestion? ?

No, I posted that to the other thread. Note that the stack dump version doesn’t have the fix for the presets. Actually, the latest dev build does have a stack dump on exit, but as it’s a release build I’m not sure how much info it will produce for us.

Okey, so I’m trying to collect the save and remove button into one combobox, but when doing a chnget on the preset buttons I get this error:

PERF ERROR in instr 8 (opcode chnget.k) line 599: chnget.k: not initialised
from file C:\Program Files (x86)\VstPlugins\Graindrop Beta\Graindrop Beta v1.4.csd (1)
kRemove chnget.k “RemoveButton”
note aborted

Any way around this?

Can you send me a simplified .csd illustrating the the problem?

Something like this
PresetsNamedButtons.csd (1.2 KB)

kMenuTrigger chnget "Combobox"   
kSave chnget "SaveButton"
kRemove chnget "RemoveButton"

     if changed:k(kMenuTrigger) == 1 then  
            if (kMenuTrigger == 1) then
                kSave = 1
            if (kMenuTrigger == 2) then
                kRemove = 1
else
kSave = 0
kRemove = 0

Something like this with the combobox

filebuttons send info on string channels, not k-channels. Try

SRemove chnget ...

Although I’m not sure that helps you? I have to run, but I’ll check back in later…

Will test :+1:
Edit: Ah right, it’s a filebutton and not a normal button, noticed now
Edit 2: Hmm, can’t make it trigger…

Sorry, I didn’t quite have time to look at what you are trying to do. When you use a filebutton in preset mode it doesn’t send any channel data. But there is no good reason for it not to. It just never came up before. Let me take a look…

1 Like

Ok, new build is just underway. You should now be able to grab the name of the newly created and deleted presets from their respective channels.

instr 1

kValue init 0
SSave chnget "SaveButton"
if changed:k(SSave) == 1 then
    kValue randi 200, 200
    printk2 kValue
endif 

endin
1 Like

Okey, will try it!

So what I’m trying to do is to trigger the save and delete button through a combobox. I have collected different options into one combobox to reduce clutter.

ComboboxTrigger

Edit: Basically have the save and delete button invisible, but trigger then through this main combobox

Oh I see. Nope that’s ain’t going to work. File buttons are a kind of special case.

Okey, thanks for confirming it

So I’ve tried making some presets now, and I noticed something odd.

I have two buttons that switches between two knobs.

Example of one of them:

 if changed2(gkSyncButton) == 1 then
     if gkSyncButton == 0 then
         SIdent_1 sprintfk "visible(%d)", 0
         chnset SIdent_1, "delaysyncIdent"
         SIdent_2 sprintfk "visible(%d)", 1
         chnset SIdent_2, "delayIdent"
     
     else
         SIdent_1 sprintfk "visible(%d)", 1
         chnset SIdent_1, "delaysyncIdent"
         SIdent_2 sprintfk "visible(%d)", 0
         chnset SIdent_2, "delayIdent"
  
     endif
 endif

This is what happens when I switch between presets (notice the pitch-knob). This only happens with the Pitch and the Delay-knobs. It’s worth mentioning that both the hidden and the visible knob is sharing the same channel so when you push the button, it won’t jump to another value.