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
(
MIDIClient.init;
//0 is iac bus internal routing from live!
MIDIIn.connect(0, 0);
//set the action:
MIDIIn.control = {arg src, chan, num, val;
val.postln;
};
Server.internal.options.device = "Soundflower (2ch)";
Server.local.options.device = "Soundflower (2ch)";
);
//next define your synth and start the server
(
MIDIIn.connect;
s = Server.local;
s.boot;
s.latency = 0;

SynthDef("sik-goo", { arg freq=400,fromfreq=100, gate=0.0, bwfreq=800;
var x;
x = Formant.ar(
SinOsc.kr(0.02,0,10,freq),
fromfreq,
bwfreq
);
x = EnvGen.kr(Env.adsr,gate,Latch.kr(gate,gate)) * x;
Out.ar(0,x);
}).send(s);
);
//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
x.free;


What follows is blatant commercialism, thwarted by technical snafu:


Bandcamp !

Just in time for the holidays, Bandcamp come through with tracks for you! Not just is another indie music site, band camp lets artists sell their music online for free and a variety of network tracking statistics features. The layout is stylish, and unfettered by extraneous advertisements. They also have a flexible pricing structure for downloads. And to top it all off their widget has a neat-o 3D visualizer, very similar to what I used to do back in the with wings3d and pd at spin jam :

<a href="http://djcypod.bandcamp.mu/track/virtual-rave">virtual rave by djcypod</a>



The opinions expressed in this post do not necessarialy reflect those of blogger or our sponsor:


splash from the dottedfields set

here's a little taste of what it was like at the zoo: