sinusdeklinationen

a quick port of a very simple pure-data demonstration patch made by malte steiner. just to show one way how to go about things in supercollider.

get the pd patch here... sinusdeklinationen.pd

and then compare it with the following...

//--sinusdeklinationen by malte steiner, ported to sc by redFrik

s.boot;

(
SynthDef(\sinuscell, {|out= 0, pan= 0, amp= 0.5, fre= 400, atk= 1, sus= 0.2, rel= 1|
        var env= EnvGen.kr(Env.linen(atk, sus, rel, amp), doneAction:2);
        var snd= SinOsc.ar(fre, 0, env);
        Out.ar(out, Pan2.ar(snd, pan));
}).send(s);
)

(
var cells= [-1, -0.6, -0.5, 0, 0.2, 0.5, 0.4, 1];
~masterVol= 0.1;
cells.do{|c|
        Routine({
                inf.do{
                        var fre= 1100.rand;
                        var atk= 1.0.rand;
                        var sus= 0.2;
                        var rel= 1.0.rand;
                        Synth(\sinuscell, [\fre, fre, \amp, 1.0.rand*~masterVol, \atk, atk, \sus, sus, \rel, rel, \pan, c]);
                        (atk+sus+rel).wait;
                };
        }).play;
};
)

~masterVol= 0.2
~masterVol= 0.02

//stop with cmd+.