Debian Codegraph @

examples/basic/ring.ck

raw
1 //--------------------------------------------
2 // simple ring modulation
3 //
4 // any ugen has .op:
5 // ---
6 // -1 pass through the input
7 // 0 stop input
8 // 1 add inputs (default)
9 // 2 subtract from first input
10 // 3 multiply inputs
11 // 4 divide from first input
12 //--------------------------------------------
13
14 // the patch
15 adc => Gain g => dac;
16 SinOsc s => g;
17
18 // multiply inputs at g
19 3 => g.op;
20
21 // presets
22 400.0 => s.freq;
23
24 // time loop
25 while( true )
26 1::second => now;