5 Oct
2010
5 Oct
'10
2:33 p.m.
2010/10/5 Mat Schaffer
- 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/