[chuck-users] Hello, some newbie questions
Tom Lieber
tom at alltom.com
Tue Oct 5 14:33:04 EDT 2010
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;
}
--
Tom Lieber
http://AllTom.com/
http://favmusic.net/
More information about the chuck-users
mailing list