SinOsc s => dac; .4 => s.gain; chirp( 30, 70, 10::second, 2::ms ); fun void chirp( float src, float target, dur duration, dur tinc ) { src => float freq; duration / tinc => float steps; ( target - src ) / steps => float inc; float count; while( count < steps ) { freq + inc => freq; 1 +=> count; Std.mtof( freq ) => s.freq; tinc => now; } s =< dac; } //section fm.ck s => dac; SinOsc m => blackhole; 220 => float cf; // modulator frequency 550 => float mf => m.freq; // index of modulation 200 => float index; 0 => int time; while( time <2000 ) { time+1=>time; // modulate cf + (index * m.last()) => s.freq; // advance time by 1 samp 1::ms => now; } s =< dac; //section foo2.ck Blit k => Pan2 p; p.left => JCRev r1 => dac.left; p.right => JCRev r2 => dac.right; // initial settings .5 => k.gain; .1 => r1.mix; .1 => r2.mix; // an array [ 0, 0, 2, 4, 7] @=> int hi[]; // set the harmonic 4 => k.harmonics; // spork the pan control spork ~ dopan(); // infinite time loop while( time <2100 ) { time+1=>time; Std.mtof( 40 - Math.random2(0,3) * 3 + hi[Math.random2(0,hi.cap()-1)] ) => k.freq; 120::ms => now; } // pan control fun void dopan() { float t; while( true ) { .8 * Math.sin(t) => p.pan; .05 +=> t; 100::ms => now; } } s => dac; while(time <4000) { time+1=>time; // modulate cf + (index * m.last()) => s.freq; // advance time by 1 samp 1::ms => now; } s =< dac;