A pet peeve: soft vs hard clipping

Started by fryingpan, July 19, 2022, 04:15:55 PM

Previous topic - Next topic

fryingpan

#20
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.

iainpunk

Quote from: fryingpan on July 21, 2022, 12:51:38 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
friendly reminder: all holes are positive and have negative weight, despite not being there.

cheers

fryingpan

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.

Rob Strand

#23
QuoteWhether 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.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

PRR

Quote from: 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"

"This group" can't be DIYstompBoxes?? We don't use such fancy-pants language.
  • SUPPORTER

Rob Strand

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"
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

edvard

Quote from: iainpunk on July 21, 2022, 11:57:15 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.
All children left unattended will be given a mocha and a puppy

puretube

#27
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).

teemuk

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".

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

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

Quoteand 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.

puretube

Quote from: edvard on July 22, 2022, 02:12:50 AM
Quote from: iainpunk on July 21, 2022, 11:57:15 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

edvard

#30
Quote from: puretube on July 22, 2022, 04:32:32 AM
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.  ???
All children left unattended will be given a mocha and a puppy

puretube

Never tried it. - Do it!
I only experimented the other low-current ("starving") way: Rs & Rd up to 4M7 ...

ElectricDruid

Quote from: teemuk on July 22, 2022, 04:03:41 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.

Mark Hammer

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.

iainpunk

Quote from: edvard on July 22, 2022, 02:12:50 AM
Quote from: iainpunk on July 21, 2022, 11:57:15 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)

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
friendly reminder: all holes are positive and have negative weight, despite not being there.

cheers

puretube

Quote from: iainpunk on August 04, 2022, 09:06:58 AM
Quote from: edvard on July 22, 2022, 02:12:50 AM
Quote from: iainpunk on July 21, 2022, 11:57:15 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)

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
& #29 https://www.diystompboxes.com/smfforum/index.php?topic=129390.msg1250445#msg1250445

Rob Strand

Quoteill 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.

Quoteill 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.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

swamphorn

Quote from: iainpunk on July 21, 2022, 11:57:15 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.

Rob Strand

#38
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.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

puretube

Quote from: swamphorn on August 04, 2022, 11:50:55 PM
Quote from: iainpunk on July 21, 2022, 11:57:15 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

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 ...).