Tom Says: Safe code is boring code! Why??
Previous page:
Daily Crap 2009-04-28
Next page:
Daily Crap 2009-05-02
Here's some bubbling water or something.
fun void grain(float freq) {
TriOsc s => Envelope e => dac;
0.1 => s.gain;
freq => s.freq;
(1. / freq)::second => dur period;
period * 2 => e.duration;
1 => e.value;
e.keyOff();
period * 2 => now;
}
while(0.1::ms => now) {
if(Std.rand2f(0, 1) < 0.005)
spork ~ grain(Std.rand2f(20, 200));
}
My copy of Microsound should be coming soon.
Posted Apr 29, 2009, in the night.