Debian Codegraph @

examples/basic/imp.ck

raw
1 // impulse generator is cool...
2 // this demo is not
3
4 // connect impulse generator
5 Impulse i => dac;
6 .5 => i.gain;
7
8 // emit impulse every so often
9 2000 => int a;
10 while( 1 )
11 {
12 // set the next sample
13 1.0 => i.next;
14
15 // advance time
16 a::samp => now;
17 a - 8 => a; if( a <= 0 ) 2000 => a;
18 }