1 // banded waveguide sample
3 BandedWG band => JCRev r => dac;
7 std.mtof( (float)( 21 + std.rand2(0,3) * 12 + 7 ) ) => band.freq;
13 std.rand2f( 0.1, 0.9 ) => band.bowRate;
14 std.rand2f( 0.2, 0.35 ) => band.bowPressure;
15 std.rand2f( 0.6, 0.8 ) => band.startBowing;
17 if( std.randf() > 0.7 )
19 else if( std.randf() > .7 )
21 else if( std.randf() > 0.2 )
22 { .250::second => now; }
26 4 * std.rand2( 1, 4 ) => int pick;
29 std.rand2f( 50.0, 200.0 ) => float d;
31 for( ; i < pick; i++ )
33 std.rand2f(.4,.6) + (float)i*.35/(float)pick => pluck;
34 pluck + 0.1 * (float)pick_dir => band.pluck;
35 !pick_dir => pick_dir;
40 if ( std.randf() > 0.2 ) {
42 0.001 => band.stopBowing;
43 0.5::second * (float) std.rand2(1,3) => now;
46 2 * std.rand2( 0, 4 ) => int freq;
47 if( freq == 6 ) 7 => freq;
48 if( freq == 8 ) 9 => freq;
49 std.mtof( (float)( 21 + std.rand2(0,5) * 12 + freq ) ) => band.freq;
50 if ( std.randf() > 0.7 )
51 std.rand2(0,3) => band.preset;