Horizontal / Vertical range slider

Creates an on-screen slider with a dragable, and user selectable range. Data can be sent to Csound on the channel specified through the channel string.

hrange channel("min", "max"), max(val), min(val), outlineColour("colour"), range(min, max, value, skew, incr), text("name"), textBox(on/off), textColour("colour"), trackerThickness(val), trackerColour("colour"), active(val), alpha(val), automatable(val), bounds(x, y, width, height), caption("string"), colour("colour"), fontColour("colour"), identChannel("channel"), popup(val), presetIgnore(val), valuePrefix("valuePrefix"), valuePostfix("valuePostfix"), rotate(radians, pivotx, pivoty), visible(val), toFront(), widgetArray("chan", number),

Make sure to use two unique channel names when using hrange and vrange, otherwise min and max will be set to the same value. Also note that to update the values of a range slider from within your Csound code you should use cabbageSet with a minValue or maxValue identifier along with the the first channel name.

Specific Identifiers



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.


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.


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.


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.


text("string") "string" will be the text that appears on the widget. button widgets take two strings, one for on and one for off.


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.


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.


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.


trackerColour("colour") Sets the colour of the slider's tracker. This is the line that follows the slider when you move it.

Common Identifiers


active(val) Will deactivate a control if 0 is passed. Controls which are deactivate can still be updated from Csound.


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.


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.


bounds(x, y, width, height) integer values that set position and size on screen(in pixels).


caption("string") The string passed to caption will be the string that appears on the main application window.


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.


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.


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.


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.


presetIgnore(val) Defaults to 0. Set this to 1 to ignore this widget's value when a preset is taken.


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.


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.


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.


visible(val) A value of 0 will cause the widget to become invisible. Widgets have their visibility set to 1 by default.


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.


widgetArray("chan", number) [!!! DEPRECATED !!!] Deprecated. Please see the section on Managing large numbers of widgets