Cabbage Logo
Back to Cabbage Site

Little GUI widget slugs and wishes

So with strings I’d need to compare them to get an index to be then used to select array values?

Yes, you would need to write a string index UDO I guess. Where are your strings coming from? And why do you actually need to update the items? Perhaps there is another way around this?

Sure there is :grin: I’m making some FM synth presets with an i-rate 2D table (2 modulators) and a string table contains their names. In the testing phase this is convenient because I’ll then gradually weed out some presets. I can always print the string table and copy the strings into the combobox, but I just wanted to streamline this a bit.

Are you writing the preset files to disk? If you are, then you can grab the files within the directory as a string array, and then quickly cross reference the name for the index?

That’s a useful suggestion! Although I am not too keen on having many files… In this case I am just using a 2D array (not ftable) which holds very few numbers in each column, and I am appending rows using setrow (to append strings I have an UDO, not very elegant…). Thanks for your input!

Still wondering though if it is not viable to have automatable(0) and allow for an i-rate update of the items?

This I can look at, considering it’s already there for string channels. :+1:

[edit] @Samo, I’ve added support for dynamically changing the items in a non-string combobox, IF automatable(0) is set. I haven’t had a chance to test yet. Let me know if it works Ok.

In ver. 2.8.12, using text(“A”,“B”) for combobox now seems to make one item called “A,B” instead of two items “A” and “B”. The dynamic changing probably works, but it results in the same issue as a static set-up.

[edit] it is actually an issue with text identifier for all buttons. Instead of showing the text for ON and OFF states text(“ON”, “OFF”), it shows both labels together “ON, OFF”.

Something else seems to be broken (really bad!). I can’t go into the edit mode on my complex instrument (haven’t identified what is causing it yet). Cabbage hangs when I try to edit UI.

[edit] I can run my instrument one time, but the next time it hangs. Deja vu? Maybe this is related to the above issue of button labels?
[edit] just tested 2.8.10, the hanging problem comes before the combobox change.
[edit] and hanging is there in 2.8.9 as well, but not in 2.8.8! There is also a changed, linux-ified look of the IDE there :slight_smile:

… and custom identifiers are still being erased when mouse clicked in edit mode.

Ah yeah, that latest build is not workable. Shoot, an obvious mistake now that I think about it. And I thought I was being clever :grimacing:

In what sense you think that is not workable? Do you have any clue about the hanging issue in all builds after 2.8.8?

A small update on the hanging issue: there seems to be something with the path to the csd file… if I move my file to another location, the crashing seems to cease. It is not due to the png or txt files that I use. It really seems related to the path to the csd file. However, I can’t replicate that with a simple test csd. This is really confusing.

In so far as any text() identifiers that use multiple items will break. I just pushed a fix for this now.

I can’t recreate this here :thinking

Yes, the new build system is not copying over the correct icons. I didn’t notice it here because I have a custom icon path set. I’ll try to get that sorted too.

I’m not sure where this fix went. Shoot, looks like I failed to push correctly, and then ended up losing it. At least I know where to implement the code. Things are a little in the air right now with the transition to JUCE6 and the new build system. Bear with me. I hope the dust will settle on this soon.

Of course! Thanks!!!

Please keep in mind also the change after 2.8.8 which apparently causes some feedback loop possibly related to the csd file path. I’ll try to pinpoint the issue further and potentially send you some example to test.

I would be most interested if you can identify the source of this one. There was an issue with whitespaces in the csd file, but I thought it was resolved when Csound 6.16.2 was released. What version are you running there?

I don’t have whitespaces in my path or csd file. I have Csound 6.16 (Aug 23 2021), the one that comes with Cabbage installer.

This path hangs Cabbage:
/Volumes/Data2015/Projects/programming/audio_programming/cSound/Cabbage/Samo_CabbagePlugins/Cabbage_code/bounculo/bonkolo6/bonkolo_v6.csd

Apparently no problem here (same contents of the csd):
/Volumes/Data2015/Projects/programming/audio_programming/cSound/Cabbage/Samo_CabbagePlugins/Cabbage_code/test/test_widget_hang.csd

Tested with v. 2.8.16 on MacOS 10.14.6

I just recreated those paths here on my machine and they both ran without any problems. From looking at your paths, it’s clear that the one that is struggling is longer than the one that works. For now, can you try placing the bonkolo_v6.csd into say the audio_programming folder and see if it continues to pose problems?

No problem if I place it there ( bonkolo_v6.csd in audio_programming). Simple examples don’t have this issue. Later today I can try to find out what in my code causes issues.

So moving your .csd to a short path works, yet a simpler .csd, when run from the same longer path also works fine? :confused: (<- This emoji does not correctly capture my confused face at all!)

Yes, there is something in my csd that is causing problems (in these later betas).

[edit] It is my preset system (again!). Seems to be a good stress test csd (at least). You might remember it from a few of our previous exchanges? Could you run it though your magic wheels? Let me know if I shall send it to you.

[edit] OK deja vu for real! It is these line that infect it apparently:

SPathToCsd chnget "CSD_PATH"
SDefaultPresetName strcat SPathToCsd, "/preset.txt"

while this is OK:

SDefaultPresetName strcpy "preset.txt"