greaterthan~ distorting

mmmmm_bop's icon

im trying to create a on/off switch which is based on the level of audio, from a line input. im using the greaterthan~ object, it works fine but it is causing my audio to distort. ive tried reducing the level of audio into the object but no matter what i do it keeps distorting the output.
any way around this?

mr_mapes's icon

The output of [>~] is only ever 1 or 0 - despite being a signal output, there is no resolution beyond that. To get around this, rather than using [>~] inserted into the audio path, use it in a sidechain fashion and use its output to switch on/off a [*~] in the wanted audio path. Better yet, rather than simply switching between 0-1 you could use [line] with an adjustable ramp time to get some soft switching and reduce non-zero clipping. This should leave the raw audio untouched other than by the multiplier and the sidechain path will be infinitely flexible in how you decide to control the switching.

mr_mapes's icon

It is worth mentioning that [>~] will always distort when the threshold level is anything but -1. The negative half cycle will always be the first to go. Using [