Soft and hard clipping together?

Started by PBE6, March 24, 2014, 04:45:42 PM

Previous topic - Next topic

PBE6

Has anyone tried soft clipping followed by hard clipping to ground?

From some previous tinkering I've learned that for a 1 V amplitude sine wave, soft clipping with silicon diodes will cap the voltage at 1.6 V (1 + 0.6 = 1.6) with some clean character to the sound, while hard clipping with silicon will cap the voltage at 0.6 V with virtually no clean character to it and a compressed sound.

I was just thinking that proper selection of diodes in each stage might give you the best of both worlds. For instance, silicon in the soft clipping loop giving you a 1.6 V signal followed by red LEDs clipping to ground chopping it back down to 1.4 V. More input/higher gain settings would move you from a Tubescreamer sound to a RATT/Dist+ compressed sound.

Is this a standard option? Or a standard fail, and hence never used? Either way I will breadboard it tonight and see what happens.

pappasmurfsharem

I would think you would end up clipping whatever you "gained" in the feedback loop would you not? Ergo defeating the purpose?

Now what about 1 silicon in the feedback loop and one to ground?
"I want to build a delay, but I don't have the time."

R.G.

As psh mentioned, hard clipping tends to "cover up" whatever was gained by soft clipping. In fact, by clipping off everything above some threshold, all signal over the hard clipping threshold is lost. Soft clipping is "soft" because the signal above the start of clipping is more or less squashed down, but still there in a way.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

electrosonic

  • SUPPORTER

Quackzed

quite a few dod pedals do this, classic tube for one.
QuoteInsert Quote
I would think you would end up clipping whatever you "gained" in the feedback loop would you not? Ergo defeating the purpose?
but would there be any difference in slamming your hard clippers with an unclipped signal and hitting them with a soft clipped signal.
if the hard clipped threshold was just just below the soft clipping, enough so to completely cut it off, lose it. wouldn't there be some difference in how quickly the hard clippers go from not conducting to full conducting/flatline clipping? my thinking is that it would make the transition from not conducting to full conducting... well, softer.  :( o.k. heres where i find out i'm wrong  :icon_lol:, but better, find out why!  :icon_cool:
nothing says forever like a solid block of liquid nails!!!

MaxPower

I remember a project (Wedgie Box? Widgy Box? Wiggy Box? Widgey Box?) in an electronics mag that had hard and soft clipping.There was something in it about how hard and soft clipping interacted when used together.

Okay, I found it. It's called the Widgy Box and was in the June 2006 issue of EPE (Everyday Practical Electronics). Ah never mind, it's hard clipping followed by soft clipping.
What lies behind us and what lies before us are tiny matters, compared to what lies within us - Emerson

aron


ashcat_lt

Quote from: Quackzed on March 24, 2014, 08:28:48 PM
quite a few dod pedals do this, classic tube for one.
QuoteInsert Quote
I would think you would end up clipping whatever you "gained" in the feedback loop would you not? Ergo defeating the purpose?
but would there be any difference in slamming your hard clippers with an unclipped signal and hitting them with a soft clipped signal.
if the hard clipped threshold was just just below the soft clipping, enough so to completely cut it off, lose it. wouldn't there be some difference in how quickly the hard clippers go from not conducting to full conducting/flatline clipping? my thinking is that it would make the transition from not conducting to full conducting... well, softer.  :( o.k. heres where i find out i'm wrong  :icon_lol:, but better, find out why!  :icon_cool:

I think this is part of the ticket.  I've heard RG himself talk a number of times about the idea of keeping as much of the signal as possible "in the knee" of the diode conduction, and I think that the TS-style soft clipping arrangement helps with that.  It gives us a more predictable signal going into the to-ground clipper.  It would take some careful tweaking of gain and selection of diodes, but it might turn out interesting.  When you talk "hard clipping" I think a lot time we think about the Rat, which tries to slam a couple thousand volts through between the two diodes, and ends up passing that knee pretty quickly, but if you don't go that far...

And yes, you could also carefully select diodes and set gains in such a way to have a fairly smooth transition from "Tube Screamer" to "Rat" style sounds.  Getting the actual controls to work within a useful range could be interesting.

YouAre

Quote from: aron on March 25, 2014, 04:07:01 AM
Let's not forget this awesome site and the GM arts pedal.

http://www.gmarts.org/index.php?go=217

Why does he list the MXR Dist+ and the Marshall Drivemaster as soft clipping devices? it seems like he's using the type of diode (LED/Germanium) to qualify a design as soft vs. hard clipping, rather than the arrangement.

Or am I completely wrong...

PBE6

Quote from: electrosonic on March 24, 2014, 07:55:31 PM
Isn't that the idea behind the Plimsoul?

Schematic here - http://www.maketune.net/files/attach/images/7464/144/584/004/e9825b691169078cabef794982c43a14.PNG

Very interesting! I will have to check this out.

Last night I breadboarded a simple non-inverting gain stage with Si diodes followed by red LEDs clipping to ground. One twist is that I put a 10k in series with the Si diodes to try and tune the soft clipping response. The test signal on the scope did indeed show a transition from soft clipping to hard clipping which was tunable with the 10k pot, but in practice the sound wasn't as varied. I will continue with some experiments later this week, maybe even try building the Plimsoul to see what it's all about.

PBE6

Quote from: YouAre on March 25, 2014, 12:03:00 PM
Quote from: aron on March 25, 2014, 04:07:01 AM
Let's not forget this awesome site and the GM arts pedal.

http://www.gmarts.org/index.php?go=217

Why does he list the MXR Dist+ and the Marshall Drivemaster as soft clipping devices? it seems like he's using the type of diode (LED/Germanium) to qualify a design as soft vs. hard clipping, rather than the arrangement.

Or am I completely wrong...

I was a bit confused by that as well. The capacitors will round off the edges, but I thought that diodes to ground would be considered "hard clipping" regardless of the final shape.

teemuk

#11
No, it's pretty much about the final shape...

With that in mind, the usually widely different diode currents in feedback loop vs. shunt clipping -schemes result into diode operating at rounder or harder "knees", respectively. However, it really has more to do with diode currents than the actual clipping scheme, like you noticed in practice: control diode current and you can control hardness vs. softness of clipping.

And I agree; the audible difference between hard and soft clipping is in practice almost negligible. I don't know why people focus so much on it. That, of course, in my subjective opininon.

YouAre

Quote from: teemuk on March 25, 2014, 04:52:09 PM
No, it's pretty much about the final shape...

With that in mind, the usually widely different diode currents in feedback loop vs. shunt clipping -schemes result into diode operating at rounder or harder "knees", respectively. However, it really has more to do with diode currents than the actual clipping scheme, like you noticed in practice: control diode current and you can control hardness vs. softness of clipping.

And I agree; the audible difference between hard and soft clipping is in practice almost negligible. I don't know why people focus so much on it. That, of course, in my subjective opininon.

There's something about this that I don't like about this....

Clippers in the feedback loop affects the gain of the amplifier (what most of us think as "soft" clipping). Once the output signal of amplifier exceeds the forward voltage of the diode, amplifier gain drops from X to unity. This is only affecting the GAIN of the amplifier. So theoretically if you feed the amplifier with an already large signal (larger than the forward voltage of the diode), the gain still drops to unity, putting out a large signal. There is no hard limit. Please correct me if I'm wrong.

Clippers to ground will take any size signal ( "hard") , and clamp them to be fixed at the forward voltage. Using ln914's for example, no matter what signal you hit them with, you're only getting ~.7 volts out. This is a hard limit.



ashcat_lt

Quote from: YouAre on March 25, 2014, 05:11:23 PM
There's something about this that I don't like about this....

Clippers in the feedback loop affects the gain of the amplifier (what most of us think as "soft" clipping). Once the output signal of amplifier exceeds the forward voltage of the diode, amplifier gain drops from X to unity. This is only affecting the GAIN of the amplifier. So theoretically if you feed the amplifier with an already large signal (larger than the forward voltage of the diode), the gain still drops to unity, putting out a large signal. There is no hard limit. Please correct me if I'm wrong.

Clippers to ground will take any size signal ( "hard") , and clamp them to be fixed at the forward voltage. Using ln914's for example, no matter what signal you hit them with, you're only getting ~.7 volts out. This is a hard limit.
I agree with this in general.  There are a number of noticeable practical differences between the two arrangements.  Feedback diodes create a sort of crossover distortion which is significantly different from the "hard limit" of diodes to ground (or opamp clipping, etc).

It's worth noting, though, that the diodes themselves don't really cause the limiting, it's actually the limit of the opamp feeding the diodes.  With an ideal voltage source the "output" of the diode clipper will continue to rise until they or something else along the way explodes from passing too much current.  A completely academic point since real world components do run into real hard limits, but a diode is not a switch, and no part of its conduction curve is either linear or zero slope.

PRR

> the gain still drops to unity.... There is no hard limit.

"Hard" is relative.

Some of these things have gain of 100. When gain drops from 100 down to 1, that's pretty hard.

Most of these things also have variable gain. If you turn-down to gain of 3, then the drop to gain of 1 is "not hard".

As I see it.
  • SUPPORTER

teemuk

#15
QuoteOnce the output signal of amplifier exceeds the forward voltage of the diode, amplifier gain drops from X to unity.

This depends entirely on stage's architecture. If the gain stage is non-inverting, diode decreasing its internal impedance close to zero ohms indeed converts the stage to voltage follower with about unity gain. However, if the gain stage is inverting, diode decreasing its internal impedance simply keeps decreasing gain while the diodes shunt to virtual ground at inverting input. Gain is not unity in such case, if it was the clipping could not even work.

QuotePlease correct me if I'm wrong.

You have been corrected.

QuoteClippers to ground will take any size signal ( "hard") , and clamp them to be fixed at the forward voltage.

And this is really no different from diodes in the feedback loop of an inverting amplifier. The only thing different is the magnitude of current flow through the diodes: with diodes in feedback loop the clipping of the stage itself limits current flow through diodes, with shunt clipping diodes you have the full output swing from the gain stage hitting the diodes which results in much higher current flow when diodes are forward biased. Because the diode currents in these two schemes tend to be on very different magnitudes there's a drastic effect on softness or hardness of crossover from full reverse bias to full forward bias. Look it up in diode datasheet. You can easily replicate that effect by limiting the current that flows through those ordinary shunt diodes. For example, there's a big difference whether series resistance between opamp's output and the shunt diode circuit is 100R or if it is 10K. The diode current is what in practice defines the softness or hardness of the clipping, not so much the stage architecture. With right circuit design you can get hard or soft clipping with both methods.

And yes, it is also very much relative: If your maximum signal voltage swing is about 600 millivolts then at waveform peaks the operation is pretty much at the "knee" of the diode's transfer curve and never "above". The clipping will be soft because the "knee" is about 1/5th of the signal swing. If your signal swings close 10 volts then you likely get almost a square wave out and the little "knees" at waveform edges have relatively much lesser effect on overall waveform because the ~100mV "knee" region is only very little percentage of the entire signal.

Also, if you examine clipping just on waveform perspective then you can filter a hard clipped signal heavily and the wave will look rounder at lower frequencies. Don't fall for this trap. At higher frequencies, where filters have less effect, it would again look like normal hard clipping. In essence, filtering does not really alter softness vs. hardness of clipping. It just removes harmonics, which happens to change the shape of the signal. Same thing with other filters, like for example a generic mid-range notch: pass a signal through such filter and a hard clipped square wave will transform so much that you don't even recognise that it was once a hard clipped square wave.

YouAre

Quote from: PRR on March 26, 2014, 12:11:54 AM

"Hard" is relative.

Some of these things have gain of 100. When gain drops from 100 down to 1, that's pretty hard.

Most of these things also have variable gain. If you turn-down to gain of 3, then the drop to gain of 1 is "not hard".

As I see it.

True, I guess I'm being pedantic with my semantics. But let's look at 2 cases.

Case 1: Input signal is small, going into non-inverting opamp with feedback clippers. Then what you described applies. With enough gain, we'll get a square wave as we amplify the hell out of the signal and watch the output get squashed.

Case 2: Input signal is big. A portion of the cycle is amplified until we hit that diode forward voltage, and our gain stage becomes a unity gain buffer. But the input signal is still rising, because we a have a big signal. So what happens? I assume the signal keeps rising and then falling as it would in a buffer until we go negative and the process repeats, right? So the output is not getting compressed anymore. This is all assuming that we're not smacking the rails of the op-amp of course.

Same stage, but different input signal levels will yield different output levels.


Now with shunt clippers (just diodes to ground, nothing else), no matter what the input signal size is, we're going to get a maximum output voltage of the diode's forward voltage. This is what I mean by "hard" limit. With the other case I described above, we get compression only up until a certain point.




Quote from: teemuk on March 26, 2014, 10:06:05 AM

This depends entirely on stage's architecture.

My apologies, you're right. I was referring specifically to non-inverting configurations ala the Tubescreamer.

Quote
Gain is not unity in such case, if it was the clipping could not even work.

Please clarify.

Regarding the rest of your response (thank you for taking the time to address this, by the way), I'm assuming that we're not altering the shunt clipping with resistors (ala Jack Orman's warp control) or filtering it in anyway. Yes, this will soften the effects of "hard" clipping the waveform, but I'm analyzing the base cases described above.

What I'm getting at in "soft" vs "hard" is the nature of the attenuation. Yes, diodes in a non-inverting feedback loop can sound like a squarewave, while shunt diodes to ground can barely clip the signal.

I'm thinking that a workable definition (one that I've been using personally at least) is that "Soft" clipping affects the gain of a stage, while "hard" clipping effects output level. Does this make sense?








ashcat_lt

Quote from: YouAre on March 26, 2014, 12:26:34 PM
My apologies, you're right. I was referring specifically to non-inverting configurations ala the Tubescreamer.
Quote
Yep, and so was everybody else except teemuk.  I personally can't think of any popular designs that have diodes in the feedback path of an inverting opamp stage.

PBE6

Did some more experiments last night. First I checked the voltages coming from my guitar, and was surprised to see that my EMGs were putting out a maximum of about 400 mV from the neck single coil but up to 2 V (!!) from the bridge humbucker. I think these values were limiting the usefulness of my previous arrangement because the voltage was going to be in one range or the other all the time, hence no real change when moving the pots.

Second, I ended up using pairs of Si diodes in series with a 10k pot for both the feedback loop and the shunt to ground. This allowed me to adjust the clipping threshold for each pair.

This time I did notice a few differences when playing around with the 10k pots and the gain pot. With gain up to 100x and beyond, adjusting the feedback pot did virtually nothing whereas adjusting the shunt pot increased the volume while reducing the amount of compression. This was as expected, as one of the effects of the series resistance pot is that it raises the effective voltage drop of the diode pair (i.e. it can make a Si pair behave more like an LED pair in terms of voltage, but with continuous variability). At high gain, even an LED in the feedback loop would be maxed out.

At lower gain settings, the effects were more noticeable although still fairly modest. With the shunt pot dialed up, the feedback pot became a volume control although this time I did hear a difference in the quality of the distortion, it reminded me of a low-speed chainsaw without all the fuzzy buzz. I've heard this before when using both Ge diodes and LEDs as clippers, and as cool as the description sounds I'm not really a fan of it. Interesting though how series resistance with the diodes can change the character of the sound. It probably has to do with the amount of current and subsequent "knee-region" being used as mentioned above by R.G. and others, and Mark Hammer in an old thread, and less to do with the diode material.

One thing I did not get was the smooth transition from stinging overdrive to over-the-top distortion without twisting any knobs like I was hoping for, although in retrospect that was a stupid expectation as the single notes will always be quieter than the chords. I did however find a few settings that made the transition fairly well when moving from the neck to the bridge.

Let the experiments continue!

PBE6

One note about feedback clipping, it doesn't seem like the diodes ever turn the opamp into a unity gain buffer - if it did, the output would never exceed the input. Going back to the basic opamp equation:

Vout = G(Vnon - Vinv)

Let's assume that the output exceeds the diode clipping threshold "D", and use a simple model of the diode as a switch with a constant forward voltage drop, also D. Then the inverting input will be held at the output voltage minus the voltage drop:

Vinv = Vout - D

Putting the equations together:

Vout = G(Vnon - Vout + D)

(1+G)Vout = G(Vnon + D)

Vout = (G/(1+G))(Vnon + D) ~= Vnon + D

(*this approximation is valid since the open loop gain G is so high, somewhere around 100,000)

This sum seems to be in line with what I've measured for Tubescreamer style gain stages (1.6 V output with a 1 V input), and also with this analysis that asserts the output is a mix of clean and clipped signal (http://www.bteaudio.com/articles/TSS/TSS.html).

The voltage gain is:

A = Vout/Vin = (Vnon + D)/Vnon

Which means there is always some gain being applied even when the diodes are fully conducting, even though it's not a simple multiple of the input.