‹ atolf lftoa redUniverse: Support for Discrete Worlds ›

sinusdeklinationen

2011-02-15 17:59 supercollider

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];
~mainVol= 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*~mainVol, \atk, atk, \sus, sus, \rel, rel, \pan, c]);
      (atk+sus+rel).wait;
    };
  }).play;
};
)


~mainVol= 0.2
~mainVol= 0.02

//stop with cmd+.

‹ atolf lftoa redUniverse: Support for Discrete Worlds ›