Understanding filters negative effect on transients

Started by stonerbox, October 01, 2022, 07:44:38 PM

Previous topic - Next topic

stonerbox

So...

Almost all filters/EQs I have worked with most often alters the feel of a circuit. An example could be a vivid and responsive fuzz or an overdrive that just "breaths" and moves nicely with how you play. Then you get the bright idea to add a filter. Immediately the thing goes from expressive, reactive and alive to swampy and compressed. All your precious and beautiful work goes down the drain. But the people out there "need" their holy EQ. So it stays there. Like a rotting corpse in the tub when you're fixing for a bath...

Anyways, I am aware that all filters alters the response, as seen in calculations or visible in LTSpice simulations, but what can be done to retain or preserve the soul and huge dynamic surge that blows through a circuit when you dig in?


This message is brought to you by "Body Disposal Chems INC".


There is nothing more to be said or to be done tonight, so hand me over my violin and let us try to forget for half an hour the miserable weather and the still more miserable ways of our fellowmen. - Holmes

Digital Larry

Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

puretube

Be sure the filter doesn`t load the circuit`s output, or put a high-Z buffer before the filter.
And/or:
Make-up gain-stage after the filter.
Or:
Filter-bypass-switch!

ElectricDruid

Quote from: stonerbox on October 01, 2022, 07:44:38 PM
Anyways, I am aware that all filters alters the response, as seen in calculations or visible in LTSpice simulations, but what can be done to retain or preserve the soul and huge dynamic surge that blows through a circuit when you dig in?

I think I'd need to see a schematic of an actual example. Looking for "missing soul" in a hypothetical circuit is not likely to get very far!

As far as dynamic range goes, filters won't affect that much. There's some perceptual change in the "impact" of a sound made by removing the treble and smoothing things out, but the effect on the actual dynamics is limited.

I know of one significant exception to this, which is a "phase rotator". This is a allpass filter used to limit the volume of transients for broadcast applications. Explanation here: https://www.uaudio.com/blog/allpass-filters/

Of course, *all* filters produce a phase shift, not just allpass filters designed to do that alone, so perhaps what you're hearing and objecting to is the way filters mess up the *phase* of the signal across the spectrum. That effect *is* most noticeable on transients, and the brighter and sharper they are, the more you'd notice - which might be why you mentioned "vivid fuzz" in your post.
The effect happens because the different harmonics of the signal get delayed by different amounts, so something that started off "all lined up" comes out "staggered". Now, humans can't hear phase directly, but we can hear the cancellations that occur when you shift one signal against another, so this effect should be audible in at least some cases, and is certainly audible in extreme cases.

HTH

stonerbox

#4
Sorry for the late response! Been busy with dog and life stuff.

Here is part of the circuit, the left out bits are pretty easy to imagine. Except for the inverted phase, which is expected, you can see  how the responses vary greatly. Can anything be done about it? When checking the frequency response at the end of the crossover it comes up flat as expected. Should a filter of this kind really alter the transients this much or have I made any mistakes along the way?

[Click for full size]
There is nothing more to be said or to be done tonight, so hand me over my violin and let us try to forget for half an hour the miserable weather and the still more miserable ways of our fellowmen. - Holmes

antonis

<Off-topic ON>

C5 & C6 should be flipped 180o..

<Off-topic OFF>
"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..

stonerbox

#6
Quote from: antonis on October 02, 2022, 03:03:34 PM
<Off-topic ON>

C5 & C6 should be flipped 180o..

<Off-topic OFF>

That is correct, I forgot to fix that when hastily and manually copying the schematic off LTSpice. Edit: Updated the schematic above.
There is nothing more to be said or to be done tonight, so hand me over my violin and let us try to forget for half an hour the miserable weather and the still more miserable ways of our fellowmen. - Holmes

ElectricDruid

Quote from: stonerbox on October 02, 2022, 02:44:28 PM
Here is part of the circuit, the left out bits are pretty easy to imagine. Except for the inverted phase, which is expected, you can see  how the responses vary greatly.
Ok, they do. But don't get *too* hung up about that - it's the time domain, and that's not really what we hear, or at least, not at that scale. You have to shift stuff by many msecs before we even notice. 180 degrees of phase shift here or here might screw up what your waveform looks like, but you won't hear it (mostly - there are *alway* caveats).
For example, it's possible to create a "square wave" with the harmonics shifted in phase and the resulting waveform doesn't look anything like square, but it sounds identical, since the harmonics and their amounts are all present and correct. (The second waveform in this image is the "square", after the series of ramp waves: https://www.electricdruid.net/images/dcos/larger/DW8000Waves1.png)

QuoteCan anything be done about it?
Not a lot, no. It's a unavoidable effect of filtering. The reason for that can be summarised in one word as "physics" - it's a side-effect of the uncertainly principle.

QuoteWhen checking the frequency response at the end of the crossover it comes up flat as expected. Should a filter of this kind really alter the transients this much or have I made any mistakes along the way?
Yes, that's what I might expect to see, and no, I don't think you've made any mistakes. You've chosen to invert the highpass to try and compensate for the fact one filter "lags" while the other "leads", right? I don't think I'd bother. As you've noticed, the frequency response is flat anyway.

HTH


stonerbox

Quote from: ElectricDruid on October 02, 2022, 04:40:29 PM
Ok, they do. But don't get *too* hung up about that - it's the time domain, and that's not really what we hear, or at least, not at that scale. You have to shift stuff by many msecs before we even notice. 180 degrees of phase shift here or here might screw up what your waveform looks like, but you won't hear it (mostly - there are *alway* caveats).
For example, it's possible to create a "square wave" with the harmonics shifted in phase and the resulting waveform doesn't look anything like square, but it sounds identical, since the harmonics and their amounts are all present and correct. (The second waveform in this image is the "square", after the series of ramp waves: https://www.electricdruid.net/images/dcos/larger/DW8000Waves1.png)

Interesting, this one?


Initially I figured the difference in transients would not be noticeable but when I actually built the circuit it sounded awful compared to the kickass, vibrant and alive mids coming out of the transistors. After the filter so much soul had been sucked away and the picking response was heavily muddled, for lack of better words.

Quote from: ElectricDruid on October 02, 2022, 04:40:29 PM
Not a lot, no. It's a unavoidable effect of filtering. The reason for that can be summarised in one word as "physics" - it's a side-effect of the uncertainly principle.

If there are two things I hate it is gravity and the unholy world of audio filter physics.

Quote from: ElectricDruid on October 02, 2022, 04:40:29 PM
You've chosen to invert the highpass to try and compensate for the fact one filter "lags" while the other "leads", right?

HTH

No not intentionally. The inversion is to cancel out the lower frequencies [<159hz] of the HPF.
There is nothing more to be said or to be done tonight, so hand me over my violin and let us try to forget for half an hour the miserable weather and the still more miserable ways of our fellowmen. - Holmes

Rob Strand

#9
QuoteSorry for the late response! Been busy with dog and life stuff.

The filter circuit is really acting as a tone control;  in fact a bass control.

Maybe you are affecting the wrong frequency bands and you need to make all the filter caps bigger or smaller.

You can spend a lot of time tweaking stuff like that.


QuoteNo not intentionally. The inversion is to cancel out the lower frequencies [<159hz] of the HPF.
A better/more accurate way to say it is normally you need the inversion so the HF and LP signals add together correctly to a flat magnitude.   It's the deliberate modification of the gain of the bass path (with the feedback resistor) that lets you set the level lows independently from the highs.    The inverting circuit, which is already present, is a convenient way to do that.


It could even turn out a first order filter sounds better.     You can leave the inverter in for a first order filter but normally it's preferred not to invert in this case.

Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

stonerbox

#10
Quote from: Rob Strand on October 02, 2022, 07:51:25 PM
The filter circuit is really acting as a tone control;  in fact a bass control.

Yes. Yes, I know...
The real intention is to down the line split the LP and HP into separate paths out.. This circuit is part of a bigger "stereo thing" where I want to keep most of the lower freqs in mono at all time. The bass control is very much welcome but it was just an afterthought.

Quote from: Rob Strand on October 02, 2022, 07:51:25 PM
Maybe you are affecting the wrong frequency bands and you need to make all the filter caps bigger or smaller.

Nope, it does exactly what it is supposed to. I just have to make peace with the fact that it alters the transient response and get on with finishing up the build.
There is nothing more to be said or to be done tonight, so hand me over my violin and let us try to forget for half an hour the miserable weather and the still more miserable ways of our fellowmen. - Holmes

Rob Strand

#11
QuoteNope, it does exactly what it is supposed to. I just have to make peace with the fact that it alters the transient response and get on with finishing up the build.

Well, if you are feeling very keen to try something there is another type of crossover (called constant voltage crossovers.)

Most crossovers add the LP and HP to give *magnitude* 1 but not 1.   The difference between magnitude 1 and "1" is that magnitude 1 has a phase shift whereas "1" produces the exact signal that went in.

Your circuit has the bass control so when the bass is adjusted for boost or cut it's not producing the exact signal that went in *unless* it's set to the magic position where there is no bass boost or cut.

There is a crossover which makes the low-pass from the high-pass so that when they add back together you get the input signal (exactly).   The question is, if you dial the bass up or down from the magic position, does it sound better or worse than the crossover you have? I don't know.  What I can say is if you dialed the bass back to zero it will sound like the previous circuit as the high-pass part is unchanged.

The sims below show what happens with the bass boosted and cut.   The new circuit does have less phase shift variations.






You can ponder about it.   I'm only putting it up because I know of that option.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

puretube

Stonerbox: you could try to turn the function opamp B of the LP into a noninverting one, to avoid the "overall-Allpass-response".

ElectricDruid

Quote from: stonerbox on October 02, 2022, 05:29:03 PM
Interesting, this one?

No, sorry, I wasn't very clear - this one:

Yes, that's a "square" wave! Sounds identical, and has the same spectrum.

stonerbox

#14
Quote from: Rob Strand on October 02, 2022, 09:48:34 PM

You can ponder about it.   I'm only putting it up because I know of that option.


Hey, that looks highly promising!

Edit:
Now that's... sexy.




Quote from: puretube on October 03, 2022, 06:11:01 AM
Stonerbox: you could try to turn the function opamp B of the LP into a noninverting one, to avoid the "overall-Allpass-response".
Ah, a gentle notch at the center frequency.



The transients will however stay (mostly) intact.



There is nothing more to be said or to be done tonight, so hand me over my violin and let us try to forget for half an hour the miserable weather and the still more miserable ways of our fellowmen. - Holmes

stonerbox

#15
Quote from: Rob Strand on October 02, 2022, 09:48:34 PMWell, if you are feeling very keen to try something there is another type of crossover (called constant voltage crossovers.)


Rob if I was a girl I'd bang you for free up and down the walls and floor right about now. Your constant voltage crossover filter is @#$%ing fantastic.
Did a quick and dirty video comparing the two filters. It is a massive difference and with the CVC filter the character and picking response stays intact.


There is nothing more to be said or to be done tonight, so hand me over my violin and let us try to forget for half an hour the miserable weather and the still more miserable ways of our fellowmen. - Holmes


Fancy Lime

#17
Quote from: Rob Strand on October 02, 2022, 09:48:34 PM
QuoteNope, it does exactly what it is supposed to. I just have to make peace with the fact that it alters the transient response and get on with finishing up the build.

Well, if you are feeling very keen to try something there is another type of crossover (called constant voltage crossovers.)

Most crossovers add the LP and HP to give *magnitude* 1 but not 1.   The difference between magnitude 1 and "1" is that magnitude 1 has a phase shift whereas "1" produces the exact signal that went in.

Your circuit has the bass control so when the bass is adjusted for boost or cut it's not producing the exact signal that went in *unless* it's set to the magic position where there is no bass boost or cut.

There is a crossover which makes the low-pass from the high-pass so that when they add back together you get the input signal (exactly).   The question is, if you dial the bass up or down from the magic position, does it sound better or worse than the crossover you have? I don't know.  What I can say is if you dialed the bass back to zero it will sound like the previous circuit as the high-pass part is unchanged.

The sims below show what happens with the bass boosted and cut.   The new circuit does have less phase shift variations.






You can ponder about it.   I'm only putting it up because I know of that option.

Could that be simplified by flipping the inputs of U7 and skipping U4?
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!

ElectricDruid

Quote from: stonerbox on October 03, 2022, 01:11:08 PM
Rob if I was a girl I'd bang you for free up and down the walls and floor right about now. Your constant voltage crossover filter is @#$%ing fantastic.

ROFL!!! If anyone ever thought that electronic engineering wasn't sexy, now they know they're wrong! :icon_lol:

Rob Strand

#19
QuoteRob if I was a girl I'd bang you for free up and down the walls and floor right about now. Your constant voltage crossover filter is @#$%ing fantastic.
Did a quick and dirty video comparing the two filters. It is a massive difference and with the CVC filter the character and picking response stays intact.
:icon_mrgreen: :icon_mrgreen: :icon_eek: :icon_eek:
Well, all worthwhile.

I'm surprised there's such a difference.

QuoteCould that be simplified by flipping the inputs of U7 and skipping U4?
If you just want a fixed gain on the lowpass then that will work.  In fact that's what I
had originally.

When you want variable gain on the lowpass like stonerbox's original circuit you need
to add a second opamp.   If you a fixed gain to the differential input amp and a post
volume pot the differential amp can clip, so it's easier to stay with the inverting
variable gain amp.

You can take the constant voltage crossover thing one step further by making the response
symmetrical but the circuit will be more complex; search for symmetrical  constant voltage
crossovers.   In this case the highpass and lowpass equally share a hump.   I kept the high-pass
fixed as stonerbox was feeding that through all the time. Since the bass is variable I left
the hump in the bass.  With a Q=0.5 crossover, it's fairly mild anyway.  FWIW, these crossover
are from back around 1971 - the early days of maneuvering around the problems with crossovers.

For speaker crossovers they aren't popular because real speakers have other issues which are just as bad
as the phasing problems in the crossover themselves. For a band-splitter the constant
voltage crossovers have something to offer.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.