A CVWidgetKnob is widget that can be used to set e.g. 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. Contrary to CVWidget2D it holds only one CV.
Create a new CVWidgetKnob. To display the widget on screen you must call front on the resulting object.
an instance of Window or View - optional. If none is given the it will be created internally.
an instance of CV - optional. If none is given it will be created internally.
a String or a Symbol - optional. If none is given the widget will be named "knob".
a Rect - optional. If none is given the widget will be created with a default size.
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.:
optional - an Event containing the following optional keys:
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
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
if set to
only used for SwingOSC compatability (untested)
only used for SwingOSC compatability (untested) this (a
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
a Window or nil - if none is provided the window will be created internally
a Rect or nil - if none is provided the bounds of the old widget will be used.
A Button linking to spec-tab within the widget's editor (see also: CVWidgetEditor)
A Button linking to MIDI-tab within the widget's editor (see also: CVWidgetEditor)
A Button that, if clicked, either triggers the MIDI-learn functionality (button-label: "L") or creates a CCResponder for the values entered in -midiSrc, -midiChan or/and -midiCtrl (button-label: "C"). If a CCResponder is present the button-label gets changed to "X" - upon clicking the responder gets removed again.
A TextField displaying the ID of a connected MIDI-device. If no CCResponder is present one may enter the ID of a device (if known) and when clicking the -midiLearn button the widget will create a CCResponder listening to that device.
A TextField displaying the channel for an existing CCResponder or, if none is present, one may use this field to set the channel for which the CCResponder shall be created.
A TextField displaying the controller-number of an existing CCResponder or, if none is present, one may use this field to set the controller-number for which the CCResponder shall be created.
0gets entered here the controller will be displayed as
1as most devices will probably number their knobs and sliders beginning with
1. Also, the way controller-numbers are displayed is related to the
ctrlButtonBanksetting which can be set with CVWidget: -setCtrlButtonBank
A Button that links to the widget's OSC-tab within the CVWidgetEditor. If an OSCresponder is present, the button-label will display the command-name, the message-slot and the current OSC-mapping (if the button is big enough to display all this information - mapping can be
A Button that links to the OSC-tab within the CVWidgetEditor, displaying the current calibration-status.
A Button linking to the actions-tab within the widget's CVWidgetEditor. The button displays the number of active actions resp. existing actions in total.
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.
a Color (getter) or
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.
a Color (getter) or
See examples in CVWidget: examples