I’ve pushed through the latest changes. They are available now in Azure. Note that in order to use these you should add guimode("queue")
to your form definition. Below is a quick rundown of new opcodes, and here is a short video overview of them in action.
cabbageSet kTrig, SChannel, SIdentifier, XArgs
cabbageSet kTrig, SChannel, SIdentifierString
cabbageSet SChannel, SIdentifierString
Sets/updates widget identifiers whenever kTrig is 1, or if you leave out the kTrig, it will set it at i-time. Identifiers can be updated by passing arguments to a single identifier, as show below. You can also set multiple identifiers as a single string.
Example:
cabbageSet metro(1), "image1", "colour", random:k(0, 255), random:k(0, 255), random:k(0, 255)
cabbageSet metro(1), "image1", "colour(255, 0, 0), bounds(10, 10, 100, 100)"
cabbageSetValue SChannel, kValue [, kTrig]
Set the value of a widget, for example the value of a slider, or combobox. kTrig is optional. If left out, this will update on every k-cycle.
Example:
cabbageSetValue "tempo", random:k(1, 100)
Let me know how you get on. I’ve not tested these thoroughly yet. Some identifiers might not work yet, but just let know and I will sort them out asap.
kValue cabbageGetValue SChannel
SValue cabbageGetValue SChannel
iValue cabbageGetValue SChannel
kValue [, kTrig] cabbageGetValue SChannel
SValue [, kTrig] cabbageGetValue SChannel
Gets the current value of a widget, for example the current value of a slider, combobox, button, etc. You can optional an a trigger output variables, which will send a trigger signal of 1 whenever the value has changed.
Example:
kButtonValue, kTrig cabbageGetValue "mute"
kIdent cabbageGet SChannel, SIdentifier
SIdent cabbageGet SChannel, SIdentifier
kIdent[] cabbageGet SChannel, SIdentifier
SIdent[] cabbageGet SChannel, SIdentifier
kIdent [, kTrig] cabbageGet SChannel, SIdentifier
SIdent [, kTrig] cabbageGet SChannel, SIdentifier
kChannelValue [, kTrig] cabbageGet SChannel
kChannelValue cabbageGet SChannel
SChannelValue [, kTrig] cabbageGet SChannel
SChannelValue cabbageGet SChannel
Use to get the current value of an identifier. For example, the button text for a particular widget, or the colour of a widget. Widget must have a channel name specified. Where only a single value is passed to this widget, it will query a plain old channel. For example, you use it with the CURRENT_WIDGET reserved channel to find out which widget is currently in focus:
SChannel, kTrig cabbageGet "CURRENT_WIDGET"
printf SChannel, kTrig
cabbageCreate SCabbageCodeString
Used to create a Cabbage widget at init-time. (only works at init-time!)
Example:
cabbageCreate SWidget "rslider bounds(10, 10, 100, 100) channel(\"slider1\")"
If you create your GUI using this opcode, you will no longer have any control over them using the Cabbage GUI editor.