© 2010 Stefan Nussbaumer.
Creative Commons Lizenzvertrag

CVCenter pre1.0

CVCenter gui

Already some time ago now I “published” this extension for SuperCollider resp. SCLang, its inbuilt programming language. It lets you easily set controls of running synths or values within patterns from MIDI or OSC hardware-controllers. You may connect them from the graphical user interface (GUI).

I use the extension regularly in live performances as well as when writing code. It’s just a great convenience to be able to quickly set controls of a playing sound with a MIDI-slider or OSC-controllers (e.g. on my mobile phone) instead of having to type.

However, my extension is still under development and a lot of planned features are still missing. The screenshots you see on this page come from Mac OS X though I made them using the new cross-platform GUI, based on Qt (only the topmost teaser-image is Cocoa). QtGUI has become quite mature and I haven’t been using Cocoa for a couple of months now.

If you’re interested in the development of CVCenter you may follow the development via changelog, fork your own branch on Github or contact me.

CVWidgetEditor - OSC-editor

Connecting to an OSC-device requires the command-name resp. the message-index. In the recent version of CVCenter (resp. the various CVWidgets) I have implemented some features that

  • let you detect the valid command-names for a given device automatically and save them to disc for later reuse.OSC-commandname-collector
  • Once you’ve collected the command-names of a certain device you can simply select the device (either hardware or software) and then a suitable command-name.

Unlike MIDI OSC value-ranges are not restricted from 0-127. So CVCenter (resp. its widgets) have a built-in calibration-mechanism which detects the incoming value’s ranges automatically (can als be deactivated or set manually). Furthermore you may choose among several mappings for more fine-grained control – especially useful if you work with motion-sensors. However, not all mappings work for every input-range due to mathematical limitations. E.g. a mapping ‘explin’ (exponential to linear) won’t work if the upper and lower limits of the input range aren’t same-signed. The program will take care of these situations by adding a certain value to the incoming value, always keeping the upper and lower limit same-signed.
The connection button connects or disconnects your device with one click.

CVWidgetEditor - MIDI-editor

Connecting to MIDI-devices is equally simple. Here you don’t even have to enter the controller’s name or address – the mechanism will figure it out for you: Click the button ‘L’ (directly in the widget within CVCenter’s main-interface or the MIDI-editor), move a slider on your hardware and CVCenter should have ‘learned’ and remember to which slider it is connected (the device-id, the MIDI-channel and the controller-number should be be displayed automatically).
So far CVCenter (resp. its widgets) can work in 2 different modes:

  • 0: stands for the ‘absolute’ mode where the hardware-controller’s values (usually 0-127) will be mapped directly
  • 1: an in- resp. decremental mode – the device is expected to return an in- or decrement, not absolute values. The incoming values will be added or subtracted from the target-values inside the running program. Of course your hardware has to support this special mode, otherwise this won’t make sense. In this mode you may also set the resolution of your hardware-sliders (usually knobs).

Last but not least you may specify banks, corresponding to the hardware layout of your device: E.g. a Doepfer Pocket Dial (which was the reference device for development) has 16 knobs. However, it also has 4 banks which extends the number of assignable sliders to 64 (numbered 0-63). As it becomes difficult to see immediately which slider nr. 37 stands for you may set the bank-parameter to 16 (16 sliders per bank) which means number 37 will be displayed as 3:5 (bank 3, slider nr. 5 – for convenience numbering starts with 1 while SuperCollider internally starts from 0).
All preferences can be set even when the hardware-controller is already connected.

CVWidgetEditor - specs-editor

The ControlSpec editor lets you set an adequate spec for the value you’re controlling. E.g. for the frequency of a synth you will possibly choose a spec with an exponential curve (warp) with a range going from 20 to 20000 hz. You may either choose from a list of predefined (inbuilt) specs or define your own.
Specs can be changed at any time, even when controllers are already connected.

Basically CVCenter is just a collection of controllers (CVs), enhanced with the possibility to create GUIs for them – either within the CVCenter-gui or as single widget (CVWidgetKnob resp. currently under development: CVWidget2D – for 2-dimensional CVs and CVWidgetMS – for multidemensional CVs).

CV itsef inherits from Stream. It can be used for setting controls of (server-side) playing Synths as well as in Patterns (language-side).

CVWidgetEditor - actions-editor

CVCenter: Actions editor

Another powerfull feature added to the current version of CVCenter is the action-manger: a CV is basically nothing but a wrapper for a SimpleController. As such it can hold a number of actions that get executed any time it receives the ‘changed’-message. However, what actions and how many of them a SimpleController holds isn’t handled very transparently. Within the current version of CVCenter (resp. the CVWidgets contained in it) you may now add, remove or (de)activate an arbitrary number of actions at any time. This may be useful if e.g. you’re not sure what the controller is currently doing and you’ld like some debug-output. The number of actions currently assigned resp. the number of activated actions will also be displayed in the ‘actions’-button within the widget itself.

The CVCenter-gui is just a container for widgets which provide an inbuilt API that should allow you to integrate widgets in your own custom guis.

Code

CVWidgetSpecsEditor

CVCenter: Editor for the initial specs

The following snippet creates a full-fledged GUI from a running Synth. However, to make this work the SynthDef from which the Synth gets created must either be ‘stored’ or ‘added’ as the mechanism needs the SynthDefs description in the global SynthDescLib. Specs added to the SynthDef in its metadata will be considered automatically if the Spec’s name is contained in the list of predefined Specs. If not you can always set an adequate Spec like in the screenshot.


GeSHi Error: GeSHi could not find the language sclang (using path /kunden/378731_1150/pustota/wordpress/wp-content/plugins/codecolorer/lib/geshi/) (code 2)

The same works with ProxySpaces, NodeProxies, Ndefs:


GeSHi Error: GeSHi could not find the language sclang (using path /kunden/378731_1150/pustota/wordpress/wp-content/plugins/codecolorer/lib/geshi/) (code 2)

Adding widgets to CVCenter and assigning actions explicitely


GeSHi Error: GeSHi could not find the language sclang (using path /kunden/378731_1150/pustota/wordpress/wp-content/plugins/codecolorer/lib/geshi/) (code 2)

Patterns


GeSHi Error: GeSHi could not find the language sclang (using path /kunden/378731_1150/pustota/wordpress/wp-content/plugins/codecolorer/lib/geshi/) (code 2)

You can add as many widgets as you like just from within your pattern-code. The class-method *use will allow you so:


GeSHi Error: GeSHi could not find the language sclang (using path /kunden/378731_1150/pustota/wordpress/wp-content/plugins/codecolorer/lib/geshi/) (code 2)

CVCenter acts as a container for an unlimited number of CVs (CV is a part of the Conductor quark). CVs act as simple controllers which embed themselves in the Stream like any other object that inherits from Stream (like all Pattern derivates).

CVCenter lets you control your synths like you’re used to – with knobs faders sliders – and and do sequencing at the same time. However, you can concentrate at the fun part of coding (sequencing) while forgetting the boring side of it (writing CCResponders, Busses, mappings etc.).

Installation

the easy way

If you have SuperCollider installed and SVN is running on your machine (no yet? get it here) you may now do from within SuperCollider


GeSHi Error: GeSHi could not find the language sclang (using path /kunden/378731_1150/pustota/wordpress/wp-content/plugins/codecolorer/lib/geshi/) (code 2)

still easy, yet not as comfortable

You need to have SuperCollider installed. CVCenter comes with help-files included if you’re already using SC >= 3.5 (if not you can view them here). Put all content of the zip-file into user-app-support-dir. You can easily find out where this is located by executing the following line from within SuperCollider:


GeSHi Error: GeSHi could not find the language sclang (using path /kunden/378731_1150/pustota/wordpress/wp-content/plugins/codecolorer/lib/geshi/) (code 2)

Under MacOS X this will resolve to:

~/Library/Application Support/SuperCollider/Extensions

If you’re on Ubuntu Linux, using the latest Developer Version of SuperCollider, it will resolve to

~/.local/share/SuperCollider/Extensions

Using CVCenter Linux will require QtGUI, the new Qt-based cross-platform gui-system, developed by Jakob Leben. Unfortunately CVCenter won’t work properly with SwingOSC, a Java-based cross-platform gui-system.

A little demonstration

Here’s a little video, demonstrating CVCenter being used together with a Kinect:

AtomRecent Commits to CVCenter:pre1.0

Wednesday, January 22 2014, 13:41: Yet another tweek reflecting the removal of GUI redirects

Wednesday, January 22 2014, 12:28: Minor update Overview

Wednesday, January 22 2014, 12:16: Correct sloppy English

Saturday, January 11 2014, 20:54: Correct link to Windows download

Saturday, January 11 2014, 18:08: get rid of some deprecation warnings

Saturday, January 11 2014, 13:30: update README

Saturday, January 11 2014, 12:40: fix History shortcuts in CVCenter

Saturday, January 11 2014, 12:35: fix History shortcut

Saturday, October 12 2013, 14:09: CVCenter:*removeAtTab: only perform CVCenter:*removeAll if the given …

Sunday, September 8 2013, 18:20: edit .gitignore

Sunday, August 25 2013, 20:10: correct spelling

Saturday, August 24 2013, 18:09: bugfixes: CVCenter: prevent errors if no preferences exist. CVCenterP…

Saturday, May 25 2013, 12:01: Merge branch 'master' of github.com:nuss/CVCenter

Saturday, May 25 2013, 12:00: OSCCommands: don't open another window if the window is already present

Wednesday, April 24 2013, 20:16: fix actions display in CVWidgetEditor

Sunday, April 14 2013, 13:26: bugfix: CVWidget:-oscConnect

Friday, April 12 2013, 13:27: update README.md

Thursday, April 11 2013, 20:31: CVCenter: rather use \UI.asClass.isNil to check if UI.registerForShut…

Friday, April 5 2013, 18:55: CVCenter:*initClass - backwards compatibility fix

Tuesday, March 19 2013, 22:39: bugfix in CVWidgetEditor: consider the slot when setting ctrlButtonBa…

One Comment

  1. Posted 26 Nov ’12 at 9:42 am | Permalink

    I get that error message when I click on the “edit OSC” button in the CVCenter main gui.
    Could it be that the sensor wasn’t connected properly or there was something wrong with it?

    sorry about this bit I am freaking out as I am suppose to install the work tomorrow and leave it on display for 4 days. Going through a lot of stress (not just for this). Now I am away from the sensor but I will be working on it before the set up around 9/9:30 your time.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>