Debian Codegraph @

examples/basic/whirl.ck

raw
1 // sine to dac
2 SinOsc s => dac;
3 // let's turn down gain, for this can be loud and annoying
4 .15 => s.gain;
5
6 // infinite time loop
7 0.0 => float t;
8 while( true )
9 {
10 // modulate
11 30 + ( Math.sin(t) + 1.0 ) * 10000.0 => s.sfreq;
12 t + .004 => t;
13
14 // advance time
15 1::ms => now;
16 }