Cabbage is written in C++.
Future directions for Cabbage
Will Cabbage 3 still be able to generate standalone apps?
Yeah, standalone applications will be supported again, along with all the other plugin formats.
Sounds very exciting indeed.
I have had a computer crash and am now in the process of reinstalling the audio software. Would it be better for me to wait for the new version of Cabbage before installing it again? Iām not currently using Csound or Cabbage, but I plan to do so again some time in the future. But that may be months or a year from now.
I hope that Cabbage wasnāt somehow the cause the crash
As to whether or not you should wait, itās up to you. The instrument you develop with the current version should still run fine with the newer version. Some small things may need updating, but nothing major. So if you have some things you are keen to work on, Iād say go ahead with the latest dev build
The cause of the crash was that I had collected too much software on my computer. I have now minimized the software to those audio programs that I frequently use or at least plan to use in the foreseeable future. Thereās so much fun stuff around, but one cannot seriously work with all of it. However I will keep Csound and Cabbage and a few more.
Right? Itās crazy.
Just an update on this. Iām slowly starting to work my way through all the widget examples that ship with Cabbage 2. Here you can see the property editor, and a Cabbage instrument actually running inside VS Code
So you know the way that comboboxes start from 1 instead of 0ā¦
This has always annoyed me. It was like this because JUCE used to populate the combobox with a default āselectā item, and because 20 years ago I didnāt know how to get rid of it
Now would be a good time to change to normal indexing? What do people thing? Remember this new behaviour would only affect new plugins, or those that were updated. Iāll leave it at 1 for now, but maybe people can chime in with their thoughts.
This too has also annoyed me mildly from the start. Iām relieved to hear that it was a Juce initiative and not a Rory initiative. Humans count from 1, computers count from zero. Happy to see it changed and I will probably modify all examples where I use old-style comboboxes, tedious though that will be.
Great. Btw, Iām planning on updating all your examples. I donāt expect you to do that.
Btw, would it be worth adding a global identifier to specify count from 1 for combos, defaulting to 0. It would be a lot easier to add this simple flag to older instruments than having to rewrite everything?
Ok, Iām going to propose a somewhat radical idea now for Cabbage 3ā¦
Currently, Cabbage code, i.e.,
button bounds(100, 28, 80, 80) channel("button1") text("Play", "Stop")
is stored internally as a JSON object, i.e.,
{"type": "button", "bounds": [100, 28, 80, 80], "channel": "button1", "text": ["Play", "Stop"]}
I find myself writing parsing functions that convert one representation to another. The thing is, the JSON version isnāt that far removed from the Cabbage version. If Cabbage used JSON syntax for its UI declarations, I wouldnāt have to write or maintain any parser. Plus, we would gain the ability to format our Cabbage code any way we like, without having to worry about breaking something. Weād also adhere to a simple, albeit strict, set of well-defined rules that I canāt accidentally break with an ill-informed update.
I will provide scripts users can run on older code to convert their syntax to JSON if, for some reason, they want to re-release a plugin with Cabbage 3. Let me know what you all think.
That seems like a smart choice to me.
I think itās an excellent idea, and with json formatters weāll be able to beautify the json definitions to have cleaner code (my Cabbage UI code is a bit messy now, so itāll solve this issue)
Any issues with macro variables in the JSON stuff? Iād really like to be able to define a color in one place and have it successfully populate everywhere. But also sizes that might be in a different macro.
I havenāt given much thought to macros. But one thing that will be possible in the new version is the option to define your own defaults for any widget. The widgets are created using JSON text is readily accessible. For example, a numberbox/slider is defined as:
{
"type": "nslider",
"top": 10,
"left": 10,
"width": 60,
"height": 60,
"channel": "nslider",
"min": 0,
"max": 1,
"value": 0,
"skew": 1,
"increment": 0.001,
"index": 0,
"text": "",
"fontFamily": "Verdana",
"fontSize": 0,
"align": "centre",
"textOffsetY": 0,
"valueTextBox": 0,
"colour": "blue",
"fontColour": "#dddddd",
"outlineColour": "#525252",
"outlineWidth": 2,
"decimalPlaces": 1,
"velocity": 0,
"popup": 1,
"visible": 1,
"automatable": 1,
"valuePrefix": "",
"valuePostfix": "",
"presetIgnore": 0
}
Users can edit/modify these default values as they wish. They can even add new fields that can be accessed/modified within Cabbage. I think this could be a powerful feature. In relation to the macro issue, you could handle this in Csound with a couple of well placed cabbageSet
's.
Another thing to note with this change is how the cabbageSet opcodes work. They will also expect json type strings, for example:
cabbageSet "gentable1", "tableNumber(99)"
now becomes:
cabbageSet āgentable1ā, {{ātableNumberā:99}}
note the use of the {{-}} so we donāt have to escape the quotes. If user want to update instruments they will nee to take that into account.
Go ahead, Rory! Cabbage is great!
this is exciting! Good luck:)