*** empty log message ***
[chuck-blob.git] / v2 / examples / basic / whole.ck
blobe81be1c69af48b6415f3c8214cde153963ee1b9b
1 // another candidate for lamest demo
3 // patch
4 SinOsc s => JCRev r => dac;
5 .5 => r.gain;
6 .075 => r.mix;
8 // note number
9 20 => float note;
11 // go up to 127
12 while( note < 128 )
14     // convert MIDI note to hz
15     Std.mtof( note ) => s.freq;
16     // turn down the volume gradually
17     .5 - (note/256.0) => s.gain;
19     // move up by whole step
20     note + 2 => note;
22     // advance time
23     .125::second => now;
26 // turn off s
27 0 => s.gain;
28 // wait a bit
29 2::second => now;