A CVWidgetMS is widget that can be used to set e.g. arrayed controls in running Synths, Ndefs, ProxySpace slots, NodeProxys, Patches and other other values that can be set at runtime. Also it may be used in connection with Patterns. Typically it uses a ControlSpec that has more than one slot for its minval, maxval, default value or step-size.
Create a new CVWidgetMS. To display the widget on screen you must call front on the resulting object.
parent |
an instance of Window or View - optional. If none is given the it will be created internally. |
widgetCV |
an Array of CVs - optional. If none is given it will be created internally. The array may hold an arbitrary number of CVs. |
name |
a String or a Symbol - optional. If none is given the widget will be named "multislider". |
bounds |
a Rect - optional. If none is given the widget will be created with a default size. |
defaultAction |
optional - a Function or a String that compiles to one when interpret is called on it. If an argument is added to the function it will provide the widget's CV. E.g.: |
setup |
optional - an Event containing the following optional keys:
|
controllersAndModels |
if a widget wraps a CV that has been created within some CVWidget the models and controllers of that other widget can be added here. However, it is not recommended to do so as there are specific methods that allow you to recreate widgets that have already been closed. See also CVWidget: -wdgtControllersAndModels |
cvcGui |
a multi-purpose argument: usually you will not set anything here. It is used with the -open method resp. CVCenter. Within these it is used to pass in OSC-/MIDI-responders resp. the widgets MIDI-/OSC-environment. See also CVWidget: -midiOscEnv |
persistent |
a multi-purpose argument: usually you will not set anything here. It is used with the -open method resp. CVCenter. Within these it is used to pass in OSC-/MIDI-responders resp. the widgets MIDI-/OSC-environment. See also CVWidget: -midiOscEnv |
numSliders |
an Integer determining how many sliders the MultiSliderView shall have |
server |
only used for SwingOSC compatability (untested) |
this (a CVWidgetMS
)
Split the internal multi-dimensional CV into an array of one-dimensional CVs. This is especially useful for the usage in Patterns. Once a CV has been split, it will return the split CVs in a variable cvArray
. Calling the method repeatedly will not try to split the CV again. Hence, it should be safe to call split
within Pattern code.
If a widget has been created with the argument persistent
set to true the user may reopen the widget with this method. This is basically a workaround due to the fact that GUIs in SuperCollider usually can't be opened again once they have been closed (even though executing the variable storing the the regarding object still returns the object). However, rather than reopening the old widget this method will create a new one, holding all properties, the CV and MIDI-/OSC-responders. In order to make this work as desired one should apply the following syntax where x
holds the instance of the initially created widget:
x = x.open // the old widget was stored in x which will afterwards hold the new widget
See example in CVWidget: reusable_widgets
window |
a Window or |
wdgtBounds |
a Rect or |
a CVWidgetMS
A MultiSliderView, displaying or setting the current value of the widget's CV.
A TextView, displaying or setting the current value of the widget's CV as an Array of numbers (truncated to 2 decimal places).
a TextView
A Button that opens the MIDI-tab of the widget's CVWidgetMSEditor (also executed by shortcut 'm')
a Button
A Button that opens the OSC-tab of the widget's CVWidgetMSEditor (also executed by shortcut 'o')
a Button
A Button that opens the Spec-tab of the widget's CVWidgetMSEditor (also executed by shortcut 's')
a Button
A Button that opens the Actions-tab of the widget's CVWidgetMSEditor (also executed by shortcut 'a')
a Button
A List of Views, each displaying the current (OSC) calibration-status of one slider within the multi-slider of the widget: green means calibration is active, red means it's currently off. The views are displayed as a bar beneath the multi-slider of the widget.
Get or set the background-color of the widget. Tne setter for this method is implemented within CVWidgetMS while the getter is implemented as a global getter for all CVWidgets in CVWidget.
color |
a Color |
a Color (getter) or this
(a CVWidgetMS
) (setter)
Get or set the string-color of the widget. Tne setter for this method is implemented within CVWidgetMS while the getter is implemented as a global getter for all CVWidgets in CVWidget.
color |
a Color |
a Color (getter) or this
(a CVWidgetMS
) (setter)
See examples in CVWidget: examples