Tom Says: Safe code is boring code! Why??
Previous page:
Daily Crap 2009-05-14
Next page:
Daily Crap 2009-05-18
Live-graining. It's like the delay line script, except it mixes everything up. I recommend using headphones or a mic that's not too susceptible to feedback:
fun void grain(dur length, dur offset) {
adc => Delay d => Envelope e => dac;
offset => d.max => d.delay;
length / 2. => e.duration;
offset => now;
e.keyOn(1);
length / 2. => now;
e.keyOff();
length / 2. => now;
}
300::ms => dur grainsize;
5 => float jitter;
while(grainsize/2. => now) {
spork ~ grain(grainsize, Std.rand2f(0, grainsize/second * jitter)::second);
}Posted May 16, 2009, in the morning.