Debian Codegraph @

examples/basic/fm3.ck

raw
1 // FM synthesis (using Step instead of .sync == 2; see fm2.ck)
2
3 // modulator to carrier
4 SinOsc m => SinOsc c => dac;
5 // step function, add to modulator output
6 Step step => c;
7
8 // carrier frequency
9 440 => step.next;
10 // modulator frequency
11 110 => m.freq;
12 // index of modulation
13 300 => m.gain;
14
15 // time-loop
16 while( true ) 1::second => now;