Difference between revisions of "ChucK/foo.ck"

From CSWiki
Jump to: navigation, search
 
Line 9: Line 9:
 
  {
 
  {
 
     // choose freq
 
     // choose freq
     std.rand2f( 20, 100 ) => std.mtof => s.freq;
+
     std.rand2f( 40, 100 ) => std.mtof => s.freq;
 
     // advance time
 
     // advance time
 
     100::ms => now;
 
     100::ms => now;
 
  }
 
  }

Revision as of 17:53, 21 February 2006

This is an example of an example program.

// hi i am an example program
sinosc s => dac;
.5 => s.gain;

// infinite time loop
while( true )
{
    // choose freq
    std.rand2f( 40, 100 ) => std.mtof => s.freq;
    // advance time
    100::ms => now;
}