DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: fryingpan on July 19, 2022, 04:15:55 PM

Title: A pet peeve: soft vs hard clipping
Post by: fryingpan on July 19, 2022, 04:15:55 PM
Several authors refer to soft vs hard clipping as merely the location of the clipping diodes.

Soft clipping is, according to them, when the clipping diodes are placed in the feedback loop of an amplifier. Hard clipping instead is placing those clipping diodes from the output of an amp to ground.

That is not the real difference. Soft vs hard clipping is merely the hardness of the knee at onset of clipping. Hard clipping is when the clipping is abrupt, soft clipping is when the knee is softer. Full stop. You can achieve both in both ways. Ultimately, the difference lies in the relative difference in resistance between the regular signal path (either in or out of the feedback loop) and for V>V_th.
Title: Re: A pet peeve: soft vs hard clipping
Post by: antonis on July 19, 2022, 04:37:45 PM
aye aye, sir..
Title: Re: A pet peeve: soft vs hard clipping
Post by: fryingpan on July 19, 2022, 05:05:14 PM
Of course, placing them in the feedback loop is more efficient, since you don't force the amplifying device into outputting current into a low impedance (close to a short circuit to ground). But with soft clipping, shunting diodes to ground through a series resistor is no big issue.
Title: Re: A pet peeve: soft vs hard clipping
Post by: Rob Strand on July 19, 2022, 07:45:13 PM
Quote
Soft clipping is, according to them, when the clipping diodes are placed in the feedback loop of an amplifier. Hard clipping instead is placing those clipping diodes from the output of an amp to ground.

That is not the real difference. Soft vs hard clipping is merely the hardness of the knee at onset of clipping. Hard clipping is when the clipping is abrupt, soft clipping is when the knee is softer. Full stop. You can achieve both in both ways. Ultimately, the difference lies in the relative difference in resistance between the regular signal path (either in or out of the feedback loop) and for V>V_th.
It does tend to work out that way but the effect is very subtle. 

As far as the diode characteristics are concerned the true cause isn't the position of the diode but the value of the resistor feeding the diode.  The feedback set-ups have a large resistor (100k to 1M) in parallel with the diode whereas the output clippers have a smaller value (1k to 10k) feeding the diode.

The biggest difference with the output clippers is the opamp can also clip.   That is usually harder clipping than the diode clipping.  You will find people are more fussy about the choice of opamp for the output clippers (eg RAT, MXR distortion+, DOD Overdrive).  In the feedback case the diodes provide the clipping and generally the opamp doesn't clip.

At the end of the day diode clippers tend to have similar characteristics.
Title: Re: A pet peeve: soft vs hard clipping
Post by: Mark Hammer on July 20, 2022, 09:06:23 AM
The biggest difference with the output clippers is the opamp can also clip.   That is usually harder clipping than the diode clipping.  You will find people are more fussy about the choice of opamp for the output clippers (eg RAT, MXR distortion+, DOD Overdrive).  In the feedback case the diodes provide the clipping and generally the opamp doesn't clip.
THIS.

The typical gain expected of op-amps used in clipping circuits, coupled with the typical input signal level and supply voltage, typical exceeds the headroom of the chip.

Consider:
1) An op-amp will normally be able to swing within a volt to a volt and a half of "the rails".  So, a 9V-powered chip can swing from the 4.5V floating ground, down to 1.5 and up to 7.5V.  That gives us maximum voltage swing of +/-3V before the chip itself clips.

2) It is rare to find "harmonic enhancement" circuits that aim for anything less than a gain of 80x, and many exceed 200-400x.

3) The average guitar pickup will output something like 250mv or more when you give a full strum to all 6 strings, and some pickups will give even more; especially if heavier gauge strings are in use.

So, how many times can you "fit" +/-250mv into +/-3V?  Not many, and certainly not 100x.  So, it the diodes come after the output of the op-amp, they are likely to be receiving a "pre-clipped" signal.

But how wide is the signal allowed to swing when the diodes are placed in the feedback loop of the op-amp?  Well, anything above the forward voltage of the diodes simply doesn't happen.  A pair of silicon diodes will set that ceiling and floor at roughly +/-600mv.  Many drive pedals that aim for "transparency" may use a 2+2 or even 3+3 complement of diodes in that location, but even those still won't allow for the amplified signal to exceed the allowable voltage swing of the chip.

My own contention is that, as Rob implied, a diode is a diode is a diode, but so-called "hard clippers" are in reality often *double-clippers*.  The first clip arises from exceeding the voltage swing of the chip, and the second from diode-clipping of the output.

One of the corollaries of this is that where one would expect the resulting harmonic content of a "hard" clipper to change with increases to supply voltage, one would NOT expect to hear much, if any difference, in soft clippers, when supply voltage is increased.  If the signal stayed well below the maximum swing with a 9V supply, it will stay safely below with 12, 15, or 18V as well, because of the fixed ceiling the feedback diodes create.

Now, would the "double-clipping" of both op-amp itself, and diodes, create a somewhat "harsher" tone?  Sure.  But that is ultimately a result of design and gain staging.  For instance, imagine we had a series of op-amp stages, each with a pair of diodes to ground on their output, but none of the stages ever challenging the voltage swing and headroom of the op-amp itself.  The harmonic content would accumulate, because staying above the forward voltage of diodes while below the voltage swing of op-amps is easy to do.  But it would not be "hard" clipping.  What we call hard-clipping is generally the result of asking one single op-amp stage to provide all the gain, and lots of it.
Title: Re: A pet peeve: soft vs hard clipping
Post by: amptramp on July 20, 2022, 09:32:11 AM
Op amp feedback stages do not necessarily clip that hard if the clipping stage is non-inverting like a Tube Screamer because there is always a gain of one for the input signal.  The Tube Screamer is run with high gains but once the clipping starts, the gain drops due to the lowered diode resistance and some unclipped signal gets through.  This is equivalent to the behaviour of back-to-back diodes to ground with a series resistance.
Title: Re: A pet peeve: soft vs hard clipping
Post by: teemuk on July 20, 2022, 11:49:54 AM
Op amp feedback stages do not necessarily clip that hard if the clipping stage is non-inverting like a Tube Screamer because there is always a gain of one for the input signal. 

Yes, one can visualize them "folding" to a lower gain figure at signal levels exceeding the diode forward voltage. In a sense it's semantics whether this instantenous gain compression at signal peaks (given moderate signal swings) is even considered as ("soft") clipping. It definitely "squashes" the waveform similarly though. Also...
- The diode knee provides a gradual shift between different gain levels
- with ample series resistance to diodes you get higher gains than unity.

Quote
This is equivalent to the behaviour of back-to-back diodes to ground with a series resistance.
This. Clipping is really due to voltage division of source impedance and diode impedance. With ample series resistance the shunt diodes will never "shunt" in a ratio that would result to traditional clipping.

--

I would think there is a difference of driving diodes at low source impedance of opamp output (feedback loop) vs. driving them with moderately high series resistance of the shunt configuration (shunt clipping). With lower source resistances one should get more pronounced effect of the diodes knee while higher resistance makes the resistive division more "abrupt".
Title: Re: A pet peeve: soft vs hard clipping
Post by: Mark Hammer on July 20, 2022, 01:34:31 PM
I have a recollection - vague as it may be - that back when we were all smitten by the magical role that a JRC4558D op-amp played in Tube Screamers (and this goes back at least 15 years), Jack Orman demonstrated that sticking a 1k resistor in series with the feedback-loop diodes allowed pretty much any op-amp to duplicate whatever it is/was that the JRC chip supposedly did.

Those of you with longer memories of this place and that topic, am I remembering correctly?  Jack, if you're lurking out there, is this accurate? Have you changed your stance at all?
Title: Re: A pet peeve: soft vs hard clipping
Post by: Vivek on July 20, 2022, 02:57:46 PM
I learnt from this group that a resistor in series with clipping diodes is called a "compliance resistor"

I did a theoretical study in Spice with different compliance resistors, to check the change in harmonics created versus compliance.
Title: Re: A pet peeve: soft vs hard clipping
Post by: fryingpan on July 20, 2022, 03:01:08 PM
Honestly, my suspicion is that whatever clipping happens "above" the diode clipping threshold (in a RAT for instance) has a marginal effect on the character of the clipping. Yes, no diode has nil resistance when "on" so some of the waveshaping previous to the diode clipping seeps through, but how much of it really? The real influence of the opamp in a RAT is more in the slew rate (which will certainly show in the final signal) than in the opamp clipping itself.
Title: Re: A pet peeve: soft vs hard clipping
Post by: Digital Larry on July 20, 2022, 03:24:50 PM
I learnt from this group that a resistor in series with clipping diodes is called a "compliance resistor"

I did a theoretical study in Spice with different compliance resistors, to check the change in harmonics created versus compliance.
Well?  Where is it?   ;)

DL
Title: Re: A pet peeve: soft vs hard clipping
Post by: Rob Strand on July 20, 2022, 06:51:13 PM
Quote
I did a theoretical study in Spice with different compliance resistors, to check the change in harmonics created versus compliance.
You are one of the few people who does his own investigations.
Unfortunately a lot of stuff on the web is just paraphrasing other people's stuff.

People should do their own tests.   It's can be difficult to set-up tests which only look at the effect you are looking for.   The differences are hard to hear some times.  The test set-up can stuff things up as well.  It's very easy to come-up with no conclusion.

This type of configuration isn't to bad for low to mid gain:
- Gain opamp with 18V power ; even this isn't great but at least it's consistent.
- Output resistor R to clip diodes (1N4148 diodes, low capacitance)
- Buffer
- Any low pass filters here.
- Buffer

Use a switch to switch between R = 1k and R = 100k or 1M.
When the resistor is set to 1k switch in a divider or pot to match the output levels.

Switch back and forth between the two configs.

Title: Re: A pet peeve: soft vs hard clipping
Post by: Rob Strand on July 20, 2022, 07:09:58 PM
Quote
Op amp feedback stages do not necessarily clip that hard if the clipping stage is non-inverting like a Tube Screamer because there is always a gain of one for the input signal.  The Tube Screamer is run with high gains but once the clipping starts, the gain drops due to the lowered diode resistance and some unclipped signal gets through.  This is equivalent to the behaviour of back-to-back diodes to ground with a series resistance.
It's true but normally they don't clip much, more incidental clipping.   Back in the day I set-up tests where I drove strong signals into non-inverting feedback clipper.   I wasn't fond of the sound although it was a sound I was aiming for at the time.

There's a lot of talk of stacking pedals these days.  In that scenario that type of clipping can happen.
While people's mind think of two boxes (drawing goodness energy from the sound of both pedals  ;D).
It's no different than drawing a fence around both pedals and calling it a new single pedal which a different clipping structure.   Plenty of Boss pedals are essentially this.

Quote
Honestly, my suspicion is that whatever clipping happens "above" the diode clipping threshold (in a RAT for instance) has a marginal effect on the character of the clipping. Yes, no diode has nil resistance when "on" so some of the waveshaping previous to the diode clipping seeps through, but how much of it really? The real influence of the opamp in a RAT is more in the slew rate (which will certainly show in the final signal) than in the opamp clipping itself.
[As mentioned]

Don't forget the feedback clipper lets the clean signal through as well regardless of whether the diodes are clipping or not.   This of the gain of a non-inverting amp.  gain = 1 + R2/R1   the "1" part is always there (provided the *opamp* doesn't clip).

The details have been posted a few times on the forum.   From an electronic's point of view it's fairly straight forward but not many people get it.  IMHO it's why some people like clippers two diodes each direction instead of one each direction (like TS-9);  Boss OD-1, SD-1 are like 1.5 diodes.  What you are doing is tuning the clean blend on a small scale.


Something weird happened with my post.  Hopefully all fix.
Title: Re: A pet peeve: soft vs hard clipping
Post by: teemuk on July 21, 2022, 01:10:33 AM
Quote
Don't forget the feedback clipper lets the clean signal through as well regardless of whether the diodes are clipping or not.

"Clean" (fundamental) and "distorted" (fundamental PLUS harmonics) are mutually exclusive.

Diodes in NFB loop of NINV amp form a two-fold gain function. The folding to lower gain ratio compresses the signal above diode 5hreshold. The transfer function is essentially compiled of two linear portions but it's not a straight line thus "non-linearity" and resulting distortion.
Title: Re: A pet peeve: soft vs hard clipping
Post by: Rob Strand on July 21, 2022, 02:03:05 AM
Quote
"Clean" (fundamental) and "distorted" (fundamental PLUS harmonics) are mutually exclusive.

Diodes in NFB loop of NINV amp form a two-fold gain function. The folding to lower gain ratio compresses the signal above diode 5hreshold. The transfer function is essentially compiled of two linear portions but it's not a straight line thus "non-linearity" and resulting distortion.

When the output is scaled to the same level blending makes the relative amount of distortion lower.

Distorted signal =   V1 sin(w0*t) + sum of harmonics
Clean signal = Vc sin(w0*t)
Blend = Clean signal + Distorted signal  = (Vc+V1) sin(w0*t) + sum of harmonics

Now rescale for fundamental level equal to distorted signal fundamental.

Blend_rescaled = [V1 / (V1 + Vc)]  * Blend
                     = V1 sin(w0) + [V1 / (V1 + Vc)] * sum of harmonics

The fundamental level is the same as the distorted signal
but since  [V1 / (V1 + Vc)] < 1 the relative amount of harmonics is reduced.

(When Vin increases Vc will increase more than V1.  We can keep rescaling but the point is the clean with come through more as V1 is more or less stuck at the clip level.)
Title: Re: A pet peeve: soft vs hard clipping
Post by: teemuk on July 21, 2022, 06:54:12 AM
These are actually two of my pet peeves; distortion with "clean blend" and the claim of Tube Screamer (and similar) "blending in the clean signal", so to speak.

As said, you can't have "clean" signal if the signal contains additional harmonics to fundamental. The two are mutually exclusive. If you "blend in" harmonics to fundamental - or vice versa - the end result, in various degrees, is always fundamental plus harmonics, in other words "distortion".

Secondly, the only way to get non-distorted signal output from NINV amp with diodes in feedback loop is to operate it at the region below the diode threshold. Below threshold the diodes are reverse biased and the loop gain is set by the parallel resistor. Above the diodes conduct and the loop gain decreases, typically to "unity".

You can draft the transfer function and it consists of two linear lines "folded". This alone indicates non-linearity as a whole and resulting distortion in output signal.
The signal is not amplified "cleanly", higher amplitude signal portions are just amplified with lower gain than lower amplitude portions and this distorts the signal as surely as 1+1 equals 2. It's not a sake of argument.
Title: Re: A pet peeve: soft vs hard clipping
Post by: amptramp on July 21, 2022, 07:16:54 AM
A lot of people end up with a muddy sound from hard clipping.  Let's suppose you have clipping levels at ±1 volt from the zero signal level.  If the level is referenced to zero volts, this would be an actual +1 and -1 volts.  Suppose you have a low frequency fundamental with a lower amplitude high-frequency signal riding on it.  When the signal goes beyond the clipping threshold, the fundamental is clipped but the high frequency that came with the signal goes missing entirely for the time that the output exceeds the clipping level with some partial clipping of the high frequency signal as the combined waveform nears the clipping level.

In some ways, it pays to get rid of the high frequency input signals because they are not quite integer multiples of the fundamental (some sources refer to them as partials) due to the different damping levels at various frequencies.  The clipping produces harmonics that are exact multiples of the fundamental.  This is one of the things that makes the Fuzz Face popular - the low input impedance interacts with the guitar pickup inductance to roll the response off and get rid of the upper partials so they can be replaced with true harmonics.  Otherwise you get intermodulation products that sound bad and are not harmonic.  There is a place for EQ before clipping and a different EQ after.
Title: Re: A pet peeve: soft vs hard clipping
Post by: Rob Strand on July 21, 2022, 08:26:35 AM
Here's a sim which shows without doubt that the non-inverting clipper is equivalent to clean blending.

Circuits

1) Non-inverting clipper.

2) I've added a not so commonly known form of an inverting clipper with blending.
It's the added 4k7 in the second circuit.
This circuit is quite similar to the Marshall Bluesbreaker circuit;  the Marshall form
isn't quite an exact match without tedious playing with diode models and resistor values.

3) A direct implementation of blending.

I've use inverting forms only so the mixers are inverting.

Conclusion:
The waveforms of all three clipper agree.

The difference waveforms are multiplied by 1000 in order to see the difference, it's tiny.
This isn't related to the lack of equivalence.  It's related to using finite gain and bandwidth
opamps.

Not shown here but the equivalence holds for any input.

(https://i.postimg.cc/B8sZyqNN/clipper-blend-schematic.png) (https://postimg.cc/B8sZyqNN)

(https://i.postimg.cc/c6jxW7Xv/clipper-blend-waveforms.png) (https://postimg.cc/c6jxW7Xv)
Title: Re: A pet peeve: soft vs hard clipping
Post by: teemuk on July 21, 2022, 08:52:06 AM
Those all have the "piecewise" transfer curve composed of two folding linear parts. One can also distinctly observe the "expanded" region of small signal inputs that distorts the waveform (it's not sinusoidal).
This is as obvious to ear as to eye: the signal is not "clean", it has a buzzing overtone, result of distortion.

As said, clean and distortion are mutually exclusive and the waveforms just furthermore demonstrate that.

These circuits do not "blend in" clean, they blend from one gain figure to another above a certain threshold and this alone makes the overall transfer curve non-linear despite that each part of the "piecewise" transfer function is linear in it's own right and that the unity gain prevents conventional, abrupt hard clipping.

Try this: triangular input waveform. If the output is "clean" and non-distorted you get triangular output waveform. Guaranteed.
But you will notice the output waveform is distorted by "folding" once the diode threshold is exceeded. Guaranteed.

Now there's a fine difference between nice peak compression distortion from the gain fold, or "crossover" distortion due to very same gain fold expanding the "small signal region" if you feed these circuits too high amplitude input signals. Either way they are ALL distorted.
Title: Re: A pet peeve: soft vs hard clipping
Post by: iainpunk on July 21, 2022, 11:57:15 AM
Honestly, my suspicion is that whatever clipping happens "above" the diode clipping threshold (in a RAT for instance) has a marginal effect on the character of the clipping. Yes, no diode has nil resistance when "on" so some of the waveshaping previous to the diode clipping seeps through, but how much of it really? The real influence of the opamp in a RAT is more in the slew rate (which will certainly show in the final signal) than in the opamp clipping itself.

Quote
slewrate
at the voltages were working with, the slew rate of the 308 only affects frequency's a guitar amp can't meaningfully reproduce. frequencies above 16kHz if the clipping diodes are discarded, and over 100kHz if they are taken in to consideration. that a wave is slewed doesn't mean we hear a difference. ive been experimenting with slew rate limiters a lot lately, and it starts to be noticeable in the top end around 0,1v/us. asymmetric slew rate also has a really cool sound to it!

what does affect the LM308's sound is the GBP, which limits the gain at higher frequencies, which in turn smooths out the sound.

if the signal put in to a so called soft clipper (non-inverting stage with diodes in the feedback loop) is significantly larger than the diode threshold, it will sound like crossover distortion, as if there's a nasty little buzz added to an otherwise clean sounding signal. i really dislike such configurations for most applications.

i wish there was a tiny 4pin IC with a single CMOS inverter on the market so we could have that as clipping amplifier to add to whatever circuit were designing. also, is CMOS distortion soft or hard clipping? or both? i'd argue hard clipping, just like tubes.

cheers
Title: Re: A pet peeve: soft vs hard clipping
Post by: fryingpan on July 21, 2022, 12:51:38 PM
Whether a "clean blend" can be called a clean blend is philosophical at that point. As is philosophical the idea that feedback distortion in a non-inverting amplifier is "soft" because when the diodes kick in, it turns into a buffer (basically). If the difference in gain between the two portions of the curve is significant, it doesn't make sense to talk about a clean signal at all¹ (or a soft knee).

Still, you could talk about a blend between a processed and an unprocessed version of the signal.

¹: and is it clean anyway? Most distortions include heavy filtering of the signal.
Title: Re: A pet peeve: soft vs hard clipping
Post by: iainpunk on July 21, 2022, 05:59:20 PM
Whether a "clean blend" can be called a clean blend is philosophical at that point.
yes, in the end, some people feel that it has a clean signal blended with distortion, that's based on the character, dynamics and feel.

on the technical side, this discussion is on semantics. i wouldn't even call cmos clipping real soft clipping, because it maxes out flat, like hard clipping, so if driven hard enough, it actually is hard clipping. for me, soft clipping suggests that there's another linear region after a nonlinear part, excluding crossover distortion of any kind.

my pet peeve is slew rate claims.
the slew rate of the LM308 is 2x to fast to make an audible difference. i have experimented with slew rate limiting circuits and came to the conclusion that around 0.15v/us the slew rate limiter started to impact the treble of a square waves on my particular sound system, that's for a full 0-8.7v square wave, if the level is limited by clipping diodes, around 0.02v/us. this corresponds with a ''first triangle frequency'' of about 7kHz.

cheers
Title: Re: A pet peeve: soft vs hard clipping
Post by: fryingpan on July 21, 2022, 06:20:36 PM
When I said "slew rate", I wasn't necessarily referring to the RAT. Conceivably, a pedal with a similar configuration using an opamp with a very low slew rate would impact the final sound through its slew rate. Whether that would be pleasing to hear is debatable, a low slew rate introduces a kind of lowpass filtering that is nonlinear and would generate its own distortion.
Title: Re: A pet peeve: soft vs hard clipping
Post by: Rob Strand on July 21, 2022, 06:38:38 PM
Quote
Whether a "clean blend" can be called a clean blend is philosophical at that point.
It should be science.   It blends, or it doesn't.
A straight forward question with a straight forward answer.

If it's not science it's BS and myth (or worse, opinions).  Audio is full of it.
Title: Re: A pet peeve: soft vs hard clipping
Post by: PRR on July 21, 2022, 09:42:21 PM
I learnt from this group that a resistor in series with clipping diodes is called a "compliance resistor"

"This group" can't be DIYstompBoxes?? We don't use such fancy-pants language.
Title: Re: A pet peeve: soft vs hard clipping
Post by: Rob Strand on July 21, 2022, 11:51:24 PM
Quote
"This group" can't be DIYstompBoxes?? We don't use such fancy-pants language.

https://www.elitedaily.com/life/why-do-we-reward-stupidity

"Real education and real brainpower are hard to build, which is why so many people simply avoid it"
Title: Re: A pet peeve: soft vs hard clipping
Post by: edvard on July 22, 2022, 02:12:50 AM

i wish there was a tiny 4pin IC with a single CMOS inverter on the market so we could have that as clipping amplifier to add to whatever circuit were designing. also, is CMOS distortion soft or hard clipping? or both? i'd argue hard clipping, just like tubes.

cheers

You can make one; take a BS170 (2N7000) and its compliment, a BS250, and wire them up like you see in the inverter data sheets.  Yes, it really does work.  CD4007 would be cheaper, and you only have 1 inverter to deal with and some MOSFETs to use as high-impedance buffers.  Win!

LTSpice says CMOS clipping is quite soft at low to moderate input signals (and so does my oscilloscope), but as you increase the input, the transition "knee" starts to get smaller and smaller until it is essentially hard clipping.  What I like about that is as a sustained note fades out, you don't get the weird buzzy 'threshold' noise as the amplitude crosses between clipped and not-clipped with a typical hard-clipping circuit; it simply fades out naturally.
Title: Re: A pet peeve: soft vs hard clipping
Post by: puretube on July 22, 2022, 02:44:52 AM
Iainpunk: type "single gate logic" into your google, and you`re in heaven ... :icon_wink:
Toshiba used to fabricate 18/20V types until their plant in the Phillipines were inundated
(I`m lucky to have bought a few thousand before ...), and after years of unavailabilty ROHM started to make a couple of 18V types, hich I haven`t tested yet, however.
You got to look for a "U" (=unbuffered) in the part-number.
It`s possible to use the lower voltage types (e.g. from TI) for some purposes, if you build low-current circuits with large resistors (100k to 1M) in the Vdd & Vss rails. (See Ray Marston in "Nuts&Volts", or application notes for CMOS logic).
Title: Re: A pet peeve: soft vs hard clipping
Post by: teemuk on July 22, 2022, 04:03:41 AM
Quote
... the idea that feedback distortion in a non-inverting amplifier is "soft" because when the diodes kick in, it turns into a buffer (basically).

There's nothing "turning it to a buffer". The circuit remains the same. The "clipping" of the circuit is "soft" because the loop gain drops from a usually very high figure to usually very low figure, approximately unity.

For example, instead of amplifying the peak signal portions (exceeding diode Vf) with gain of, say, 100x they are now simply amplified with gain of 1x.
This instantenous gain compression squashes the waveform and compresses its dynamics similarly to more abrupt clipping that actually often goes as far as compressing them so much that parts of the waveform seem like being clipped away. The milder compression factor of just "unity gain" naturally can't result to such a severe clipping (which is why I used the parenthesis earlier) so we have given it a somewhat misleading label of "soft clipping".

Quote
Still, you could talk about a blend between a processed and an unprocessed version of the signal.

Like "Wet" and "Dry", the usual terminology?

Quote
and is it clean anyway? Most distortions include heavy filtering of the signal.
But heavy filtering does not introduce harmonics that previously did not exist in the signal. If we blend a "filter" to dry signal path we have a mere tone control. If we add harmonics to clean signal by blending in a distorted signal we don't get clean AND distortion, we get only varying degrees of distortion.
Title: Re: A pet peeve: soft vs hard clipping
Post by: puretube on July 22, 2022, 04:32:32 AM

i wish there was a tiny 4pin IC with a single CMOS inverter on the market so we could have that as clipping amplifier to add to whatever circuit were designing. also, is CMOS distortion soft or hard clipping? or both? i'd argue hard clipping, just like tubes.

cheers

You can make one; take a BS170 (2N7000) and its compliment, a BS250, and wire them up like you see in the inverter data sheets.  Yes, it really does work.  CD4007 would be cheaper, and you only have 1 inverter to deal with and some MOSFETs to use as high-impedance buffers.  Win!

LTSpice says CMOS clipping is quite soft at low to moderate input signals (and so does my oscilloscope), but as you increase the input, the transition "knee" starts to get smaller and smaller until it is essentially hard clipping.  What I like about that is as a sustained note fades out, you don't get the weird buzzy 'threshold' noise as the amplitude crosses between clipped and not-clipped with a typical hard-clipping circuit; it simply fades out naturally.

Discreet MOS-inverter done here: https://www.diystompboxes.com/smfforum/index.php?topic=59383.0
Title: Re: A pet peeve: soft vs hard clipping
Post by: edvard on July 22, 2022, 10:03:19 PM
Discreet MOS-inverter done here: https://www.diystompboxes.com/smfforum/index.php?topic=59383.0

I KNEW I'd seen a discussion of it somewhere, but didn't find your thread in all my searches, thank you.  It was the exact one that taught me what I was describing. 
I wonder what it would sound like using some higher-power MOSFETs like IRF640 and IRF9640 and running it from something like a 35v power supply.  ???
Title: Re: A pet peeve: soft vs hard clipping
Post by: puretube on July 23, 2022, 02:47:36 AM
Never tried it. - Do it!
I only experimented the other low-current ("starving") way: Rs & Rd up to 4M7 ...
Title: Re: A pet peeve: soft vs hard clipping
Post by: ElectricDruid on July 23, 2022, 07:21:58 AM
If we add harmonics to clean signal by blending in a distorted signal we don't get clean AND distortion, we get only varying degrees of distortion.

Seems to me that this is where the philosophical disagreement lies. Many people would say that if you add harmonics to a clean signal by blending in a distorted signal, you *absolutely* get clean and distortion. That's why it's a blend, right?

That said, I can also see your point of view, Teemuk - a signal with a big load of distortion is a distorted signal, irrespective of whether there's a x1 clean copy of the signal under there somewhere. That's also true.
Title: Re: A pet peeve: soft vs hard clipping
Post by: Mark Hammer on July 23, 2022, 10:09:43 AM
The old Maestro FZ-1S was probably the first, and for a while only, fuzz to allow blending of fuzz and clean signal.  I used to have one, until I loaned it to a guy who never returned it.  The dry/clean signal was quite audible, and setting the blend just right put this "other" sound in the background. 

Teemuk is, in many respects, theoretically correct that  such wet+dry mixes really produce a sound with varying added harmonic components.  On a scope, that would be most certainly true.  What happens in the human brain, however, can be different.  Keep in mind that sustained/prolonged clipping, produced when the diode Vf is exceeded for longer than the initial transient attack, independent of where the diodes are situated, yields a result that is different enough in its amplitude envelope, and duration of added harmonic content, that we differentiate it perceptually.

All we ever hear is fundamentals and a bunch of harmonic content.  It's up to us to assign the harmonic content to a particular source, and part of how we do that is, or may be, via the temporal and amplitude parameters of the harmonic content.  As ever, I direct people to read up on "auditory scene analysis" ( https://en.wikipedia.org/wiki/Auditory_scene_analysis ), that I was blessed to learn about by having the theorist himself, Al Bregman, as one of my profs.

My point is that we hear the wet and dry as two different sound sources, which is what allows blend controls to work as they do.  If, for instance, some serious compression was applied to the signal, prior to entering something like the Sparkle Drive, perhaps it would be harder for us to hear it as two "different" sounds being blended, and hear it more in the manner Teemuk asserts, because we wouldn't have any dynamic or envelope aspects to use in differentiating things.
Title: Re: A pet peeve: soft vs hard clipping
Post by: iainpunk on August 04, 2022, 09:06:58 AM

i wish there was a tiny 4pin IC with a single CMOS inverter on the market so we could have that as clipping amplifier to add to whatever circuit were designing. also, is CMOS distortion soft or hard clipping? or both? i'd argue hard clipping, just like tubes.

cheers

You can make one; take a BS170 (2N7000) and its compliment, a BS250, and wire them up like you see in the inverter data sheets.  Yes, it really does work.  CD4007 would be cheaper, and you only have 1 inverter to deal with and some MOSFETs to use as high-impedance buffers.  Win!

LTSpice says CMOS clipping is quite soft at low to moderate input signals (and so does my oscilloscope), but as you increase the input, the transition "knee" starts to get smaller and smaller until it is essentially hard clipping.  What I like about that is as a sustained note fades out, you don't get the weird buzzy 'threshold' noise as the amplitude crosses between clipped and not-clipped with a typical hard-clipping circuit; it simply fades out naturally.
ill go out and buy some appropriate MOSFETs to try this out, but im afraid that the symmetry and bias are all out of whack if you do this, compared to a CMOS inverter that biasses to almost exactly VCC/2.

here's a graph for the transfer curve of a CMOS inverter used in the power stage of the CA3160/CA3130 opamps. (i keep posting this image all over)
(https://i.postimg.cc/SJ8qtQMZ/output-characteristic.jpg) (https://postimg.cc/SJ8qtQMZ)
its a really good sounding descent in to hard clipping, and it feels kinda ''spungy'' in my xenos overdrive, especially with the gain set high.

cheers
Title: Re: A pet peeve: soft vs hard clipping
Post by: puretube on August 04, 2022, 09:27:48 AM

i wish there was a tiny 4pin IC with a single CMOS inverter on the market so we could have that as clipping amplifier to add to whatever circuit were designing. also, is CMOS distortion soft or hard clipping? or both? i'd argue hard clipping, just like tubes.

cheers

You can make one; take a BS170 (2N7000) and its compliment, a BS250, and wire them up like you see in the inverter data sheets.  Yes, it really does work.  CD4007 would be cheaper, and you only have 1 inverter to deal with and some MOSFETs to use as high-impedance buffers.  Win!

LTSpice says CMOS clipping is quite soft at low to moderate input signals (and so does my oscilloscope), but as you increase the input, the transition "knee" starts to get smaller and smaller until it is essentially hard clipping.  What I like about that is as a sustained note fades out, you don't get the weird buzzy 'threshold' noise as the amplitude crosses between clipped and not-clipped with a typical hard-clipping circuit; it simply fades out naturally.
ill go out and buy some appropriate MOSFETs to try this out, but im afraid that the symmetry and bias are all out of whack if you do this, compared to a CMOS inverter that biasses to almost exactly VCC/2.

here's a graph for the transfer curve of a CMOS inverter used in the power stage of the CA3160/CA3130 opamps. (i keep posting this image all over)
(https://i.postimg.cc/SJ8qtQMZ/output-characteristic.jpg) (https://postimg.cc/SJ8qtQMZ)
its a really good sounding descent in to hard clipping, and it feels kinda ''spungy'' in my xenos overdrive, especially with the gain set high.

cheers

Check out replies #27 https://www.diystompboxes.com/smfforum/index.php?topic=129390.msg1250441#msg1250441 (https://www.diystompboxes.com/smfforum/index.php?topic=129390.msg1250441#msg1250441)
 & #29 https://www.diystompboxes.com/smfforum/index.php?topic=129390.msg1250445#msg1250445 (https://www.diystompboxes.com/smfforum/index.php?topic=129390.msg1250445#msg1250445)
Title: Re: A pet peeve: soft vs hard clipping
Post by: Rob Strand on August 04, 2022, 07:01:47 PM
Quote
ill go out and buy some appropriate MOSFETs to try this out, but im afraid that the symmetry and bias are all out of whack if you do this, compared to a CMOS inverter that biasses to almost exactly VCC/2.

here's a graph for the transfer curve of a CMOS inverter used in the power stage of the CA3160/CA3130 opamps. (i keep posting this image all over)
The CA3160/CA3130 never sounds bad.

Quote
ill go out and buy some appropriate MOSFETs to try this out, but im afraid that the symmetry and bias are all out of whack if you do this, compared to a CMOS inverter that biasses to almost exactly VCC/2.
Most of the common MOSFETs have quite high transconductance.  The CD4007's tend to have quite low transconductance but you might be able to stack a few.    It's a while since I've used CD4007's as amplifiers.
Title: Re: A pet peeve: soft vs hard clipping
Post by: swamphorn on August 04, 2022, 11:50:55 PM
i wish there was a tiny 4pin IC with a single CMOS inverter on the market so we could have that as clipping amplifier to add to whatever circuit were designing.

Texas Instruments sells the grain-of-rice SN74LVC2GU04 dual unbuffered inverter, but I had trouble applying it as a linear amplifier: the devices were too cold-biased to pass a signal without producing severe crossover. I defeatedly replaced the chip with an adapter board that substitutes a CD4049UBE into the circuit.

In retrospect I have two theories as to what went wrong:

I would like to see more people take a crack at using this chip; at best, it's two free gain stages, multiple-feedback filters, soft clippers, signal summers, etc. in a six-pin SOT-23 package; at worst it's just enough for a toggle switch.
Title: Re: A pet peeve: soft vs hard clipping
Post by: Rob Strand on August 05, 2022, 12:30:05 AM
It's worth scraping through this datasheet, (IIRC CA3600 is same or similar to CD4007)
https://datasheetspdf.com/pdf-file/534819/ETC/CA3600/1



Check out Figure 24. has similarities and difference to CA3130.
Title: Re: A pet peeve: soft vs hard clipping
Post by: puretube on August 05, 2022, 06:59:44 AM
i wish there was a tiny 4pin IC with a single CMOS inverter on the market so we could have that as clipping amplifier to add to whatever circuit were designing.

Texas Instruments sells the grain-of-rice SN74LVC2GU04 dual unbuffered inverter, but I had trouble applying it as a linear amplifier: the devices were too cold-biased to pass a signal without producing severe crossover. I defeatedly replaced the chip with an adapter board that substitutes a CD4049UBE into the circuit.

In retrospect I have two theories as to what went wrong:
  • The 5 V supply voltage, as supplied by a capacitance multiplier, was too high for linear amplification. Lowering the voltage should have increased the quiescent current. In the future I should try a lower-voltage zener or LED.
  • TI's device is simply unsuitable as a linear device; while Nexperia's datasheet for the equivalent part lists "linear amplifier" as an application (along with the linear parameters for the device!) the Texas Instruments part documentation does not mention linear applications in the least. That particular chip could be simply unsuitable for the purpose.

I would like to see more people take a crack at using this chip; at best, it's two free gain stages, multiple-feedback filters, soft clippers, signal summers, etc. in a six-pin SOT-23 package; at worst it's just enough for a toggle switch.

Done!
I tried a lot of single gate CMOS-Inverters over 10 years ago.
This is what I noted on the datasheets of the ones I tested*:
Fairchild - NC7SZU04 : "not usable"
Texas Instr. - SN74LVC1GU04 : "not usable"
Texas Instr. - SN74AHC1GU04 : "not good"
ON Semi - MC74VHC1GU04 : "inconsistent tolerances" **
**(= variations of output-voltage Vcc/2 from device-to-device)
ST - 74V1GU04 : "similar to ON"
Fairchild - NC7SU04 : "better tolerances than ON"
Toshiba - TC7SHU04F : "good"

*tested were the SMD chips that had a pin-pitch of 0.95mm coz I had adapters for them.
The ones that come in tiny 0,65 mm pitch were not tested yet, but these look promising:
NXP - 74AHC1GU04 and especially: NXP - 74HC1GU04
https://www.mouser.de/datasheet/2/916/74HC1GU04-1541805.pdf (https://www.mouser.de/datasheet/2/916/74HC1GU04-1541805.pdf)

And: don`t worry about the max. 6V Vcc powersupplyvoltage:
just use a resistor (1k - 100k) from the + pin to your 9V (or higher) supply;
(and maybe a second symmetric R from the - pin to ground for symmetry);
the voltage at the + pin will be reduced, but the output (and input) will
sit at half the voltage of what the + pin sees.

This will reduce the max. output-voltage, but who cares?
The "clipping"-performance stays the same, just at a little reduced scale.

The optimum ideal single CMOS-Inverter that truly is or represents a CD4049UB/6 or 4069U/6
will be subject of a post (soon) in the Members Only part of the forum,
but unfortunately that chip is obsolete ...
(and its currently available possible replacement part has not been tested by me yet ...).
Title: Re: A pet peeve: soft vs hard clipping
Post by: Mark Hammer on August 05, 2022, 07:45:44 AM
This is why I've missed you here, and welcome you back, Ton.  :icon_biggrin: