1 // music for replicants
3 VoicForm voc=> JCRev r => Echo a => Echo b => Echo c => dac;
9 1000::ms => a.max => b.max => c.max;
10 750::ms => a.delay => b.delay => c.delay;
11 .50 => a.mix => b.mix => c.mix;
13 // shred to modulate the mix
14 fun void vecho_shred( )
25 std.rand2f(0.0,1.0) => decider;
26 if( decider < .3 ) 0.0 => mix;
27 else if( decider < .6 ) .08 => mix;
28 else if( decider < .8 ) .5 => mix;
32 (mix-old)/1000.0 => inc;
37 old => a.mix => b.mix => c.mix;
41 std.rand2(2,6)::second => now;
46 spork ~ vecho_shred();
48 0.01 => voc.vibratoGain;
52 2 * std.rand2( 0,2 ) => int bphon;
53 bphon => voc.setPhoneme;
54 std.rand2f( 0.6, 0.8 ) => voc.noteOn;
56 if( std.randf() > 0.7 )
58 else if( std.randf() > .7 )
60 else if( std.randf() > -0.8 )
61 { .250::second => now; }
65 4 * std.rand2( 1, 4 ) => int pick;
69 for( ; i < pick; i++ )
71 bphon + 1 * pick_dir => voc.setPhoneme;
72 std.rand2f(.4,.6) + (float)i*.035 => pluck;
73 pluck + 0.0 * (float)pick_dir => voc.noteOn;
74 !pick_dir => pick_dir;
80 2 * std.rand2( 0, 4 ) => int freq;
81 if( freq == 6 ) 7 => freq;
82 if( freq == 8 ) 9 => freq;
83 std.mtof( (float)( 45 + std.rand2(0,2) * 12 + freq ) ) => voc.freq;