[chuck-users] Hello, some newbie questions

Mat Schaffer mat at schaffer.me
Fri Oct 8 23:16:16 EDT 2010


On Tue, Oct 5, 2010 at 2:33 PM, Tom Lieber <tom at alltom.com> wrote:

> 2010/10/5 Mat Schaffer <mat at schaffer.me>:
> > - The SinOsc seems to click whenever I stop or disconnect it. I've tried
> > moving the gain to 0.1, then 0, but it still seems to click. Is there
> some
> > technique for avoiding this?
>
> Typically you'd use an envelope to avoid clicks by slowly ramping the gain.
>
> For example, you could use an Envelope:
>
>  SinOsc s => Envelope e => dac;
>  50::ms => e.duration;
>  while(1) {
>      e.keyOn(1);
>      second => now;
>      e.keyOff(1);
>      second => now;
>  }
>
> Or ADSR, which lets you give it a little kick:
>
>  SinOsc s => ADSR e => dac;
>  e.set(50::ms, 50::ms, .4, 50::ms);
>  while(1) {
>      e.keyOn(1);
>      second => now;
>      e.keyOff(1);
>      second => now;
>  }


Thanks, Tom! Just noticed you also did Ruck which I was looking at. Good
luck on the project! I'd love something like ChucK that had a more
full-featured language driving it.

Thanks again,
Mat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20101008/67c2aad5/attachment.htm>


More information about the chuck-users mailing list