/usr/share/doc/chuck/examples/stk/rhodey.ck is in chuck 1.2.0.8.dfsg-1.4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | // more music for replicants
// patch
Rhodey voc=> JCRev r => Echo a => Echo b => Echo c => dac;
220.0 => voc.freq;
0.8 => voc.gain;
.8 => r.gain;
.2 => r.mix;
1000::ms => a.max => b.max => c.max;
750::ms => a.delay => b.delay => c.delay;
.50 => a.mix => b.mix => c.mix;
// shred to modulate the mix
fun void vecho_Shred( )
{
0.0 => float decider;
0.0 => float mix;
0.0 => float old;
0.0 => float inc;
0 => int n;
// time loop
while( true )
{
Std.rand2f(0.0,1.0) => decider;
if( decider < .3 ) 0.0 => mix;
else if( decider < .6 ) .08 => mix;
else if( decider < .8 ) .5 => mix;
else .15 => mix;
// find the increment
(mix-old)/1000.0 => inc;
1000 => n;
while( n-- )
{
old + inc => old;
old => a.mix => b.mix => c.mix;
1::ms => now;
}
mix => old;
Std.rand2(2,6)::second => now;
}
}
// let echo shred go
spork ~ vecho_Shred();
// scale
[ 0, 2, 4, 7, 9 ] @=> int scale[];
// our main loop
while( true )
{
// pentatonic
scale[Std.rand2(0,scale.cap()-1)] => int freq;
Std.mtof( ( 33 + Std.rand2(0,1) * 12 + freq ) ) => voc.freq;
Std.rand2f( 0.6, 0.8 ) => voc.noteOn;
if( Std.randf() > 0.7 )
{ 1000::ms => now; }
else if( Std.randf() > .7 )
{ 500::ms => now; }
else if( Std.randf() > -0.8 )
{ .250::second => now; }
else
{
0 => int i;
2 * Std.rand2( 1, 3 ) => int pick;
0 => int pick_dir;
0.0 => float pluck;
for( ; i < pick; i++ )
{
Std.rand2f(.4,.6) + i*.035 => pluck;
pluck + -0.02 * (i * pick_dir) => voc.noteOn;
!pick_dir => pick_dir;
250::ms => now;
}
}
}
|