Is the cap in an overdrive feedback loop a pre- or post-clipping low pass filter

Started by wayfaerer, February 22, 2022, 10:26:28 PM

Previous topic - Next topic

wayfaerer

Hello! In overdrive circuits such as the Tube Screamer, with a non-inverting opamp with (sometimes variable) resistance, a capacitor, and clipping diodes in the feedback loop, the capacitor and resistance form a low pass filter. Is this low pass filter pre-clipping or post-clipping?

In other words, would you say the high frequencies aren't being clipped as much (attenuated before clipping), or that the high harmonics that result from clipping aren't amplified as much (attenuated after clipping)?

idy

In the TS:
So there's diodes, tiny cap and gain control, all in parallel in the feedback loop, and there's a cap and R in series attached to the - input.
The little (51p) cap does bring down gain for high frequencies. (And more so when the gain is up.) You're right that it seems to "smooth the corners: of the clipped signal.

The R and C to ground let highs get to ground, (not bass), and this is at the - input. The less signal at that input the more gain you get, it inverts the response of the filter. So the highs get more gain than the lows. This means gain goes down below "720hz." Very gently slope, "about" 1/2 the volume three octaves below... so 80hz. (1/2 the volts per octave, it takes 1/10th the volts to "sound" like "half" the volume. Very approximate I am being.)

This is reducing the clipping of these frequencies. If you want to attenuate harmonics from clipping you use the tone control (next opamp stage.)

I think. Others may know better.
Everyone reads:http://www.geofex.com/article_folders/tstech/tsxtech.htm

wayfaerer

Thanks. I'm preeeettty sure I agree. The wording can be confusing. I was looking at the Electrosmash article on the Tube Screamer. Both that and the link you provided mention that the capacitor softens the corners of the clipped waveform, which implies—at least to me—that the filter is post-clipping. But they also mention that it reduces drive at upper frequencies, which implies pre-clipping.

In an OD circuit I'm working on, I'm interested in having a tone switch rather than a pot and I'm trying to figure out if I can get away with just switching out that feedback capacitor with a smaller or bigger one. Should work, but I want it to be post-clipping and not pre-clipping, which is why I ask.

GFR

I'd say neither one or the other, much to the contrary :)

Since it's a nonlinear circuit, it can be tricky to split it into a series of smaller blocks, because everything interacts to some degree.

Can you replace the cap by a pre-eq and get the exact same effect(s)? Can you replace the cap by a post-eq and get the exact same effect(s)?
Can you replace the cap by a pre-eq and a post-eq and get the exact same effect(s)?

You can think of pre and post eq as approximations to help understanding the circuit, but it won't be *exact*.

antonis

Quote from: wayfaerer on February 22, 2022, 10:26:28 PM
Is this low pass filter pre-clipping or post-clipping?

None.. :icon_wink:

Or better, simultaneously clipping..

More seriously, LPF doesn't care about clipping or not..
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

iainpunk

the tiny cap basically has 2 cutoff frequency's, one before clipping and one after. the one before is determined by the gain setting, the cutoff frequency is determined by the dynamic impedance of the clipping diodes.
the dynamic impedance (resistance) will change with current, but in a stomp box, that impedance lies somewhere in the low 100s of ohms.
with the normal capacitor values we see its all really high up in the frequency spectrum, so i'd say its pre-clipping filtering as far as guitar speakers are concerned.

cheers
friendly reminder: all holes are positive and have negative weight, despite not being there.

cheers

ElectricDruid

What GFR and Antonis said. It's not "before" or "after". It's *in* the stage where the clipping is happening, so it's mixed up right in the middle of it.

It's providing a frequency-dependent gain in the clipping stage. Since the stage is generating harmonics and not acting linearly, this isn't a standard filtering action of any type.

Vivek

Love this question !

This question has some Zen Buddhism kind of concepts behind it

Am I a man dreaming that I am a butterfly, or a butterfly dreaming that I am a man ?

or maybe Schrodinger's cap with a dose of uncertainty principle ?


Key to answer it is by answering this :

Is it possible to exactly recreate the total effects of a cap in feedback loop in parallel to diodes

with

A filter -> distortion stage with diodes in feedback loop but no cap -> a filter





wayfaerer

Hmmm... it's clear that in terms of the circuit layout, spatially the filter is neither before nor after the clipping, but during. But what about sonically, practically?

Back in the day, when I used to play heavy metal, I would boost the treble before the amp in order to make palm muting crisp and articulate, then turn the treble down at the amp to tame the harshness. So from the standpoint of "I heard that adjusting the EQ before clipping changes the character of the distortion, while EQ after changes the already distorted sound," where does filtering *during* the clipping fit in?

First off, for simplicity, let's ignore the variable resistance (gain pot) in the feedback loop and assume a fixed resistor, since varying the resistance will change the cutoff of the filter, which adds to the complexity of the question. In the OD circuit I'm working on, the gain pot is just a passive resistor divider (like a volume pot) right before the clipping / gain stage, which has a fixed resistor to set the gain. Therefore the cutoff of the low pass filter is fixed (unless the cap is switched out with another, as I noted above... but ignore that for now), regardless of the gain.

Here's my intuition for two scenarios (note the cutoff is the same for both, but the gain is different):

(1) Feedback resistor 100k, shunt resistor 10k, capacitor 1n results in 11x gain, 1592 Hz cutoff
(2) Feedback resistor 100k, shunt resistor 100k, capacitor 1n results in 2x gain, 1592 Hz cutoff

My understanding is that the low pass filter in both scenarios will prevent the opamp from amplifying high frequencies. Therefore with the higher gain of scenario 1, there will be more clipping, and there *would* be more harsh high frequencies, except they wouldn't be amplified to anywhere near the same extent as the lower frequencies. The net effect would be that the low pass filter would have more of a post-clipping sound (than scenario 2, at least). With the lower gain of scenario 2, there will be less clipping and therefore there *should* be fewer harsh high frequencies, but the lower frequencies aren't being amplified all that much either. The net effect would be that the filter has more of a pre-clipping sound (than scenario 1, at least).

Does that sound right?

Fancy Lime

Quote from: wayfaerer on February 22, 2022, 10:26:28 PM
...Is this low pass filter pre-clipping or post-clipping?
...
Yes.

Here is some more Zen:

There is no Before or After.
Live in The Moment.
Free yourself of thinking in the frequency domain.
Start thinking in the time domain.
What voltage do you see at all important junctions in the circuit at any given moment?
Components only control how current relates to voltage over time.
There is no frequency.
There is no Before or After.

Or for those of us who aren't on bath salts: I have asked myself the same question as the OP until I got away from the useful but limiting "signal path" and frequency domain view and started to look at what voltage and current do in time domain. Then the cap is just something that stores a little charge and the parallel diodes are just something that connects current to voltage via an exponential function. But everyone is wired differently and I suspect that the explanations by GFR, Antonis, and Tom might be easier to grasp for most people. And they are correct, too. I always find it fascinating that you can analyse a circuit in several completely different ways, depending on inclination and purpose, that are like looking at the same thing but in another set of dimensions. The thing does not change but the observations may.

Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

Elektrojänis

Even if you don't have gain control in the feedback, the clipping diodes will act as variable resistance. When the signal is low the resistance is high. When the signal is high the resistance is low. And that's how feedback clipping works... It lowers the gain when the signal goes over the clipping thershold.

So... Technically the filtering will be changing even inside every the signal cycle... In othe words the filtering will be modulated by the signal.

Sonically... hard to say... I'd quess bit of both but it will probably depend a lot on the part values and not only the resistances, but also the value of the cap.

ElectricDruid

Quote from: wayfaerer on February 23, 2022, 01:21:57 PM
Hmmm... it's clear that in terms of the circuit layout, spatially the filter is neither before nor after the clipping, but during. But what about sonically, practically?

Back in the day, when I used to play heavy metal, I would boost the treble before the amp in order to make palm muting crisp and articulate, then turn the treble down at the amp to tame the harshness. So from the standpoint of "I heard that adjusting the EQ before clipping changes the character of the distortion, while EQ after changes the already distorted sound," where does filtering *during* the clipping fit in?
It doesn't. It affects the tone of the clipping itself and the number/amount of harmonics produced, *not* the signal going in (pre-clipping) or a filtering of the signal coming out (post-clipping). It's more akin to changing the germanium diodes for LEDs or whatever, except that in reality I don't really believe that does half as much.

Quote
Does that sound right?
For me, no. Sorry. It still sounds like you're trying to force it into one box or the other. Can't we just have three boxes instead of two?  ;)

Quote from: Elektrojänis on February 23, 2022, 01:59:02 PM
Even if you don't have gain control in the feedback, the clipping diodes will act as variable resistance. When the signal is low the resistance is high. When the signal is high the resistance is low. And that's how feedback clipping works... It lowers the gain when the signal goes over the clipping thershold.

So... Technically the filtering will be changing even inside every the signal cycle... In other words the filtering will be modulated by the signal.

That's *another* interesting way to look at it! There are synthesizer examples of this type of "Filter FM". It produces all sorts of weird and wonderful noises! Our current situation is somewhat more limited (signal modulating the filter is also the signal going to the filter, which often doesn't have to be the case in a synth), but it's an interesting view of it.



Elektrojänis

Quote from: ElectricDruid on February 23, 2022, 02:35:34 PM
That's *another* interesting way to look at it! There are synthesizer examples of this type of "Filter FM". It produces all sorts of weird and wonderful noises! Our current situation is somewhat more limited (signal modulating the filter is also the signal going to the filter, which often doesn't have to be the case in a synth), but it's an interesting view of it.

That was me lookin at it from almost purely from time domain, but not quite as purely as you did. :D

How I look at the diodes in the feedback loop makes also easy to understand the clean blend that always seems to be built in to TS-style clipping stages even if there is only one signal path... The non inverting stage gain is defined by the resistor ratio +1. The diodes are part of the feedback resistnce and lower the gain when signal goes up, but there is that +1... And that +1 is the original clean signal. This is ofcource a simplification, but it makes it all somewhat understandable for me. :)

And oh yes... Audio frequency filter modulation can be a lot of fun. 

wayfaerer

Even though the question and some of my commentary was worded as such, I'm not actually trying to force it into one or the other... just trying to gain an intuitive understanding, and up until now all I knew about was pre- and post-clipping EQ.

Thinking in the time domain is fine, it's just that it's difficult to translate time domain into "how will it sound" without talking about frequency. I think I'm still a little confused on this part though... Let me see if I can work it out (warning: what follows may be totally wrong):

When the signal is below the knee of the diode, the low pass filter is in full effect because the diodes have resistance that (I think) greatly exceeds that of the feedback resistor, to the extent that the diode has no audible effect on the low pass filter. When one of the diodes conducts (i.e., clipping occurs), the now lowered resistance of the diode causes the cutoff of the low pass filter to go well out of the audible spectrum, which would let all the high end through except for the fact that the signal is basically DC while it's being clipped (not counting the diode knee). In other words, it has no high frequency content during clipping other than what is generated during the knee. But during that knee, the low pass filter *gradually* goes out of effect on the way up, and into effect on the way down, which helps to soften the corners somewhat.



Assuming that's right (which it might not be), then I would suggest that softening those corners with the feedback low pass filter may reduce the harshness somewhat, but not as effectively as a low pass filter after the clipping stage, since in that case the cutoff would be fixed rather than modulated. I.e., the low pass cutoff wouldn't be on its way above the audible range right at the critical time that the diodes are transitioning into and out of conducting.

Am I any closer?

Just to be clear, I'm not suggesting that the low pass filter in the feedback loop is "worse" than any other configuration; I'm just thinking purely about my present goal of reducing harshness.

antonis

Quote from: wayfaerer on February 23, 2022, 04:49:14 PM
the low pass cutoff wouldn't be on its way above the audible range right at the critical time that the diodes are transitioning into and out of conducting.

IMHO, you're overthinking.. :icon_wink:
For such an analysis, one needs to take into account both transition and diffusion capacitance as well as diode switching time..
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

anotherjim

Isn't it just a low pass filter function in a diode limiting amplifier? Neither pre nor post but just where it is. Built-in, embedded...

Vivek

I suppose to get deeper into understanding the situation, it's time to move to graphics rather than words.

We need actual measurement data or simulation of wave shape and FFT analysis of

Test Jig 1 : Cap across diodes in feedback loop

Test Jig 2 : Cap with four times the size across diodes in feedback loop

Test Jig 3 : Filter -> distortion stage without cap -> Filter

at frequencies of 200 Hz, 400 Hz, 800 Hz, 1600 Hz, 3200 Hz

with some kind of signal level normalization to have meaningful comparison. Maybe like standardise the 3rd harmonic at 800 Hz in all situations.

Who will bell the cat ?

Vivek


wayfaerer

Quote from: Vivek on February 24, 2022, 07:04:42 AM
I wish someone had posted a hahaha on my pun on Schrödinger's Cap

Hehehe (nobody laughs at my jokes either)

Quote from: antonis on February 24, 2022, 05:08:05 AM
IMHO, you're overthinking.. :icon_wink:
For such an analysis, one needs to take into account both transition and diffusion capacitance as well as diode switching time..

For sure... I'm definitely overthinking it! In terms of the OD I'm working on, I've pretty much moved on from this question. At this point I'm here for curiosity as I find these small details can be insightful.

Thanks for all the replies.

Elektrojänis

Quote from: wayfaerer on February 23, 2022, 04:49:14 PM
When the signal is below the knee of the diode, the low pass filter is in full effect because the diodes have resistance that (I think) greatly exceeds that of the feedback resistor, to the extent that the diode has no audible effect on the low pass filter. When one of the diodes conducts (i.e., clipping occurs), the now lowered resistance of the diode causes the cutoff of the low pass filter to go well out of the audible spectrum, which would let all the high end through except for the fact that the signal is basically DC while it's being clipped (not counting the diode knee). In other words, it has no high frequency content during clipping other than what is generated during the knee. But during that knee, the low pass filter *gradually* goes out of effect on the way up, and into effect on the way down, which helps to soften the corners somewhat.

This got me thinking two things... Firstly, a lot of the information contained in the signal is in those corners where the filter starts to change. Secondly, some of the most valued guitar tones are "on the edge of breakup"... So the imprtan thing there is to have just enough gain for the diodes to start clipping, but not so much that "the signal is basically DC" for too much of the time.

Third is that the tone might be a bit more dynamic than with just strict pre or post filtering bits played harder will be less filtered.

I have no clean conclusion from these thoughts, but I'm not sure there needs to be.