Accueil › Forums › Créer avec IanniX › supercollider help › Re: supercollider "help"
Hi there,
Bob pointed me to the forum here after I posted my first (ever) IanniX/SuperCollider example at <<https://www.facebook.com/video/video.php?v=2115690658718>>. My goal in constructing the patch was simply to figure out how to to use the two software capabilities together. I posted the example with the hope that it would be useful to demonstrate the minimum conditions for making it work. So with Bob’s encouragement I’m submitting some details here.
My researches suggest there are three basic approaches to using IanniX together with SC:
1. Communicate to the SuperCollider server directly from IanniX. SCserver listens on port 57110, but it’s vain to send just any commands there. The IanniX score must emit commands recognized by the server, documented exhaustively at <<http://supercollider.svn.sourceforge.net/viewvc/supercollider/trunk/common/build/Help/ServerArchitecture/Server-Command-Reference.html>>.
My example is a beginner’s effort. It seemed simpler to start with one of the scores in the IanniX distribution.
2. Use a IanniX-distributed score (unchanged) to communicate with an intermediate environment (say Processing or pd or Max), drive SuperCollider from there. A lot of flexibility might be latent in an approach like this, but it’s just a little too Rube Goldberg for me.
3. Communicate to the SuperCollider language from IanniX. SC has library objects for this, in particular OSCresponderNode filters incoming OSC messages by command. I get the impression SC developers intended to make this the preferred, or anyway easiest path.
OSC is a foundation capability in SC. SCserver and SClang use it communicate with each other. Traffic between the two is constant when the server’s running, but normally invisible to the user. Observe the traffic in the server with s.dumpOSC.
SClang cannot be directed to listen on an arbitrary port number. It has a listening port open (51720, unless it found that one in use on startup), so that’s the port IanniX messages should be directed to. The IanniX distributed scores talk on 2001, so I changed that to 51720. It can also be made an input parameter, like « number of circles » etc.
A SynthDef should be loaded in the server for the score to activate and interact with. My example uses a Karplus-Strong plucked string implementation. All that’s needed then is to start an OSCresponderNode listening. The SClan code is short and quite simple:
g = OSCresponderNode(nil, ‘/trigger’,
{ |time, responder, msg|
var pitch, octave, triggerIndex = msg[1];
var scale = [ 28, 29, 31, 33, 35, 36, 38 ].midicps;
note = scale[ triggerIndex % 7 ];
octave = (triggerIndex / 7).floor;
Synth(« KSpluck », [ pitch, note*(2**octave), amp, 1.5]);
}
).add;
This responder is now listening for trigger messages, calculating pitches based on trigger_id (in msg[1]) and instantiating a sounding Synth for each one.
That’s about it for the highlights. I’m pretty excited about getting this to work, there’s so much potential latent in the objects that IanniX affords. Thanks you guys for a nicely thought out piece of software!
–Dick Valentine
© IanniX Association
Qu'est-ce que IanniX ? | Téléchargement | Showcase | Forum | Recherche | À propos
Cookie | Durée | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |