*** empty log message ***
[chuck-blob.git] / v2 / examples / basic / envelope.ck
blob517a365b04f71be8bda93f103c12fa2384b38936
1 // run white noise through envelope
2 Noise n => Envelope e => dac;
4 // infinite time-loop
5 while( true )
7     // random choose rise/fall time
8     Std.rand2f(10,500)::ms => dur t => e.duration;
9     // print
10     <<< "rise/fall:", t/ms, "ms" >>>;
12     // key on - start attack
13     e.keyOn();
14     // advance time by 800 ms
15     800::ms => now;
16     // key off - start release
17     e.keyOff();
18     // advance time by 800 ms
19     800::ms => now;