[chuck-dev] feature request: ---

Tom Lieber tom at alltom.com
Tue Dec 4 09:58:23 EST 2012


So you could write this:

  TubeBell b => dac;
  ---
  while(40::ms => now) {
      1 => b.noteOn;
      1600::ms => now;
      1 => b.noteOff;
  }
  ---
  do {
      Std.mtof(Std.rand2(0, 3) + 60) => b.freq;
  } while(1640::ms => now);

and have it work like this:

  TubeBell b => dac;

  fun void part1() {
      while(40::ms => now) {
          1 => b.noteOn;
          1600::ms => now;
          1 => b.noteOff;
      }
  }

  fun void part2() {
      do {
          Std.mtof(Std.rand2(0, 3) + 60) => b.freq;
      } while(1640::ms => now);
  }

  spork ~ part1();
  spork ~ part2();
  day => now;

-- 
Tom Lieber
http://AllTom.com/
http://infinite-sketchpad.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-dev/attachments/20121204/8fb49cf1/attachment.htm>


More information about the chuck-dev mailing list