Crackles if audio signals are switched on/off

If I switch on/off audio signals very fast by multiplying it with 0 and 1 (object: [*~], should be a gate to make stutter sound-effects) I recognize crackles, in the audio engine of the MacBookAir as well as in the Lich. Any idea how to fixt it? I use Pd-0.53-2 and the latest firmware of Lich.

If you’re simply changing from x1 to x0 signal amplitude immediately then that naturally makes crackle sounds on any platform. It’s quite common to use very small amounts of interpolation / easing on the multiplication to avoid that. Or, delay the multiplication from taking effect until the next zero crossing is encountered.

To create stutter-like effects you should use a delay and interpolate its transitions (or only transition on zero crossing as suggested above, but that’s harder to implement and creates extra jitter).

The reason why you hear “crackles” is that you create discontinuity in your audio. But even without them, the intended modulation effect won’t sound as a stutter as you won’t be hearing the same chunk of audio when it’s triggered.

Thanks for all the comments. I didn’t have known that. I just have solved the problem with the [line~] object which generates a slope during on/off. I advise to visit the video here: line vs line~ (correction vid) - YouTube