Sunday, February 5, 2023

Distortion again

After discovering that my hard clipping circuit introduced a lot of noise on the gnd line, I decided to put a 1k resistor before the clipping diodes. When doing soft clipping, this put the 1k inside the feedback loop, but this didn't seem to matter too much.

However, now the soft and hard clipping modes are very similar, to the point that I wonder if it is really necessary to have a hard clipping mode at all.

Soft clipping, four diodes and 1k in feedback


Hard clipping, two diodes


Hard clipping, four diodes

Now, it's very hard to tell the difference with a sine input, so perhaps I should redo this with a more discrete function to see how it actually performs. But more importantly, I should try this out in practice.

Soft saw(ish)



Hard saw(ish), two diodes

Soft triangle


Hard triangle, two diodes

Soft triangle, two diodes

If the conclusion is that hard and soft clipping is too similar, I may also look at ways of improving the soft clipping to keep amplitudes more the same without having to compensate in the output VCA.

Update:
TWO diodes soft clipping is much less similar, perhaps that's the reasonable option - only two diodes for clipping

Here is a +/-5v with matching soft and hard clipping - without any amplitude compensation:

The output ends up at around 7v in both cases, which is pretty cool. We COULD trim it down to 5v again but we could also just leave it.

Now, there is ONE problem with all of this - the input will only distort if less than +/-5v. Once we start summing oscillators stuff we'll get distortion from the get go. Not sure exactly how to handle this as we want to be able to get distortion from a single osc too, so perhaps this is better solved in dry/wet mixing? If not, we need to attenuate the input further or use an input gain vca which i REALLY don't want to do, especially if we have an output VCA as well (we do already have two output VCAs so it may be solved in software though).

Update 2:
I did a change of the circuit to use a 68k/1k resistor divider instead of a 33k/1k, and to compensate for this I put a 240k feedback resistor in place of the 120k at the output gain stage to keep unity gain.

Now 10V is allowed through the circuit undistorted. When I send +/-5v through, distortion starts at around 50% turn of the CV pot. For +/-10V it starts at around 25%. 

With the output gain at max distortion set to get a +/-10V distorted output for a 10V input, I get a +/-8V output for a soft clipped 5V, so a significant gain. For hard clipping it is even more, the clipping level is around +/-9v for 5v input (though the slope is likely not as steep.

Again, I need to try this in practice to see what feels best.

+/-5V input with max soft clipping

+/-10V input with max soft clipping

+/-5V input with max hard clipping

+/-10V input with max hard clipping

In practice the big difference is that with the 10v pass option we may actually end up clipping against the +/-112v rails if we don't carefully adjust the gain through the cycle.

With the 5v pass option, we clip much sooner, and the max output is much lower. It can never reach 10V even if the input is 10V.

All in all it DOES look like the 5v version performs fairly well. Without any gain correction - and the gain CV set to about 3.3V, we do get a bit of gain for the 5V input as distortion increases. For 10v there is a bit of distortion from the start, more for hard than soft clipping.

Soft clipping, 5v in, no distortion

Soft clipping, 5v in, max distortion

Soft clipping, 10v in, no distortion set gives a bit of distortion on output

Soft clipping, 10v in, max distortion gives a higher output than for 5v max distortion.



Hard clipping, 5v max distortion

Hard clipping, 10v max distortion, not much higher than for 5v

Hard clipping, 10v no distortion. Distorts from the start, and more than for soft clipping


Modified circuit with unity gain at max vca cv (or without cvm just a buffer).


No comments:

Post a Comment