© 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…

16 Comments

  1. Posted 23 Nov ’12 at 3:49 am | Permalink

    Hello Stefan,
    hope you are doing well and keeping warm.
    Sorry to keep bothering you but I feel the next few issues are better discussed here than the SC forum.
    I have been using your extension for the last month and is really helping me a lot with my project. However, I have a couple of issues that I would like to discuss.
    First the “save setup” and/or “load setup” command don’t seem to work when invoked form the CVCenter main window (the back one).
    When I save a setup file it prompt me to type the file name and it seems it is saved, but when I recall it by clicking “load setup”, I chose the file but once is open no information is retrieved. It looks like nothing happen.
    This is the code I use:
    //////////////////////////////////
    Server.default.waitForBoot { y = Synth(“fMod2S”) };
    y.cvcGui
    y.free
    /////////////////////////////////
    I wonder if I should load a setup via code.
    Also the y.free does not seems to clear much, as when I run the same code again, the CVCenter that appears is not new but is the old one form before.
    maybe I should use ///// y.removeAll //////????
    ————————————————————————————————
    Another issue is the fact that the calibration works for one person but if someone enter the installation next, the calibration boundaries are the ones set by the previous person and are naturally not right for the new person interacting especially if they is smaller.
    Their movements will be shorter and never reach the boundaries set by the previous user.
    Not sure if I am clear but essentially every time a new user is detected the “OSC input constrain” and the “compensation” should be reset.
    Hope what I wrote make sense,
    Have a good day/night,
    R

    • Posted 23 Nov ’12 at 9:55 pm | Permalink

      Hi Rudy,

      sorry for the delayed reply – not only has the server hosting my website gone down (I’ve switched to a new ISP now) – I also had a busy day.

      First the “save setup” and/or “load setup” command don’t seem to work when invoked form the CVCenter main window (the back one).

      Yes, I can confirm there’s something broken: A setup should store all actions already added to widgets as well as MIDI- and OSC-responders. But they seem to get ignored mostly :\ (I had a look at the setup-file and indeed the actions get stored but not the responders. However, when I load the setup also the actions get ignored…).

      I wonder if I should load a setup via code

      I don’t think that will make a difference – the buttons just call CVCenter:*saveSetup resp. CVCenter:*loadSetup.

      Another issue is the fact that the calibration works for one person but if someone enter the installation next, the calibration boundaries are the ones set by the previous person and are naturally not right for the new person interacting especially if they is smaller.
      Their movements will be shorter and never reach the boundaries set by the previous user.

      Hmm… do you at some point stop the calibration i.e. fix the boundaries before the next person comes in? Have you tried to just re-calibrate by activating calibration again? I vaguely remember that after having fixed calibration and then reactivating it it would pick up at the original zero-boundaries (not sure – would have to test again). So, maybe it would help if you first deactivate calibration and then reactivate it again after the new performer has come in… I understand the problem I think but I have to apologize as I’m not exactly sure how the mechanism behaves.

      So much for now. I’ll have a look at the setup-problem as soon as I find time. Let me know if the calibration trick works for you.

      Thanks so much for the feedback,

      Stefan

    • Posted 23 Nov ’12 at 10:08 pm | Permalink

      P.s.: I filed a bugreport on github: https://github.com/nuss/CVCenter/issues/1
      If you find more bugs don’t hesitate to add another bug-report there (don’t know if you need a github-account for that though)

    • Posted 24 Nov ’12 at 2:53 am | Permalink

      Hi Rudy,

      I’ve pushed a fix for the non-working “loadSetup” (also committed to the quarks-repository already). You were on the right track suspecting it something to do with the way it was working in the gui – the arguments were switched: if “load actions” was selected the opposite was happening… can you try if my fix works for you? (I really hope I haven’t messed up something else now…).

      Thanks, Stefan

  2. Posted 9 Oct ’12 at 9:29 pm | Permalink

    Hello Stefan,
    I really don’t know how to thank you!
    I managed to successfully install your CVCenter extensions via Quarks following your instructions and other tutorials online (sometimes it helps to read how things works before attempting to use them…..) .
    I am still getting a warning though (I will post it next as I am away from my machine — I access the internet at work and school so it is difficult for me to have everything at hand — by the way, where are you? I’m originally from Europe but I am in New Zealand right now) but the extension seems to run fine as I am experimenting with the first example on your blog (dynKlank).
    I am using the kinect via NImate free version (it is a proprietary software), the sensor is recognized as I get the correct list of OSC command names in the CVCenter- OSC editor widgets, I saved it and I am able to recall it after quitting and restarting. However there is something wrong as I am waving my hand (the joint I am testing) but the slider/knob is not moving. I tried to calibrate it but I am not sure how it works. I get the data into SC as I checked, but somehow CVCenter does not like what is fed.
    I am getting to this conclusion as the slider does change sometimes; it just jump to a different number and stays there. NImate does not require to stand in a pose to be detected and I am testing from sitting down, I don’t know if that influence the calibration process. Also, the values for the x and y axises range from [-1.8000000 , 1.8000000] more or less (not sure about decimals). I wonder if that is a problem.
    Anyway, I tried another way and followed all (almost all) your steps so I successfully installed openNI, SensorKinect , but having problems with OSCeleton (the easiest one). I am not sure where I should place it and what’s the command line to launch it in “QuartzComposer-mode” . I drag the app icon into the terminal and it was running (no error messages) but did not have the live monitor with kinect data.
    Sorry to be a pain, but I feel I am really close to be up and running, so that I could concentrate on the fun part (the sound). I will definitely supply you with extensive feedback for your extension. By the way, I am running on a Macbook Pro with 10.7 on.
    Thank you and take care,
    Rudy

    • Posted 10 Oct ’12 at 3:41 am | Permalink

      UPDATE:

      sliders seems to work but I think I need to figure out how to scale and/or adapt the range somehow.

      • Posted 10 Oct ’12 at 5:24 pm | Permalink

        Hey Rudy,
        I’m really, really happy hearing that I could help you and you basically got things working!

        I am still getting a warning though (I will post it next as I am away from my machine — I access the internet at work and school so it is difficult for me to have everything at hand

        Is it a warning or an error? Post it if you can.

        by the way, where are you? I’m originally from Europe but I am in New Zealand right now) but the extension seems to run fine as I am experimenting with the first example on your blog (dynKlank).

        I’m currently living in Vienna, Austria. So, there’s a 12 hours timeshift between us ;). The dynKlank-example is working for you?

        I am using the kinect via NImate free version (it is a proprietary software), the sensor is recognized … However there is something wrong as I am waving my hand (the joint I am testing) but the slider/knob is not moving. I tried to calibrate it but I am not sure how it works. I get the data into SC as I checked, but somehow CVCenter does not like what is fed.

        As far as external (Kinect-)software is concerned it’s really hard for me to tell what goes wrong. I don’t own a Kinect myself and I didn’t write CVCenter explicitely for the use with a connect – much rather it should work with any controller that sends numerical values via OSC (e.g. OSC-controllers installed on mobile phones).
        When you say CVCenter doesn’t like what it’s fed, how does it complain? What might be wrong could e.g. be the formatting of the OSC-message which should somewhat look like the following:

        1
        ['/my/osc/command', <x-value>, <y-value>, <z-value>]

        CVCenter resp. CVWidgets expect(s) the command-name in the first slot of the incoming OSC-message (index 0) and all values in the subsequent slots. However, I found that not all software necessarily sticks to that scheme. As OSC-commandnames have a canonical structure (names divided by slashes) it could be that you get the ‘root’-name in the first slot and a sub-commandname in the second. That would be quite suboptimal (you could work around it in the widget’s action but that’s a bit clumsy).
        Especially OSCeleton sends OSC in this form if QuartzComposer-mode isn’t activated. But it should be easy to activate by setting the -q flag:

        1
        ./osceleton -q ..

        (there are probably more flags to be set but as I said I don’t own a Kinect and I haven’t set up a working environment for it on my machine).
        If you want to check what’s really coming in on your machine resp. SuperCollider you can execute the following commands in SC:


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

        With these code-snippets you should see incoming OSC-messages displayed as arrays like I described earlier (OSCCommands is using this mechanism behind the scenes).

        sliders seems to work but I think I need to figure out how to scale and/or adapt the range somehow.

        This is easy (if I understand the problem correctly. What needs to be done is that the range of incoming values (e.g. 0.0-1.0) must be mapped to a reasonable output-range (e.g. if you want to set a frequency it might be a range of 20-20000 hz). Therefore I added the possibility to set ControSpecs. You can either do this in code:


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

        or – probably easier – use the widget’s Spec-editor (have a look at the screenshot in the article above) that can be opened by clicking the “edit Spec”-button.
        Basically it doesn’t matter what the range of incoming values is – selecting an appropriate ControlSpec will scale the input automatically to the right output-range. There’s a number of predefined ControlSpecs (if you have cruciallib installed there will be even more). Here’s a little example how to define a custom one:


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

        I would strongly recommend to have a look at the ControlSpec-helpfile. There are some limitations due to the underlying math e.g. the following isn’t possible (outputs NaN-values:


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

        … so musch for now. Hope that helps you to overcome the last hurdles (as always, let me know ;) )

        good luck!

        Stefan

  3. Posted 8 Oct ’12 at 5:04 pm | Permalink

    Hey Rudy,
    I see you got a couple of problems.

    I think the problem is that uberSVN is not installed properly as I was supposed to enter a key but restarted the computer before that and could not figure out how to restart the software interface in order to enter the key.

    There’s no key required – you only have to accept the signature of the repository (not sure about the exact term but usually you would just have to type y or yes). From what you say I guess SVN is installed properly (note: on OS 10.6.x SVN comes preinstalled if I’m not mistaken). However, you could do the following to checkout the Quarks-repository on your machine: In Terminal cd into

    1
    ~/Library/Application Support/SuperCollider

    First, let’s see if SVN is installed – type:

    1
    svn

    … which should give you a meaningful result if SVN is installed.
    Then (if SVN is installed) execute the following command:

    1
    svn checkout https://quarks.svn.sourceforge.net/svnroot/quarks

    That will create a directory “quarks” but not yet install them
    Next, open SuperCollider. Execute:


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

    That will open a gui which should be quite self-explanatory – you can install and uninstall qurks as you like (note: before you install the CVCenter-quark remove the CVCenter-folder that you’ve put in “Extensions”! Otherwise you will get a “duplicate class” error).

    I have tried to run some of the examples above and I get some error whenever I try to instantiate a CVCenter object:

    Execution warning: Class ‘CV’ not found
    ERROR: Message ‘new’ not understood.

    However, the Quarks-mechanism should also take care of dependencies. E.g. CV (as part of the Conductor-qurk) and TabbedView are among them (it’s stated in the README). Without these CVCenter won’t work. You can also install quarks manually:


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

    Installing quarks doesn’t mean you have to download them again. If you have them already checked out all that happens is that there gets a symlink created in

    1
    ~/Library/Application Support/SuperCollider/Extensions/quarks

    Checking out all quarks will not interfere with SuperCollider’s functionality as long as you don’t install them!
    Additionally you could install the following quarks:


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

    These add some functionality but aren’t strictly necessary.
    And one last word about SVN + Quarks: If you’re updating from within SuperCollider you should make sure SC finds the currently installed version of SVN. In Terminal execute:

    1
    which svn

    That should give you the path to the SVN-executable
    In your SuperCollider startup-file you can then add this folliwing line (replace /path/tosvn with the result of the above mentioned command)


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

    … hope, that brings you a bit further.
    Good luck,

    Stefan

  4. Posted 8 Aug ’12 at 3:21 am | Permalink

    Hello Stefan, my name is Rudy and I have some very basic questions (sorry) about SC and OSC in conjunction with Kinect and NImate.
    I have the free version of NImate and can see OSC messages coming into SC when I ran
    OSCFunc.trace(true); (screen shot if needed http://www.mediafire.com/?p5upqncoodvcazc)
    Now, as I am fairly new to this I am wondering what I should do to actually understand the range of the values for each message and how can I use the value to modify parameters of synthDefs in SC. (basic syntax protocol)
    I am not trying to take the shortcut by asking what to you might seems trivial, but I just would like to get something going while I am learning the basics.
    Your CVCenter library seems to be useful to my purposes but it seems I had some trouble installing it.
    Any help would be appreciated.
    Thanks and congratulation for your hard work,
    Rudy

    • Posted 8 Aug ’12 at 10:13 am | Permalink

      Hi Rudy,

      First of all, your screenshot proves you installed all prerequesits for using a Kinect with SC successfully – congratulations!

      Now, as I am fairly new to this I am wondering what I should do to actually understand the range of the values for each message and how can I use the value to modify parameters of synthDefs in SC. (basic syntax protocol)

      For a better understanding of how to set controls in a running synth I’d recommend to read the Synth-helpfile within SuperCollider’s help-system (You’re on Mac? Just type the word “Synth” in a document, select it and hit cmd+d and the regarding help should open. Or have a look at the online-version: http://doc.sccode.org/Classes/Synth.html
      The basic procedure would be:


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

      Regarding the “rnage of values” from the output of OSCFunc.trace: I guess output ranges from -1 to 1. I’m slightly surprised that there are only 2 values comming in (as e.g. in [ /joint, /Right_Shoulder, 0.0168…, -0.0455…]). I’d expect 3 – x, y, z. Also, OSC-messages coming in from the Kinect are a formatted a bit different from those I got in my tests. It would have been more convenient if the array returned in ‘msg’ had a command-name line /joint/Right_shoulder in its first slot, followed by the values in the remaining slot. This makes it necessary to add another if-condition in an OSCresponder ‘s action (OSCresponders in SC 3.4 have been replaced with OSCFunc resp. OSCdef in SC 3.5 – functionallity is basically very similar). Here’s one example OSCFunc (not tested, hopefully working and demonstrating what I mean):


      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 difference when using CVs is that you’re not directly setting a value in a synth but you’re setting a value of the CV (basically a model that is used by a controller that can disptch that value to many things like GUIs and Synths at once). Compared in a simplified diagram this would look like this:

      1
      2
      old: OSCresponder captures input from Kinect -> function in the OSCresponder sets Synth-control
      new: OSCresponders captures input from Kinect  -> function in the OSCresponder sets the value of the CV -> Synth-control gets set accordingly to the value of the CV

      I am not trying to take the shortcut by asking what to you might seems trivial, but I just would like to get something going while I am learning the basics.

      I’ve gone through all this. I think I understand what you mean. However, I can really recommend subscribing to the sc-users mailing-list: http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml (you can also follow and even post to the list using the nabble-forum: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/SuperCollider-Users-New-Use-this-f2676391.html ).

      Your CVCenter library seems to be useful to my purposes but it seems I had some trouble installing it.

      Can you elaborate what the troubles were? Information like this would be valuable for me. If possible I’d like to make things as easy as possible.
      Thanks for your interest and good luck! If you’re running into troubles again or find your questions not answered sufficiantly please don’t hesitate to get in touch.

      Stefan

      • Posted 7 Oct ’12 at 7:40 pm | Permalink

        Hey Stefan,
        Thank you very much for your help!
        Now I understand how to access a single value from the Kinect stream but I am still having trouble.
        You are right, the values from the Kinect are in the form:
        (\joint_type, X: x,xxxx, Y: y,yyyy, Z: z,zzzz)
        essentially, the type of joint and a 3D vector of floats

        I adapted your SynthDef example so that the frequency would be control by the X vakue of the right hand but it did not work.
        SoI stepped back a little and I tried with a Line.kr as the feed for the freq argument but apparently SC Synths don’t like to be fed control rate values.
        So I am wondering what’s the best way to implement a SynthDef that can be controlled while streaming.
        Sounds like your CVCenter might be one answer but I was wondering if there is a more direct way. I want to learn to use CVCenter but first I want to make sure I understand the basics of SC.
        Sorry I am not on my machine at present, so I will be sending the code examples asap.
        Thank you and have a good day/evening
        R

        • Posted 7 Oct ’12 at 8:28 pm | Permalink

          Hey Rudy,

          good to see you’re back ;)
          If I understand correctly you have successfully built the SynthDef (SynthDef(\test, {…}).add (‘add’ is important!) and instantiated a Synth-object like x = Synth(\test). Now, if your installation of CVCenter is working properly (did you install from a downloaded zip-file or the Quarks-mechanism in SC?) then there should only one more step be required to generate a widgt for \freq in CVCenter:


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

          This bit of code shouldn’t only create the widget (resp. the CVCenter-gui) but also add an action to it:


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

          In each widget you can find a blue button labeled “actions” at the bottom. Click on it and you should see the action described above in a textfield. If it’s activated you can turn the widget’s knob and you should hear frequency change.

          SoI stepped back a little and I tried with a Line.kr as the feed for the freq argument but apparently SC Synths don’t like to be fed control rate values.

          That surprises me. I’m pretty shure they take control-rate values (the main difference is that control-rate values get calculated only once each control-block while ar-values get calculated for every single sample).
          Anyway, let me know how you get along.

          Stefan

          • Posted 8 Oct ’12 at 4:39 am | Permalink

            Hello Stefan;
            I tried to download CVCenter via Quarks using uberSVN but I get this error:
            [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
            CVCenter not found in local quarks; checking out from remote …
            ERROR: Quark not found in repository.
            CALL STACK:
            ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
            and then a bunch of code.
            I think the problem is that uberSVN is not installed properly as I was supposed to enter a key but restarted the computer before that and could not figure out how to restart the software interface in order to enter the key.
            Anyway, I then downloaded your CVCenter manually from :
            https://github.com/nuss ,
            placed the unzipped file into ~/library/application Support/Supercollider/Extensions and when I recompile the library I get this:
            [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
            empty
            compiling class library…
            NumPrimitives = 853
            compiling dir: ‘/Applications/SuperCollider/SuperCollider.app/Contents/Resources/SCClassLibrary’
            compiling dir: ‘/Users/MrSilly/Library/Application Support/SuperCollider/Extensions’
            pass 1 done
            • ERROR: Class extension for nonexistent class ‘TabbedView’
            In file:’/Users/MrSilly/Library/Application Support/SuperCollider/Extensions/nuss-CVCenter-cfbab4c/CVCenter/extTabbedView.sc’
            numentries = 1213079 / 21659376 = 0.056
            6348 method selectors, 3412 classes
            method table size 20594384 bytes, big table size 173275008
            Number of Symbols 16398
            Byte Code Size 591261
            compiled 549 files in 0.32 seconds
            compile done
            Help tree read from cache in 0.0022807729999386 seconds
            Class tree inited in 0.02 seconds
            RESULT = 0
            WARNING: Called from SynthDef:buildUgenGraph, method Meta_Mix:arFill is deprecated and will be removed. Use Meta_Mix:fill instead.
            For advice: [http://supercollider.sf.net/wiki/index.php/DeprecatedError]
            WARNING: Called from SynthDef:buildUgenGraph, method Meta_Mix:arFill is deprecated and will be removed. Use Meta_Mix:fill instead.
            For advice: [http://supercollider.sf.net/wiki/index.php/DeprecatedError]
            Welcome to SuperCollider 3.5.5, type cmd-d for help

            ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
            Not sure what do do.
            I trashed the “extTabbedView.sc” and it compile without the error but
            i am not sure if it is the right move.
            Thank you and take care,
            Rudy

            • Posted 8 Oct ’12 at 4:47 am | Permalink

              Ok,
              I have tried to run some of the examples above and I get some error whenever I try to instantiate a CVCenter object:
              [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[

              Execution warning: Class ‘CV’ not found
              ERROR: Message ‘new’ not understood.
              RECEIVER:
              nil
              ARGS:
              Instance of ControlSpec { (0x104f43888, gc=D4, fmt=00, flg=00, set=04)
              instance variables [9]
              minval : Integer 20
              maxval : Integer 20000
              warp : instance of ExponentialWarp (0x104f43bc8, size=1, set=2)
              step : Integer 0
              default : Integer 440
              units : ” Hz”
              grid : nil
              clipLo : Integer 20
              clipHi : Integer 20000
              }
              Integer 440
              CALL STACK:
              ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]

  5. Posted 2 Mar ’12 at 5:31 pm | Permalink

    I am interested in generating sound from kinect data, and I came across your project. It looks really great! I have played with Morgan Packard’s Ripple which is a Supercollider project, so I wanted to use Supercollider.

    I got OSCeleton working (Processing example works) and got CVCenter installed in Supercollider (playing tune from CVCenter.html), and can control amp using the knob. I am trying to get OSCeleton hooked up to CVCenter. I started CVCenter, started osceleton, and got the calibration complete message, and tried to capture osc data from 127.0.0.1:7110 (where osceleton reports it is running). However the OSC-command-name collector didn’t work as I expected. I only get n_go and n_end. I am not sure what OSC command-name to put in the box (I tried /joint). Screenshot: http://goo.gl/Gpaio

    Thanks!

    • Posted 2 Mar ’12 at 8:39 pm | Permalink

      Hi Charles,

      and tried to capture osc data from 127.0.0.1:7110 (where osceleton reports it is running)

      You may omitt the IP-address resp. the port or provide an IP-address only. If both are nil (default) SuperCollider will listen to any address and capture all values under the given command-name. If you want to make sure SC is only listening to one explicit machine it’s usually enough to provide the IP-address. I can’t see the full stacktrace in your screenshot but it looks like an error is triggered somewhere within

      1
      CVWidget:prInitOscConnect

      which means something’s going wrong during connection.

      However the OSC-command-name collector didn’t work as I expected

      2 things:

      • Are you still on SC 3.4? I just had a look at the source of OSCCommands – propbably this isn’t quite SC 3.4 compatible. There have been important changes regarding OSC-handling in SC 3.5 and it looks like I’ve used some functionality that’s available using SC 3.5 only. I’ve got 3.4 running on some other machine here, so I can have a look how it’s working there (maybe over the weekend).
      • Did you start OSCeleton with the -q option? When I did my Kinect-experiment this was the step that it needed to create valid OSC-messages (I don’t know why it isn’t set to that mode by default – the incoming OSC-fromatting looked plain wrong to me. But I remember vaguely someone saying that it worked this way with PD… dunno).
        As far as I remember an OSC-message coming from OSCeleton (started with the -q option) look somewhat like the following:

        1
        '/joint/shoulder/', <some x-value>, <some y-value>, <some z-value>

        SuperCollider processes this message as an array, so, the command-name is slot 0 and the other slots are treated as value-slots. Try the following code see what messages are coming in (SC 3.4 compatible – OSCCommands.collect basically does the same though at the moment it’s likely SC 3.5 only and it’s rather adding command-names and the number of value-slots to a list than posting them):


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

      So much for now. It’s always useful to have the stacktrace if some error happens. Paste it here or maybe on pastebin.com. Tell me what SC-version you’re using.

      Thanks for the feedback,

      Stefan

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>