//gkc: demonstation of dyna.expand() mode //an expander applies a gain ratio to events //that fall below a volume threshold //It makes the quiet stuff quieter! //In this case, we seem to be stuffing the karp //down into the lowest bits of the sample. //You should know what you're doing here (I don't). //if pop producers are involved in a compression war, //are lowercase producers involved in an gating/expansion war? sndbuf inst => dyna dyn => dac; "special:dope" => inst.read; StifKarp karp => Echo ec => dyn; karp.gain( 0.01 ); ec.delay( 250::ms ); ec.mix( 0.5 ); //set the mode and presets dyn.expand(); //fiddle with the settings dyn.thresh( 0.01 ); dyn.attackTime( 20::ms ); dyn.releaseTime( 5::ms ); //dyn.slope( -100000000 ); //dyn.ratio( 3.0 ); dyn.slope( -1 ); dyn.gain( 1.0 ); inst.gain( 0.2 ); fun void chimes(int a) { for (0=>int i; i<4; i++) { //quick sequence at just fifths //long sequence at just fourths karp.freq( 220 * math.pow(4.0/3.0, a) * math.pow(3.0/2.0, i) ); karp.gain( math.pow(2,(a+1))*0.01 ); karp.noteOn( 1.0 ); 150::ms => now; } } for(0=>int i; ;i++) { //toggle processing every 4 beats if ( i%4==0 ) { dyn.op( -dyn.op() ); <<<"op:",dyn.op()>>>; } //inst.pos( 0 ); spork ~ chimes(i%4); 1::second => now; }