Whenever I try to save a preset in my spectral delay plugin, cabbage crashes. It is still using the old identChannel methods for a lot of things which I think could be contributing to the issue. specDel.zip (1.1 MB)
Check out the PresetsNamed example under Miscellaneous. You might be able to copy-paste the preset widgets from there into your .csd and get things working
Hi @Chris_Poovey, I’ll run this through the debugger and see what gives. it crashes for me here too.
The quick fix here is to add the file type a populate identifier for the
filebutton widget, i.e,
combobox bounds(420,20,55,16) automatable(0) populate("*.snaps") filebutton bounds(480, 20, 40, 16), text("Save"), mode("preset"), populate("*.snaps")
I’ve pushed a fix now so that your original code will no longer crash. Thanks for the report. Nice instrument!
That fixed it!
With the presets working I am running into an issue where I cannot get the preset combo box’s channel in the csound code
PERF ERROR in instr 5 (opcode chnget.k) line 43: chnget.k: not initialised
from file D:\Documents\GitHub\CabbageWorkspace\SpetralDelay\spectralDelay.csd (1)
kpreset chnget.k “presetmenu”
I need to check when a preset is switched to update my user tables. I do not do in on every parameter change when I am adjusting the tables, but rather copy them all when the generator is closed using an event.
I there a way to check when the preset has been changed? If not I can probably work our some hacky way to make it work, but I was hoping there was a more direct method
I figured a way around the issue through checking for changes and putting the changes in a queue so the tables only update every so often when they need to.
You should be able to get the preset name from the combo box channel? I’ll test later and see.
I did your sugestión and still crash, but I dig in google on this and I found maybe an answer I will try today, instead of “ snapshot” I will write “namedsnapshot”, I will post later again to give feedback on this
If that doesn’t work please post a simple example for me to try. If it falls for me it should be ready enough to fix. Btw, what version of Cabbage are you using?
thats the error it gives me before it close, I have to record a video so I could pause and read what it said, I tried everything I could, no results , im using version 2.8.3 because if I use a newer version it won’t show certain stuff because of the indent channel incompatible with new guiMode , this is and old script, also it won’t even load sound because it shows in red an error in directory. its a 2486 line code si if you need something what do you need? the code of the save, load preset area? thanx
p.s. it saves presets and loads presets without crashing if I do not load sounds, but when I load the sounds it crash if I try to load a preset or delete the preset
I think it’s always a good idea to use the latest version, even if it involves some work rewriting things. But if you zip the entire project and PM me a link I can take a look when I get a chance. It looks like the path is not correct?