Sending SuperCollider midi to LogicPro

Supercollider sending midi through the IAC bus.

Here is a little podcast talking you through this and below is the code you can just copy and paste, you can try it while you follow this video, I think the text is not so clear but the code I am using on this podcast is further below.

// make sure you setup the IAC midi device in audio/midi setup (it’s in utilities!)

// evaluate this to init midi:
MIDIClient.init(0, 1);

// evaluate this to set the midi out port:
m    = MIDIOut(0, MIDIClient.destinations[0].uid);

// here is a prototype line you can use where you are sending to midi channel 0
// the words with a backslash are called ‘keys’, there is a value for each of these keys. The key \midinote, for instance has the value 39, that means we are sending midinote 39 in this Pdef.

Pdef(\julioLogic,  Pbind( \type, \midi, \midiout, m, \channel, 0,\dur, 0.5, \midinote, 39)).play;

// you can change any values above while playing but if you want to add new keys that you discover in the helpfile for Event you will need to use a ‘Pbindef’ once your Pbind is playing, here I have added the \legato key which is new and will set this new key & value pair. If you try this on the Pdef it will not work for deep reasons you are not allowed to know at this stage !!  ;)

Pbindef(\julioLogic, \legato, 0.5, \dur, 0.125, \midinote, 37).play;

// you can stop the thing with this:

Pdef(\julioLogic).stop

// but this will also work:

Pbindef(\julioLogic).stop

// you can use pattern classes you will find under ’streams’ in the SuperCollider Help window, the help files for these classes need you to know about streams so you can test them, so my suggestion is if you want to leave that for later just jump to the examples at the end of the help file and you will see how to use them…

//the following one will cycle infinitely through the values within square brackets:

Pseq( [ 37, 40, 78, 50  ], inf  )

//this one will choose, every time it cycles through, one number from the list [80,70,30]. The curly brackets around the “[ ].choose” ensure that the choice is made every time

Pseq( [ {[80, 70, 30 ].choose}, 78, 50  ], inf  )

// hope this helps !

To learn more about the different messages you can sequence, check out the help file for Event, if you want to know what other keys are available you can also evaluate this:

Event.default.parent.associationsDo(_.postln); “” 

Then look at the post window where you will get a dump of all the keys and what they are set to originally.

//julio d’escrivan 2009

Enter your email address:

Delivered by FeedBurner

software support