Fortunately an object serving these demands has already been in place when I started working on CVCenter: CV from Ron Kuivila’s Conductor library (certainly there would have been other ways to achieve what I wanted, e.g. SuperCollider’s inbuilt bus-architecture, yet it wasn’t my goal to reinvent the wheel). Additionally I wanted to simplify external control-communication as far as possible (currently MIDI or/and OSC). This current version of CVCenter offers a number of enhancements over the previous version:
CVWidgetMS: a special multi-slider widget that allows setting an unlimited number of control parameters at a time. E.g. an envelope in a running synth may simply be redrawn with a mouse or the widget can be connected to a multi-slider in an OSC-controller on a mobile device. CVWidgetMSEditor: As connecting a CVWidgetMS to an OSC or MIDI device/application means connection each slot to a single command or command-slot (OSC), respectively controller (MIDI), I have designed this special interface that lets the user connect several slots of the widget at once (batch-connection) as well as all slots can be edited individually. A comprehensive preferences-editor that lets the user configure CVCenter and save settings to disk.
KeyDownActions: Integrated into the preferences editor but usable with arbitrary GUIs you will find an editor that lets you define or/and edit all shortcuts for CVCenter, all widgets within it and their editors. The editor is supposed to work platform-independent (OSX, Linux, Windows). If key-mappings should prove to be incorrect these may also be edited according to what your keyboard returns.
Other classes, utilities that already existed in the previous version of CVCenter: CVWidgetKnob, CVWidget2D, CVWidgetEditor (improved), OSCCommands (improved).
Roadmap
This current version of CVCenter is the result of ideas that had been lying in my drawer for quite some time already – especially the multislider widget. However, it has become yet another alpha version and there are a number features missing:
- a widget (resp. a widget-slot) can only get connected with one OSC-responder and/or one MIDI-responder at a time. This is a conceptual flaw that I didn’t really consider when designing CVCenter and should be corrected.
- The various CVWidgets still use OSCresponderNode resp. MIDIResponder instead of the more recent OSCFunc/def resp. MIDIFunc/def. This doesn’t really cause any inconvenience for the users – so far the concept has proven to work quite reliable.
- Though the GUI concept is largely based on a MVC concept it isn’t really very modular. Especially while working on CVWidgetMS the limitations of the current concept became pretty clear.
I can’t make any promises on when I will be able to continue the development of CVCenter but when it happens it will certainly include the following:
- Drop Cocoa support – not only has Qt become a fully qualified replacement, it also includes a number of features that would probably make creating GUIs a lot easier and offer more flexibility.
- No limit on the number of OSC-/MIDI-responders within a given widget.
- Modular GUIs: instead of creating a GUI out of basic elements (sliders, textfields, buttons etc.) define its elements in separate classes, each embedded in a global MVC scheme. The user might want to instantiate just a single element of GUI in her/his custom GUI. The MVC scheme would guarantee that the display of this element gets updated correctly.
- Use OSCFunc/def instead of OSCresponderNode and MIDIFunc/def instead of MIDIResponder.
Motivation
As SuperCollider is a code-based environment GUIs aren’t strictly necessary to control the output but it may add some convenience. However, especially when GUIs get more complex it becomes increasingly difficult to keep different elements in sync as a user who doesn’t know much about the internal workings might expect. You will easily end up with lots of messy code that possibly doesn’t what wanted to achieve. Ron Kuivila’s Conductor lib resp. CV as part of it offers an elegant remedy here. Consider this simple example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | // create a CV with a defined ControlSpec ~cv = CV(\freq); // add an action. Note that action_ creates a SimpleController ~controller = ~cv.action_({ |cv| ~synth.set(\freq, cv.value) }); // create ~synth s.waitForBoot { ~synth = { |freq| SinOsc.ar(freq, mul: 0.3) }.play }; // create a slider and a number-box to set 'freq' in the running synth // the GUI in this form will only work using Qt // note that the slider has no action assigned ~win = Window("set frequency"); ~slider = Slider(~win, 40@300); ~numBox = NumberBox(~win, Rect(50, 0, 100, 20)); ~win.front; // connect the CV to the slider and the number-box // voilà! both, slider and number-box will always be in sync ~cv.connect(~slider); ~cv.connect(~numBox); |
A CVWidget basically wraps a CV in a GUI, adding simple connectability to external hard- or software. However, it should not interfere much with the way you work with SuperCollider: You may do prototyping, live-coding or other things. You should not waste your time with writing GUIs or creating responders. It should be as simple as that.
AtomRecent Commits to CVCenter:master
Sunday, April 30 2023, 14:53: remove debug code
Sunday, April 30 2023, 14:52: save and load SVs in a CVCenter setup properly
Tuesday, May 3 2022, 21:29: add quark file
Tuesday, May 3 2022, 20:38: remove submodule Conductor, minor fixes
Sunday, October 11 2020, 12:23: minor cosmetics
Monday, June 8 2020, 21:37: clarify usage in patterns
Monday, June 8 2020, 21:15: remove trailing empty line
Monday, June 8 2020, 21:08: Amend help for CVCenter:*use
Monday, June 8 2020, 16:06: fix incorrect help example for 'depth'
Sunday, June 7 2020, 12:51: make return value of Collection:-depth 0 if no nesting
Saturday, June 6 2020, 11:12: Merge branch 'multidemensional_SVs'
Saturday, June 6 2020, 11:11: update submodule Conductor
Saturday, June 6 2020, 11:05: Collection:-depth moved back into CVCenter
Friday, June 5 2020, 21:41: reset to commit ef2b057
Friday, June 5 2020, 21:34: add capaility for multidimenional 'svItems' to CVCenter:*use
Installation
Currently the repository for CVCenter lives at https://github.com/nuss/cvcenter
Prerequisites
CVCenter depends on TabbedView2 and (a modified version of) Conductor. Additionally you may want to install wslib and crucial-library. All of these can be installed through SC’s inbuilt Quarks package manager, except for Conductor which should be installed from its source on Github (there are some tweaks and fixes in that version that have not yet gone into the official version. Also it contains helpfiles written for SC’s new help system).
1 2 3 4 | Quarks.install("TabbedView2"); // optional Quarks.install("wslib"); Quarks.install("cruciallib"); |
Install the old version of CVCenter as Quark
A version of CVCenter prior to this current one is available from SuperCollider’s integrated Quarks extension repository:
The version that can be obtained via Quarks will be the latest one only. However, the required dependencies will not be right. At this moment it is highly recommended to install from Github only.
Install the current (and the old) version of CVCenter from Github
In a terminal navigate to your userExtensionDir. Execute the following in SuperCollider to find out where that is:
1 | Platform.userExtensionDir; |
In a terminal use the path returned by the previous statement to navigate to your userAppSupportDir :
1 | cd /path/to/userExtensionDir; |
Clone the repository (a GIT client must already be installed).
1 | git clone https://github.com/nuss/CVCenter.git |
Subsequent updates can be done like this from within your cloned CVCenter directory:
1 | git pull |
If you intend to use CVCenter with the current development version of SuperCollider you should rather install Conductor as a submodule to CVCenter than install it via SC’s quark repository as it is not yet quite compatible due to the recent removal of the compatibility with Cocoa.
1 | git clone --recursive https://github.com/nuss/CVCenter.git |
Subsequent updates can be done like this from within your cloned CVCenter directory:
1 | git pull && git submodule update |
However, installing Conductor as a submodule should still be fully compatible with older versions of SuperCollider.
CVCenter should now be installed (if SuperCollider is already open recompile the class-library). If you want to switch to the old CVCenter version you may easily do so. Execute the following in a terminal and recompile the class-lib in SuperCollider again.
1 | git checkout pre1.0 |
You may always determine easily which branch is currently active by executing the following in a terminal (you must be within the CVCenter directory within your userAppSupportDir).
1 | git branch |
Features
Aside from the already mentioned support for external MIDI and OSC CVCenter offers auto-GUI capabilities for running Synths, NodeProxies (Ndef, Proxyspace) and Instr/Patch. For any controls defined within these an adequate widget within the CVCenter GUI will be created resp. an action that updates the control’s value to the CV’s value. These actions may be amended by custom user-defined actions at any time. Also the user may create custom GUIs and its elements (sliders, number-boxes etc.) may be synced to a widget’s CV.
Also CVCenter resp. the various CVWidgets may easily be used in Patterns.
Within the current version of CVCenter all shortcuts defined by default may be edited and new ones can be defined within a WYSIWIG editor.
One Trackback
[…] CVCenter […]