1 // music for replicants
4 VoicForm voc=> JCRev r => Echo a => Echo b => Echo c => dac;
11 1000::ms => a.max => b.max => c.max;
12 750::ms => a.delay => b.delay => c.delay;
13 .50 => a.mix => b.mix => c.mix;
15 // shred to modulate the mix
16 fun void vecho_Shred( )
27 Std.rand2f(0.0,1.0) => decider;
28 if( decider < .3 ) 0.0 => mix;
29 else if( decider < .6 ) .08 => mix;
30 else if( decider < .8 ) .5 => mix;
34 (mix-old)/1000.0 => inc;
39 old => a.mix => b.mix => c.mix;
43 Std.rand2(2,6)::second => now;
48 spork ~ vecho_Shred();
50 0.01 => voc.vibratoGain;
53 [ 0, 2, 4, 7, 9 ] @=> int scale[];
58 2 * Std.rand2( 0,2 ) => int bphon;
59 bphon => voc.phonemeNum;
60 Std.rand2f( 0.6, 0.8 ) => voc.noteOn;
62 if( Std.randf() > 0.7 )
64 else if( Std.randf() > .7 )
66 else if( Std.randf() > -0.8 )
67 { .250::second => now; }
71 4 * Std.rand2( 1, 4 ) => int pick;
75 for( ; i < pick; i++ )
77 bphon + 1 * pick_dir => voc.phonemeNum;
78 Std.rand2f(.4,.6) + i*.035 => pluck;
79 pluck + 0.0 * pick_dir => voc.noteOn;
80 !pick_dir => pick_dir;
86 scale[Std.rand2(0,scale.cap()-1)] => int freq;
87 Std.mtof( ( 45 + Std.rand2(0,2) * 12 + freq ) ) => voc.freq;