Results 1 to 4 of 4

Thread: Parsing arguments in OSC Route Editor, sending to SuperCollider

  1. #1

    Parsing arguments in OSC Route Editor, sending to SuperCollider

    I am using OSCulator to send WiiMote data to SuperCollider via OSC commands. I'd like to send something like this to SuperCollider, as a very simple example:

    s.sendMsg("/s_new", "sine", s.nextNodeID, 1, 1);

    It should look something like this in the OSC Route Editor,
    osc_route_editor_screencap.jpg

    except "s.nextNodeID" is in quotation marks, which SuperCollider interprets as a String. In order for this command to make sense to SuperCollider, s.nextNodeID would have to appear as is, without quotation marks.

    It seems that any non-numerical argument entered into the argument field of the OSC Route Editor is automatically placed between quotation marks.

    How can I enter a non-numerical argument into the OSC Route Editor WITHOUT the quotation marks?

    Please help! Thanks!

  2. #2
    Hi emf,

    It seems that s.nextNodeID is an expression evaluated in the SuperCollider code example you are using.
    In order for this to work you would need to enter a numerical value instead of s.nextNodeID in the OSC route editor.

    If you have a look at the SuperCollider example in the Samples Library (under the Wimote folder), you will see that nodes are given an id, and I believe that this is the same kind of information that you need to provide here.


    Best,
    Cam

  3. #3
    Thanks Cam,

    Yes, this makes sense, and replacing s.nextNodeID with a number works. However, it creates a problem of inflexibility. That is to say, this OSC command only operates on a Synth with that exact Node ID. When creating a Synth on the SC server, SuperCollider will assign a unique node ID, usually without user specification, and each Synth must have a unique node ID. The OSC command becomes useless when there is a Node ID mismatch. It would be nice to be able to send an expression from OSCulator to SuperCollider, instead of just numbers and strings. But I suppose, if this is inevitable, I have to devise a workaround in SuperCollider, probably reworking my Node network.

    Is there no way to send something other than a String or Number?

    Thanks again,
    emf

  4. #4
    Hi Emf,

    I agree with you that there is a problem on flexibility, but OSCulator can not evaluate the next ID expression since this is some script that is evaluated in the context of SuperCollider. What you can do as described in the example I previously mentioned is to give your node id a manual value and refer to that value in the OSC commands to send to SC.


    Best,
    Cam

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •