[chuck-users] waveform generation by function

Sample Hampton zaphod4007 at aol.com
Sat Aug 4 18:06:22 EDT 2012


Users,

What is the best way to do waveform generation--one sample at time of 
course--with math functions?  First I tried chucking a variable straight 
to the dac, but it didn't take.  Then I tried chucking a variable to the 
value of a Step, and chucking the Step to the dac. That did work, and 
below I have a simple lpf'ed sawtooth going.  Is there, however, a more 
conventional and direct way of doing this?

Step taint => LPF passer => dac;
400 => passer.freq;
-0.2 => float v;

while(true) {
     v + 0.004 => v;
     if (v > 0.2) {
          -0.2 => v;

      }
      v => taint.next;
      1::samp => now;
  }

Sample


More information about the chuck-users mailing list