Debian Codegraph @

examples/book/digital-artists/chapter9/UseBPM2.ck

raw
1 // Listing 9.7 Make another BPM, but static variables are shared
2
3 // Lives in another file, UseBPM2.ck
4 SinOsc s => dac.right;
5 BPM t2; // Define another BPM named t2
6 0.3 => s.gain;
7 800 => int freq;
8
9 while (freq > 400)
10 {
11 freq => s.freq;
12 t2.quarterNote => now;
13 50 -=> freq;
14 }