January 6th, 2011

beartato phd

(no subject)

Today's little supercollider experiment is having every MIDI key play its own note, and then 4/10s later, a note an octave down. Sounds like this.

Code is this:
MIDIIn.connect(device: 3);

(var on;
on = NoteOnResponder({ |src, chan, num, veloc| f.value(num); });
q = { on.remove; };)

(SynthDef(\my_osc, {
 |freq = 400|
 Out.ar(0, Splay.ar(Saw.ar(freq, Line.kr(1,0,0.1,doneAction: 2))));

x = Synth(\my_osc);
f = { |z| Synth(\my_osc, [\freq, z.midicps]);  Routine({ 0.4.wait;
 Synth(\my_osc, [\freq, (z-12).midicps])}).play; };

I'm not sure I have enough free time to consistently do supercollider-thingies-per-fixed-unit-of-time as with other challenges, but they are fun enough that I think I will keep doing them for a while. I think I ought to start playing with more audio-level stuff as opposed to mere MIDI silliness.