Sequencing SuperCollider with Ableton Live using IAC and Sound Flower

The pictured, is of SuperCollider being sequenced with Ableton Live. I am using the IAC bus to transmit MIDI from Live to SuperCollider and Sound Flower to get the audio back into Live for mixing and recording. The midi coming from live contains note frequencies, on/off events, and pitch bend. The source code for the SC3 project comes mainly from the MIDIIn tutorial. I also read some back dated posts about using the SC several with alternative output devices. Below is the source code. It works in three stages:
//First initialize the midi and audio devices
//0 is iac bus internal routing from live!
MIDIIn.connect(0, 0);
//set the action:
MIDIIn.control = {arg src, chan, num, val;
Server.internal.options.device = "Soundflower (2ch)";
Server.local.options.device = "Soundflower (2ch)";
//next define your synth and start the server
s = Server.local;
s.latency = 0;

SynthDef("sik-goo", { arg freq=400,fromfreq=100, gate=0.0, bwfreq=800;
var x;
x =,0,10,freq),
x =,gate,,gate)) * x;,x);
//finally link the midi actions to the defined synth parameters
x = Synth("sik-goo");
// action;
MIDIIn.noteOn = {arg src,chan,num,vel;
x.set(\freq,num.midicps /4.0);
x.set(\gate, vel / 200);
x.set(\formfreq, vel / 127 *1000 );
MIDIIn.noteOff = { arg src,chan,num,vel;
x.set(\gate, 0.0);
MIDIIn.bend = { arg src,chan,val;
x.set(\bwfreq,val * 0.048828125 );

// cleanup;

What follows is blatant commercialism, thwarted by technical snafu:


Anonymous said...

Hey thanks for posting this. I was using supercolliderAU to make plugins .. which i then sequenced in ableton. But this is probably a little less work over all. cheers!

Gianmaria Allibrante said...

Hi, thanks for your code,I'd like to know how can i trig the oscillator every time there is a note in mdiin
thanks a lot