Debian Codegraph @

examples/basic/wind.ck

raw
1 // noise generator, biquad filter, dac (audio output)
2 Noise n => BiQuad f => dac;
3 // set biquad pole radius
4 .99 => f.prad;
5 // set biquad gain
6 .05 => f.gain;
7 // set equal zeros
8 1 => f.eqzs;
9 // our float
10 0.0 => float t;
11
12 // infinite time-loop
13 while( true )
14 {
15 // sweep the filter resonant frequency
16 100.0 + Std.fabs(Math.sin(t)) * 15000.0 => f.pfreq;
17 t + .01 => t;
18 // advance time
19 5::ms => now;
20 }