Debian Codegraph @

examples/book/digital-artists/chapter2/Listing2.4.ck

raw
1 // Listing 2.4 Using dac.left and dac.right to connect to left and right speakers
2
3 // two sine waves in stereo
4 SinOsc s => dac.left; // (1) Connects one SinOsc to the left channel...
5 SinOsc t => dac.right; // (2) ...and another to the right channel.
6
7 // set frequencies
8 220 => s.freq; // (3) Sets the frequency of the left osc...
9 361 => t.freq; // (4) and sets the right osc to a different frequency.
10
11 // advance time
12 second => now;