Strings in Csound are a nightmare as they are technically i-rate, but can be modified at k-rate using opcodes. But this could also be something I’ve done to screw things up
It doesn’t work something else must be screwing this.
These two line are actually not enough (tested in a simple csd). When they cause trouble, I have them in an UDO, could that be different?
I guess it depends on what the rate of the UDO. Many of Cabbage’s string channels are assigned at k-rate, so if you try assigning them at i-rate you might hit issues
But why would it work with strcpy then? Is there any alternatives I could try? Any other clue? Maybe moving all my code out of the UDO?
[edit] just tested, moving it out of UDO doesn’t resolve the issue
Do you mean when you drag them around? Or when you select one and use the arrow keys? For me they move in jumps of 2 pixels either with the mouse, or the arrow buttons. 8 pixels per jump does seem excessive?
[edit] On Windows it is 2 pixels per jump, but MacOS it is 8. Thanks, I’ll look into this and see if we can’t reduce that
Seems it worked in but a single case, which just happened to be the one I was tested You couldn’t make this up I’ll push a fix later. Sorry about that.
The custom identifiers don’t get erased now. Thanks!
However, if I change widgets identified by custom identifiers, e.g. cabbageSet SParNames[ind], "outlineColour", 200, 150, 60, 200, the changed attribute (like outlineColour) gets updated on the widget after clicking it. I guess this works similar to updating code by the automatically assigned channel names (e.g. on image) and there is a general mechanism that updates widgets after clicking.
This may be annoying in some cases, like in my example of the outlineColour. I might just want to change custom identifiers to do a bunch of widget modifications based on widget groups marked with corresponding identifiers. This would be a nuisance if, in my example, I’d change the identifier and then update only some property other than outlineColour for that group of widgets, and I’d need to clean up the automatically changed outlineColour for example. Another reason for not updating the widget code would be readability. Consider also the example of image channel name, which I might never need. In cases when I need it, I intentionally give them meaningful channel names.
I generally find it annoying when code (csd file content) changes automatically under the hood (without my intention/knowledge). More specifically, this seems to be common place when clicking on widgets in edit mode. I’m wondering if it would be possible or would it make sense to never update the widget related code in the csd file? Again, I just mean the explicit user code (text in csd), not referring to any housekeeping IDE code (like taking care of channel names for example).
Add outlineColour during the initialization pass using cabbageSet, enter edit mode and click the slider. The widget code changes to: rslider bounds(412, 92, 32, 32) range(0.001, 2, 0.1, 0.23, 1e-06) channel("PitchMODSpeed") _toSL(1) outlineColour(200, 150, 60, 200)
No click - no change of code. Possible to avoid this changing of code triggered by clicking widgets? I see no benefit having it, just nuisance. Or?
Oh I see. I will try to resolve that. It’s kind of a bug and a feature all at the same time. In reality it’s just a side effect of how the widget data is passed between Csound and Cabbage. Leave it with me
Yeah, this is a tricky one. When we stop a performance in the Cabbage IDE, we don’t delete the plugin, we simply stop it from performing. Therefore all the changes that are dynamically made to the GUI are still present when we enter edit mode. Hmm. I’m thinking
The edit mode seems to work nice in ver. 2.8.37. Tested with custom identifiers, images and labels. Clicking on widgets does no longer trigger automatic code updates.
Not sure if it is completely general though?
I like this change very much! It is a little quality of life improvement. Thank you!
Stressless clicking ahead
After the change you made in ver. 2.8.37 to address the edit mode, Cabbage seems to be crashing sporadically when I stop my instrument.
I’d like to help debug by running in XCode. How shall I update the code?
I run: git pull origin cmake.
Do I then need to re-build with: python build.py --config=Release
and/or with: python build.py --project=Cabbage --build=False --config=Debug?
Sorry for my lack of knowledge! I’m trying …to get familiar
For now I got one crash (with ver. 2.8.24):
JUCE Assertion failure in juce_LookAndFeel.cpp:73
Program ended with exit code: 9