Cabbage Identifiers
Each Cabbage widgets supports a set of identifiers. Below is the full list of all identifiers used across all widgets. Click on a link to read more about the identifier, and the widgets it supports.
active | align | alpha | ampRange | arrowBackgroundColour | arrowColour |
autoUpdate | automatable | backgroundColour | blackNoteColour | bounds | bundle |
caption | caretColour | channel | channelType | colour | colour:0 | colour:1 | corners | crop | defaultValue | displayType | doubleClickTogglesEdit | file | fill | filmStrip | fontColour | fontColour:0 | fontColour:1 | fontSize | gapMarkers | guiMode | guiRefresh | highlightColour | identChannel | imgFile | import | increment | items | keyDownColour | keySeparatorColour | keyWidth | keypressBaseOctave | latched | latency | lineThickness | markerColour | markerEnd | markerStart | markerThickness | max | meterColour | middleC | min |
mode | mouseInteraction | mouseOverKeyColour | moveBehind | numberOfClicks | opcodeDir | openGL | outlineColour | outlineThickness | overlayColour | parent | pluginId | populate | popup | popupPostfix | popupPrefix | popupText | presetIgnore | protectedItems | radioGroup | range | readOnly | rotate | sampleRange | scrollbars | scrubberPosition | shape | showScrubber | sideChain | signalVariable | size | sliderBounds | sort | style | suffix | svgElement | tableBackgroundColour | tableColour | tableGridColour | tableNumber | text | textBox | textBoxColour | textBoxOutlineColour | textColour | titleBarColour | toFront | trackerBackgroundColour | trackerCentre | trackerColour | trackerEnd | trackerInsideRadius | trackerOutsideRadius | trackerStart | trackerThickness |
typeface | updateRate | value | valuePostfix | valuePrefix | valueTextBox | valueTextBoxBounds | velocity | visible | whiteNoteColour | widgetArray | wrap | zoom |
active(val)
Will deactivate a control if 0 is passed. Controls which are deactivate can still be updated from Csound.
Supported Widgets:
| button | groupbox | image | signaldisplay | gentable | encoder | infobutton | numberbox | texteditor | label | combobox | range | sliders | listbox | optionbutton | filebutton | checkbox | soundfiler | meter | xypad |align("position")
Aligns the widget's text. "position" should be 'left', 'right' 'centre', or 'top'.
Supported Widgets:
| label | combobox | listbox |alpha(val)
A value between 0 and 1 will set the alpha blend value for the entire component. Can be useful if you need to fade widgets in and out.
Supported Widgets:
| button | groupbox | image | signaldisplay | gentable | encoder | infobutton | numberbox | texteditor | label | combobox | range | sliders | listbox | optionbutton | csoundoutput | filebutton | checkbox | soundfiler | meter | xypad |ampRange(min, max, tableNumber, quantise)
Sets the amplitude range(Y-axis) for a particular table. Min and Max are the minimum and maximum values. Quantise will set the resolution of the Y axis for editing. For example,
if quantise is set to 1, all points added to the table will be quantised to integer values. If quantise matches the dynamic range of the table, the table will be drawn as a grid of on/off switches. If only one ampRange() identifier
is used, a table number of -1 can be set so that each table displayed will share the same amp range.
If the table is not active this identifier can usually be left out. If it is active, and therefore editable, it is important to use this identifier. Failure to do so may cause unexpected result.
Supported Widgets:
| gentable |arrowBackgroundColour("colour")
This sets the background colour of the arrows by the left and right hand side of the keys in the keyboard widgets. Any CSS or HTML colour string can be passed to this identifier.
The colour identifier can also be passed an RBG, or RGBA value. All channel values must be between 0 and 255. For instance colour(0, 0, 255) will create a blue, while colour(0, 255, 0, 255) will create a green with an alpha
channel set to full.
Supported Widgets:
| keyboard |arrowColour("colour")
This sets the colour of the arrows by the left and right hand side of the keys in the keyboard widgets. Any CSS or HTML colour string can be passed to this identifier. The colour identifier
can also be passed an RBG, or RGBA value. All channel values must be between 0 and 255. For instance colour(0, 0, 255) will create a blue, while colour(0, 255, 0, 255) will create a green with an alpha channel set to full.
Supported Widgets:
| keyboard |autoUpdate()
When added to the form declaration, this identifier will causes Cabbage to start a timer that periodically checks for updates to the underlying source code. When it sees the .csd file has changed, for
example through an external editor, it will automatically update the instrument. Note that adding extra widgets will require you to re-instantiation your instrument in the DAW, as widgets are tied to plugin parameters, which
can't be dynamically modified.
Supported Widgets:
| form |automatable(val)
Default 1. Determines if a widget is automatable by a DAW host. Automatable widgets show up as plug-in parameters in the host. Non-automatable widgets still communicate with Csound but are not accessible
by the host. Note that hosts don't allow this parameter to change dynamically -- the plugin will have to be reloaded for any changes to take effect.
Supported Widgets:
| button | encoder | numberbox | combobox | range | sliders | optionbutton | checkbox | xypad |backgroundColour("colour")
This sets the background colour of the display. Any CSS or HTML colour string can be passed to this identifier. The colour identifier can also be passed an RBG, or RGBA value. All
channel values must be between 0 and 255. For instance colour(0, 0, 255) will create a blue, while colour(0, 255, 0, 255) will create a green with an alpha channel set to full.
Supported Widgets:
| signaldisplay |blackNoteColour("colour")
This sets the colour of the black notes of the keyboard. Any CSS or HTML colour string can be passed to this identifier. The colour identifier can also be passed an RBG, or RGBA
value. All channel values must be between 0 and 255. For instance colour(0, 0, 255) will create a blue, while colour(0, 255, 0, 255) will create a green with an alpha channel set to full.
Supported Widgets:
| keyboard |bounds(x, y, width, height)
integer values that set position and size on screen(in pixels).
Supported Widgets:
| button | groupbox | keyboard | image | signaldisplay | gentable | encoder | infobutton | numberbox | texteditor | label | combobox | range | sliders | listbox | optionbutton | csoundoutput | filebutton | checkbox | soundfiler | meter | xypad |
bundle("./folder1", "file2", "etc..")
The bundle identifier will instruct Cabbage to copy the listed files and folders into the same folder your exported plugin goes. On OSX this will be the plugin bundle itself.
Supported Widgets:
| form |caption("string")
The string passed to caption will be the string that appears on the main application window.
Supported Widgets:
| button | form | encoder | numberbox | range | listbox | optionbutton |caretColour("colour")
This sets the caret colour of a text editor. Any CSS or HTML colour string can be passed to this identifier. The colour identifier can also be passed an RBG, or RGBA value. All channel
values must be between 0 and 255. For instance colour(0, 0, 255) will create a blue, while colour(0, 255, 0, 255) will create a green with an alpha channel set to full.
Supported Widgets:
| texteditor |channel("chan")
or channel("chan1", "chan2")
in the case of widgets that accept two channels such as xypad, soundfiler and range widgets. channel()
accepts
a string/s that names the channel/s that Cabbage will communicate with Csound on. The current value of this widget can be retrieved in Csound using a chnget
, or a cabbageGetValue
opcode. Its value
can be set using the cabbageSet
, or cabbageSetValue
opcodes. hrange
, vrange
, xypad
, and soundfiler
all take two channels:
hrange, vrange : channel("min", "max")
- min and max values
xypad : channel("x", "y")
- x and y values
soundfiler : channel("start", "length")
- start time and length of user selection, in samples
Channels named should start with a letter and cannot have any white spaces. Note that all widgets should have a unique channel name.
Supported Widgets:
| button | groupbox | keyboard | image | signaldisplay | gentable | encoder | infobutton | numberbox | texteditor | label | combobox | range | sliders | listbox | optionbutton | csoundoutput | filebutton | checkbox | soundfiler | meter | xypad |channelType("type")
Specifies the type of channel. Default is "float". If you wish to send the text contained in the combobox, for examples the names of a set of audio samples, set type to "string".
If type is not set to string the index of the selected item will be sent to Csound on the named channel.
Supported Widgets:
| combobox | listbox |colour("colour")
This sets the main colour. Any CSS or HTML colour string can be passed to this identifier. The colour identifier can also be passed an RBG, or RGBA value. All channel values must be between
0 and 255. For instance colour(0, 0, 255) will create a blue, while colour(0, 255, 0, 255) will create a green with an alpha channel set to full.
Supported Widgets:
| form | groupbox | image | signaldisplay | encoder | numberbox | texteditor | label | combobox | range | sliders | listbox | csoundoutput | soundfiler | xypad |colour:0("colour")
This sets the colour of the button when it's value is 0. Any CSS or HTML colour string can be passed to this identifier. The colour identifier can also be passed an RBG, or RGBA
value. All channel values must be between 0 and 255. For instance colour(0, 0, 255) will create a blue, while colour(0, 255, 0, 255) will create a green with an alpha channel set to full.
Supported Widgets:
| button | infobutton | optionbutton | filebutton | checkbox |colour:1("colour")
This sets the colour of the button when it's value is 1. See above for details on valid colours.
You can create an invisible button by setting the colour to something with an alpha value of 0. Images can then be placed under the button to create an image button.
Supported Widgets:
| button | infobutton | optionbutton | filebutton | checkbox |corners(val)
Sets the radius size of the widget's corners.
Supported Widgets:
| button | image | infobutton | numberbox | label | optionbutton | filebutton | checkbox | meter |crop(x, y, width, height)
Crops an image. This is usually intended to be used with an identifier channel and is very useful when using filmstrips or spritesheets.
Supported Widgets:
| image |defaultValue(val)
Sets the default value for a sliders. This is the value the slider will jump to on a double click.
Supported Widgets:
| sliders |displayType("type")
Sets the the type of display. Must be 'spectrogram' or 'spectroscope', 'waveform' or 'lissajous'. Set to 'spectroscope by default.
Supported Widgets:
| signaldisplay |doubleClickTogglesEdit(val)
Used to toggle editing in a text editor. Double clicking on the text editor will toggle readonly mode.
Supported Widgets:
| texteditor |file("filename")
This identifier is used across a number of widgets.combobox
and listbox
- will load lines from a file as selectable items.gentable
and
soundfiler
- will load a sound file to displayimage
- will load an iamge to display (PNG/JPG/SVG)infobutton
- sets the file to display when the button is clicked This can be
a local html file, or a URL.texteditor
- sets the file to load, should be a text file.
If a full file path is not given, file() will search in the current directory, i.e., the directory that contains the csd file that is open. It is best to keep all files in the same directory as your csd file. If you wish to
keep them in a separate folder use relative paths, i.e, ../../folder
.
Avoid absolute path at all costs. Failure to do so will most likely problems with your instruments as soon as you share them.
Supported Widgets:
| image | gentable | infobutton | texteditor | combobox | listbox | soundfiler |fill(val)
This will turn on or off the waveform fill. By default this is set to 1, therefore all table will fill in their envelopes.
Supported Widgets:
| gentable |filmstrip("filename", numFrames, removeA,)
The filmstrip identifier allow users to use a filmstrip style .png to skin sliders. filename
is the name of the .png file to be used. numFrames
is the number of frames in the film strip image. removeA
and removeB
will reScale the underlying slider object, which is invisible due to the skin laid on top of it. For example, in the case of
a hslider, removeA(.1) will remove .1 of the overall length of the slider from the left side, removeB(.1) will remove .1 of the overall length from the right. This allows one to reScale sliders according to where their
skin images start and end.
For a vslider removeA and removeB refer to the top and bottom of the slider. See the KnobManSlider.csd file in the Misc. examples for more details. This idetnfier only works with vertical framed images.
Try to avoid full path names at all costs. They will work fine on a local machine, but will not be valid on another machine.
Supported Widgets:
| sliders |fontColour("colour")
Sets the colour of the font. In the case of slider this sets teh colour of the font in the value textBox if it is shown.
Supported Widgets:
| form | groupbox | encoder | numberbox | texteditor | label | combobox | range | sliders | listbox | csoundoutput | checkbox | xypad |fontColour:0("colour")
Sets the colour of the text that appears on the button when it's in its off state. See above for details on valid colours.
Supported Widgets:
| button | infobutton | optionbutton | filebutton |fontColour:1("colour")
Sets the colour of the text that appears on the button when it's in its on state. See above for details on valid colours.
Supported Widgets:
| button | infobutton | optionbutton | filebutton |fontSize("colour")
Sets the size of a nslider's font.
Supported Widgets:
| numberbox | texteditor | label |gapMarkers(val)
Sets whether gap markers will be visible in slider. These are the lines that denote the position of the thumb in relation to the slider.
Supported Widgets:
| sliders |guiMode("val")
Sets how widgets will be updated. guiMode("polling")
(default if guiMode()
is not specified), will cause each widget's channel to be polled for updates
at k-boundaries. The update rate is set using the guiRefresh()
identifier. If you are using a large number of widgets this can get quite slow, especially if the widgets also contains identifier channels defined
with identChannel()
.
Using guiMode("queue") will improve performance, especially if you are using a large number of widgets. identChannel()
identifiers are not supported when guiMode
is set to "queue".
In this case you can use the cabbageSet/Set opcodes to set and get data from a widget. More details can be found here.
Supported Widgets:
| form |guiRefresh(val)
[!!! DEPRECATED !!!] This is no longer needed when using the new guiMode("queue") system of updated widgets and should only be used for
legacy instruments.
Sets the rate at which Cabbage will update its GUI widgets when controlled by Csound. The value passed represents the number of k-rate cycles to be skipped before the next update. The larger this is the slower the GUI updates will take place, but the less CPU intensive the instrument will be. val should be an integer greater than 1 and is set to ksmps x 2 by default.
For best performance one should set guiRefresh to be a factor of ksmps.
Supported Widgets:
| form |highlightColour("colour")
Sets the colour of the selected text. See above for details on valid colours.
Supported Widgets:
| listbox |identChannel("channel") [!!! DEPRECATED !!!]
Although identifier channels still work, they are no longer supported. Please use the new guiMode("queue") system and the cabbageGet
and cabbageSet
opcodes instead. They are far more efficient then identifiers channel.
Supported Widgets:
| button | groupbox | keyboard | image | signaldisplay | gentable | encoder | infobutton | numberbox | texteditor | label | combobox | range | sliders | listbox | optionbutton | csoundoutput | filebutton | checkbox | soundfiler | meter | xypad |imgFile("type", "file")
Use this identifier to set a unique .svg or .png file to be used instead of the default look and feel. "type" should be one of the following:
Buttons:
- "on" : sets the button image when it is on - "off" : sets the button image when it is off
Sliders:
- "background" : sets the slider background image - "slider"
: sets the slider thumb, or in the case of a rotary slider, the inner circle. This image moves in sympathy with that the mouse as users move the slider.
For more information see Using SVGs and PNGs
Supported Widgets:
| button | groupbox | infobutton | sliders | optionbutton | filebutton |import("file1", "file2", "etc..")
The import identifier will import the file/s specified. This can be useful when including files that contains macros definitions, or custom plant
imports.
Supported Widgets:
| form |increment(val)
Set the incremental step size for the encoder.
Supported Widgets:
| encoder |items("item1", "item2", ...)
list of items that will populate the combo box. Each item has a corresponding index value. The first item when selected will send a 1, the second item a 2, the third
a 3 etc. If this identifier is left out default values of "Item 1", "Item 2", "Item 3", "Item 4" and "Item 5" will be used.
If you wish to use submenus in your combox box, you can use 'items:' followed by a number or a string. The first string you pass to item:..()
will be the sub menu heading. For example, the following will
create two sub menus called Strings and Woodwind:
combobox bounds(10, 10, 100, 50), items:1("Strings", "Violin", "Viola", "Cello", "Contrabass"), items:2("Woodwind", "Clarinet", "Oboe", "Bassoon")
The index of each item is always determined by where is appear in the widget declaration.
Supported Widgets:
| combobox | listbox |keysdowncolour("colour")
This sets the colour of the key when a MIDI note is pressed on an external MIDI keyboard, or through the PC's ASCII keyboard. Any CSS or HTML colour string can be passed to
this identifier. The colour identifier can also be passed an RBG, or RGBA value. All channel values must be between 0 and 255. For instance colour(0, 0, 255) will create a blue, while colour(0, 255, 0, 255) will create
a green with an alpha channel set to full.
Supported Widgets:
| keyboard |keyseperatorcolour("colour")
This sets the colour of the spaces between the notes on the keyboard. Any CSS or HTML colour string can be passed to this identifier. The colour identifier can also be passed
an RBG, or RGBA value. All channel values must be between 0 and 255. For instance colour(0, 0, 255) will create a blue, while colour(0, 255, 0, 255) will create a green with an alpha channel set to full.
Supported Widgets:
| keyboard |keyWidth(val)
Set the width of the keys in pixels.
Supported Widgets:
| keyboard |keypressBaseOctave(val)
This sets the base note that is played when you press a key on the computer keyboard. The value must be between 0 and 10. The default is 3 that means the C note of the third MIDI octave
(C1 key on the widget keyboard, if you don't change the default 'middleC' value).
Supported Widgets:
| keyboard |latched(val)
With latched set to 0 the button will send a message to Csound on the initial mouse press, and once again as soon as the user releases the button. Therefore the button will toggle between 0 and 1 on
each click rather than needing two separate mouse clicks.
Supported Widgets:
| button |latency(val)
Sets the plugin delay compensation in samples. Defaults to ksmps. Setting latency to -1 forces Csound to run at ksmps=1, but does not result in a one sample delay. In this mode, Cabbage performs ‘in-place’
processing. Note this -1 latency is only useful for realtime processing and in almost all cases it is more efficient to use the host’s PDC. Latency can be updated dynamically. The code shown below updates the plugin latency
in realtime with a slider that jumps in integer increments from 1 to 8. Updating a plugin's PDC in real time may not be supported by some plugin hosts.
instr UpdateLatency
kLatencySliderVal, kLatencyTrig cabbageGetValue "latencySlider"
cabbageSet kLatencyTrig, "form", "latency", pow(2, kLatencySliderVal)
printf "Setting latency to %d\n", kLatencyTrig, pow(2, kLatencySliderVal)
endin
Supported Widgets:
| form |lineThickness(value)
Sets the thickness of the line that appears under the groupbox name. Set to 0 to disable.
Supported Widgets:
| button | groupbox | image | gentable | optionbutton | meter |markerColour("colour")
This sets the colour of the marker in a rotary slider. Any CSS or HTML colour string can be passed to this identifier. The colour identifier can also be passed an RBG, or RGBA value.
All channel values must be between 0 and 255. For instance colour(0, 0, 255) will create a blue, while colour(0, 255, 0, 255) will create a green with an alpha channel set to full.
Supported Widgets:
| sliders |markerEnd(value)
Sets where to draw the end point of a rotary slider's marker segment. Value should be between 0 and 1. 0 is the center of the knob.
Supported Widgets:
| sliders |markerStart(value)
Sets where to start drawing a rotary slider's marker segment. Value should be between 0 and 1. 0 is the center of the knob.
Supported Widgets:
| sliders |markerThickness(value)
Sets the thickness of the a rotary slider's marker. Set to 0 to disable.
Supported Widgets:
| sliders |max(val)
If using a double or triple pointer slider (hslider2, hslider3, vslider2, vslider3), max() will set the default maximum position of the maximum thumb controller. The absolute maximum is set using the range
identifier. See above.
Supported Widgets:
| encoder | numberbox | range |meterColour:N("colour")
Sets the colours of the meter. Use meterColour:0("colour")
to set the first colour. Any further colours with cause a gradient fill to be created.
Supported Widgets:
| meter |middleC(val)
Sets the octave number that will appear on the middle C key. By default this is set to 3.
Supported Widgets:
| keyboard |min(val)
If using a double or triple pointer slider (hslider2, hslider3, vslider2, vslider3), min() will set the default minimum position of the minimum thumb controller. The absolute minimum is set using the range
identifier. See above.
Supported Widgets:
| encoder | numberbox | range |mode("mode")
When used with a filebutton, valid modes are:
- file, Default. Will open a browser to select a file
- save, Will open a browser to select an existing file, or write the name of a new file. Note Cabbage will not create this new file, you will need to do that yourself in Csound.
- directory, Will open the browser to select a folder/directory
- preset, Will stop the file browser from opening, and instead write a preset file to disk with a default file name. See Presets
- named preset, Will display a message box with a text editor so that users can name their presets. See Presets
- remove preset, Will remove the currently select preset from the snapshot XML file. See Presets
When used with a texteditor
, it sets multiline mode. Defaults to "single". Use "multi" to enable multiline.
Supported Widgets:
| texteditor | filebutton |mouseInteraction(val)
Enables or disable mouse interaction. Set to 1 by default.
Supported Widgets:
| image | label |mouseOverKeyColour("colour")
This sets the colour of the key currently under the mouse in the keyboard widget. Any CSS or HTML colour string can be passed to this identifier. The colour identifier can
also be passed an RBG, or RGBA value. All channel values must be between 0 and 255. For instance colour(0, 0, 255) will create a blue, while colour(0, 255, 0, 255) will create a green with an alpha channel set to full.
Supported Widgets:
| keyboard |moveBehind("widgetName")
Moves a widget directly behind another. This identifier should only ever be called from your Csound orchestra using a cabbageSet
opcode.
This only works with widgets or plants that have the same parent.
Supported Widgets:
| button | groupbox | keyboard | image | signaldisplay | gentable | encoder | infobutton | numberbox | texteditor | label | combobox | range | sliders | listbox | optionbutton | csoundoutput | filebutton | checkbox | soundfiler | meter | xypad |numberOfClicks(val)
Sets how many clicks initiate an event. The default for a listbox is 1, but this can set to 2 if you would like events to be sent on a double-click.
Supported Widgets:
| listbox |opcodeDir(dir)
This will override the OPCODE6DIR64 directory. dir
should be a directory. It's always best to use relative rather than absolute directories. The only time you every really need to
use this is when you are distributing plugin that use some of Csound's plugin opcodes, in which case you will need to tell Csound where to find these plugins.
Supported Widgets:
| form |openGL(val)
Enables or disables openGL mode. Default is 0. When this is set 1 it will cause the plugin's UI to be drawn with the GPU instead of the software renderer. In plugins that do a lot of UI updating
this can lead to better performance.
Supported Widgets:
|outlineColour("colour")
Sets the colour of a button outline, or a rotary slider`s tracker outline. In the case of rslider's this is the line that is drawn around the rslider's tracker. If you
don't wish to display the tracker outline set the colour to something with an alpha value of 0. See above for details on valid colours.
Supported Widgets:
| button | image | encoder | range | sliders | optionbutton | meter |outlineThickness(value)
Sets the thickness of the widget's outline. Set to 0 to disable.
Supported Widgets:
| button | groupbox | image | gentable | optionbutton | meter |overlayColour("colour")
This sets the colour of the meter overlay. The meter overlay draws a rectangle on top of the meter's gradient fill to give the impression that the meter is moving up and down.
This colour shouldn't have any transparency. Any CSS or HTML colour string can be passed to this identifier. The colour identifier can also be passed an RBG, or RGBA value. All channel values must be between 0 and 255.
For instance colour(0, 0, 255) will create a blue, while colour(0, 255, 0, 255) will create a green with an alpha channel set to full.
Supported Widgets:
| meter |parent(val)
This identifier is can be to set a widget's parent. It should only be used when creating widgets dynamically using the cabbageCreate
opcode.
See plants for more details.
Supported Widgets:
| button | groupbox | keyboard | image | signaldisplay | gentable | encoder | infobutton | numberbox | texteditor | label | combobox | range | sliders | listbox | optionbutton | csoundoutput | filebutton | checkbox | soundfiler | meter | xypad |pluginId("plug")
this unique string must be four characters long. It is the ID given to your plugin when loaded by plugin hosts.
Every plugin must have a unique plugin ID. If you experience problems loading two different plugins, it could be because they use the same plugin ID. The plugin ID seems to be more relevant when working with OSX than on Linux or Windows.
Supported Widgets:
| form |populate("filetype", "dir", ignoreVal)
Sets the type of file to search for, and the initial directory to look in. If you wish to list all wave files from a set directory, use "*.wav"
as the filetype string. If using the filebutton
to record parameter snapshots, you must specify a filetype of "*.snaps", and a mode type of snapshot. If no directory is specified, the file browser
will open in the current working directory. If the ignoreVal
is set to 1 it will ignore the last known location and continue to open from the given directory. If set to 0, or left out completely, the filebutton
will always open at the last directory the user browsed to. When used with a combobox
, or listbox
, it will load all files it finds as selectable items. When clicked, they will send the full file
path to Csound.
If you want to query the widget's current file type or directory you can use fileType
or currentDir
with cabbageGet
.
You can also set the name of the custom preset file. Instead of passing "*.snaps" as the file type, pass the full file name, i.e, "myPresets.snaps". Don't pass a full path here. Cabbage will automatically save and locate from the most suitable directory. Note that the same preset filename should be passed to all
filebutton
andcombobox
widgets involved in the management of the presets.
Supported Widgets:
| combobox | listbox | filebutton |popup(val)
This identifier, used with an image or groupbox will convert the plant into a popup plant. The plant will not be shown on the instrument's main interface, but will instead appear when the user sets
visible
to 1. < DAWs treat popup dialogue windows in different ways. As a result, you may notice inconsistent behaviour when running your instruments as plugins across a variety of different hosts.
Supported Widgets:
| button | groupbox | image | encoder | infobutton | numberbox | texteditor | combobox | range | sliders | listbox | optionbutton | filebutton | checkbox |popupPostfix("text")
Sets the postfix text that will appear in the popup text bubble. This string will appear just after the current value of the slider.
Supported Widgets:
| sliders |popupPrefix("text")
Sets the text that will prefix what appear in the popup text bubble when a user hovers over the widget.
Supported Widgets:
| sliders |popupText("text")
Sets the text that will appear in the popup text bubble when a user hovers over the widget. This can be used to override the default text which displays the channel name and the current
value. Passing a 0 will disable all popupText notices completely.
Supported Widgets:
| sliders |presetIgnore(val)
Defaults to 0. Set this to 1 to ignore this widget's value when a preset is taken.
Supported Widgets:
| button | encoder | numberbox | combobox | range | sliders | listbox | checkbox | xypad |protectedItems(val)
Defaults to 0. Sets the number of read-only presets. Use this to protect certain presets from being overwritten. For example, a value of 3 will prevent users from overwritting the first three
presets.
Supported Widgets:
| combobox |radioGroup(val)
Set the radioGroup which this button will belong to. Can be a number or a string.
Supported Widgets:
| button | optionbutton | checkbox |range(min, max, value, skew, incr)
the first 2 parameters are required. The rest are optional. The first two parameters let you set the minimum value and the maximum value. The next parameter determines the initial
value of the slider. The 4th parameter allows you to adjust the skew factor. Tweaking the skew factor will cause the slider to output values in a non linear fashion. A skew of 0.5 will cause the slider to output values
in an exponential fashion. A skew of 1 is the default value, which causes the slider to behave is a typical linear form. The final parameter sets the incremental step size for the slider. If you need to have very fine control
of steps you may wish to look at using an Endless Encoder instead.
range()
can not be updated or modified once a widget has been declared.Supported Widgets:
| numberbox | range | sliders |
readonly(val)
Sets the widget to readonly mode.Supported Widgets:
| texteditor |
rotate(radians, pivotx, pivoty)
Rotates the widget by a number of radians(2xPI=full rotation). pivotx and pivoty will determine the rotation pivot points, where 0, 0 represents the component's top-left position.Supported Widgets:
| button | groupbox | image | gentable | encoder | numberbox | texteditor | label | combobox | range | sliders | listbox | optionbutton | filebutton | checkbox | soundfiler | meter |
sampleRange(min, max)
Set the initial range of the samples. For example, sampleRange(0, 255) will cause the gentable widget to display only the first 255 samples from a given table.
Supported Widgets:
| gentable | soundfiler |scrollbars(val)
Sets whether the widget will show scrollbars or not.
Supported Widgets:
| keyboard | texteditor | soundfiler |scrubberPosition(val)
Sets the scrubber position where val is an integer value in samples. If you wish to update the scrubberPosition in real time use the cabbageSet opcodes.
gentable can also take an optional parameter, tableNum
which determine which table the scrubber will be placed on, if you are using multiple table.
Supported Widgets:
| gentable | soundfiler |shape("shape")
Sets the shape of the LED. Default is "square" but users can use "circle" also.
Supported Widgets:
| image | checkbox |showscrubber(val)
Sets if the soundfiler
scrubber is visible, 1 for visible, 0 for invisible. Defaults to 1.
Supported Widgets:
| soundfiler |sideChain() [!!! DEPRECATED !!!]
No longer needed to enable side-chaining for plugins. Side-chain channels can be controlled using nchnls and nchnls_i in the Csound header section.
Supported Widgets:
| form |signalVariable("variables")
The Csound variable or variables passed to the display opcodes. If you use 'lissajous' you must pass two a-rate variables to this identifier.
Supported Widgets:
| signaldisplay |size(Width, Height)
integer values denoted the width and height of the form.
Supported Widgets:
| form |sliderBounds(x, y, width, height)
Sets the x, y, width and height of a slider within a Cabbage slider component. The default size is automatically calculated by Cabbage depending on the size of the slider. Modify
this only if you need to tweak the slider's position within its parent.
Supported Widgets:
| sliders |sort(val)
Default is 1. Enables or disables sorting of preset combobox items. If you set this to 0, items will be based on numbers first, alphabetically sorted uppercase items followed by lowercase alphabetically
sorted items.
Supported Widgets:
| combobox | listbox |style("style")
Will set the style of a button. Set to "flat" by default. Use "flat" for modern look, or "legacy" for old style look. If this identifier is used with a form,
it will set the global styling used for sliders and buttons.
Supported Widgets:
| form |valuePrefix("valuePrefix")
Sets the prefix that is prepended to parameter values when displayed in the host and the plugin GUI. Defaults to "".
Supported Widgets:
| numberbox |svgElement("SVG string")
The identifier can be used to draw an SVG element to an image. Because SVG Elements contain a lot of Cabbage syntax wildcards and patterns, this identifier must only ever be called
from the Csound orchestra. Please make sure you pass valid SVG elements, or elements as a single string.
Supported Widgets:
| image |tableBackgroundColour("colour")
This sets the global background colour. Any CSS or HTML colour string can be passed to this identifier. The colour identifier can also be passed an RBG, or RGBA value.
All channel values must be between 0 and 255. For instance colour(0, 0, 255) will create a blue, while colour(0, 255, 0, 255) will create a green with an alpha channel set to full.
The default value for the background colour is rgb(10, 10, 10). If you are superimposing tables on top of each other only one can be seen at any time when using the default background colour. If you wish to show all tables at the same time use a colour with an alpha value. Tables with no alpha channels are drawn faster and use less CPU.
Supported Widgets:
| gentable |tableColour:N("colour1")
Sets the colour of the table's waveform, where N is the table number, starting at 0 for the first table. If you leave this identifier out default colours will be chosen for
the tables. If the table size is equal or less than two, the colours passed to tableColour() will form a gradient fill or three colours.
The tableColour() identifier will not work with RGBA/RGB values. You must instead use a valid CSS colour name.
Supported Widgets:
| gentable |tableGridColour("colour")
Sets the colour of the grid to be drawn. If you don't want a grid to be drawn set this colour to transparent, i.e., 0,0,0,0. See above for details on valid colours.
Supported Widgets:
| gentable |tableNumber(val)
Sets the table/tables to be displayed. If multiple tables are specified the tables will be superimposed on top of each other. If multiple tables are specified with a colon between then the tables
will be stacked on top of each other along the Y-axis, e.g., tableNumber(1:2:3:4). Note changing table numbers at runtime will incur a slight performance here. It's simpler to copy the contents of a source table to
the table gentable
or soundfiler
are displaying.
Supported Widgets:
| gentable | soundfiler |text("string")
"string" will be the text that appears on the widget. button
widgets take two strings, one for on and one for off.
Supported Widgets:
| button | groupbox | encoder | infobutton | numberbox | range | sliders | optionbutton | csoundoutput | filebutton | checkbox | xypad |textBox(on/off)
textBox takes a 0 or a 1. 1 will cause a text box to appear with the sliders values. Leaving this out will result in the numbers appearing automatically when you hover over the sliders with your
mouse.
Supported Widgets:
| encoder | numberbox | range |textBoxColour("colour")
Sets the colour of the background of the value text box used to display the slider's value when textBox is enable. See above for details on valid colours.
Supported Widgets:
| sliders |textBoxOutlineColour("colour")
Sets the colour of the outline of the value text box used to display the slider's value when textBox is enable. See above for details on valid colours.
Supported Widgets:
| sliders |textColour("colour")
This set the colour of the text passed to text(). If you wish to change the colour of the numbers being displayed use fontColour(). See below. See above for details on valid colours.
Supported Widgets:
| encoder | numberbox | range | sliders | xypad |titleBarColour("colour")
This sets the colour of the button when it's value is 0. Any CSS or HTML colour string can be passed to this identifier. The colour identifier can also be passed an RBG, or
RGBA value. All channel values must be between 0 and 255. For instance colour(0, 0, 255) will create a blue, while colour(0, 255, 0, 255) will create a green with an alpha channel set to full.
Supported Widgets:
| form |toFront()
Brings a widget to the front of the z order. This identifier takes no arguments and is only intended for use within the Csound orchestra. it makes no sense to call it when declaring the widget.
Supported Widgets:
| button | groupbox | keyboard | image | signaldisplay | gentable | encoder | infobutton | numberbox | texteditor | label | combobox | range | sliders | listbox | optionbutton | csoundoutput | filebutton | checkbox | soundfiler | meter | xypad |trackerBackgroundColour("colour")
Sets the colour of the slider's tracker background. This is the colour that sits behind trackers line that follows the slider when you move it.
Supported Widgets:
| sliders |trackerCentre(val)
Sets where Cabbage will start drawing the tracker progress from. This is a value between 0 and 1, where 0 and 1 represent 6 o'clock. The default value is .9.
This value should always be within the
trackerStart()
andtrackerEnd()
points. If not, your slider will look quite strange!
Supported Widgets:
| sliders |trackerColour("colour")
Sets the colour of the slider's tracker. This is the line that follows the slider when you move it.
Supported Widgets:
| encoder | range | sliders |trackerEnd(val)
Sets where Cabbage will stop drawing the rotary slider tracker. This is a value between 0 and 1, where 0 and 1 represent 6 o'clock. The default value is .9.
Supported Widgets:
| sliders |trackerInsideRadius(val)
Sets the inner radius of a rotary tracker, proportional to the overall rotary slider size. val should be in the range 0 to 1
Supported Widgets:
| sliders |trackerOutsideRadius(val)
Sets the outer radius of a rotary tracker, proportional to the overall rotary slider size. val should be in the range 0 to 1
Supported Widgets:
| sliders |trackerStart(val)
Sets where Cabbage will start drawing the rotary slider tracker. This is a value between 0 and 1, where 0 and 1 represent 6 o'clock. The default value is .1.
Supported Widgets:
| sliders |trackerThickness(val)
Sets the thickness of the slider's tracker, 1 being full thickness. This is the line that follows the slider when you move it. To disable the tracker you can set its thickness to 0 or
it's alpha colour channel to 0.
Supported Widgets:
| numberbox | range | sliders |typeface("fontFile")
Set a custom .ttf/.otf font to be used by all widgets. Be sure to use a relative path to the font file. And don't forget to include the file if you share your instrument.
Supported Widgets:
| form |updateRate(val)
Set the rate at which the display will update. val determines the number of milliseconds between update. The update rate is set to 100 milliseconds by default, which means the display will update
itself 10 times a second. Smaller update rates will produce smoother images, but will cost more in terms of CPU.
Supported Widgets:
| signaldisplay |value(val)
value sets the initial state of the widget. In the case of a keyboard
widget, it sets the leftmost ky to appear.
Supported Widgets:
| button | keyboard | encoder | combobox | listbox | optionbutton | checkbox | xypad |valuePostfix("valuePostfix")
Sets the postfix that is appended to parameter values when displayed in the host and the plugin GUI. This can be helpful to make the units of parameters clear to the user
(e.g. "Hz", "dB", etc.). Defaults to "". xypad
widgets take two strings, one of the x values, and one for the y values.
Supported Widgets:
| encoder | range | sliders | xypad |valuePrefix("valuePrefix")
Sets the prefix that is prepended to parameter values when displayed in the host and the plugin GUI. Defaults to "". xypad
widgets take two strings, one
of the x values, and one for the y values.
Supported Widgets:
| encoder | range | sliders | xypad |valueTextBox(val)
textBox takes a 0 or a 1. 1 will cause a text box to appear with the sliders values. Leaving this out will result in the numbers appearing automatically when you hover over the sliders with your
mouse.
Supported Widgets:
| sliders |valueTextBoxBounds(x, y, width, height)
Sets the x, y, width and height of a slider's value text box. The default size is automatically calculated by Cabbage depending on the size of the slider.
Supported Widgets:
| sliders |velocity(val)
Sets the sensitivity of the slider to mouse movement. The value passed should be in the range of 1 upwards. Note that velocity mode will only work if the range of the slider is greater than the distance
in pixels between min and max.
Supported Widgets:
| sliders |visible(val)
A value of 0 will cause the widget to become invisible. Widgets have their visibility set to 1 by default.
Supported Widgets:
| button | groupbox | keyboard | image | signaldisplay | gentable | encoder | infobutton | numberbox | texteditor | label | combobox | range | sliders | listbox | optionbutton | csoundoutput | filebutton | checkbox | soundfiler | meter | xypad |whiteNoteColour("colour")
This sets the colour of the white notes of the keyboard. Any CSS or HTML colour string can be passed to this identifier. The colour identifier can also be passed an RBG, or RGBA
value. All channel values must be between 0 and 255. For instance colour(0, 0, 255) will create a blue, while colour(0, 255, 0, 255) will create a green with an alpha channel set to full.
Supported Widgets:
| keyboard |widgetArray("chan", number) [!!! DEPRECATED !!!]
Deprecated. Please see the section on Managing large numbers of widgets
Supported Widgets:
| button | groupbox | image | encoder | infobutton | numberbox | texteditor | label | combobox | range | sliders | listbox | optionbutton | csoundoutput | filebutton | checkbox | soundfiler | meter | xypad |wrap(val)
Turns text wrapping on of off. This is set to 0 by default, so no wrapping of text is done
Supported Widgets:
| texteditor |zoom(val)
Sets the initial zoom value. Passing a -1 to zoom will cause the zoom buttons to disappear.