Oversampling Softclipper
-
I've been trying to create a softclipper for my plugin, however, my biggest issue is aliasing, I am using faust, and none of the faust libraries have good enough anti-aliasing. Putting a faust node through an oversampling node also seems to have no effect (except 8x shifts the frequencies up for some reason). I know you can put a math.clip node in an oversampled node, but I want softclipping not hardclipping. Does anyone have a solution?
-
@xander what faust code are you using?
-
@Lindon I'm using the aa(anti-aliased) library. The effect is a parallel distortion, but it doesn't have any aliasing issues; it's only when pushing audio into the softclipper within it that it starts having aliasing issues.
-
@xander You need to band limit the soft clipping circuit somehow. Not sure if this needs adding to your faust code, or if you can put a filter after it in the network, but essentially.... non-linear clipping/saturation/distortion can create harmonics that far exceed your sampling rate and nyquist; and they end up folding back into lower frequencies. You'll need to handle it by filtering.
Look into FIR filtering within faust, maybe it is something you can add inside the algorithm.
-
@xander my guess is your faust code works with a fix expected samplerate so that when you‘re oversampling it shifts the normalised frequency ratio.