-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crossover filter bank don't have a flat frequency response #217
Comments
As a workaround, I tend to put a multi-band compressor (which does nothing) in a session's master bus right after creating the session, so the filters don't mess with the frequency response of the mix later in the process when I do want to add multi-band compression… It would be great to see this fixed. <3 |
The problem is that even if the multi-band compressor is doing nothing you are removing part of the signal. This is happening because the frequency response of the crossover filter bank is not flat. I think the only open source multi band studio quality plugins are these http://lsp-plug.in/ (they have the only mastering open source fir linear phase eq that exists at the moment), but I have to test them more in depth to see if they are actually doing what are they supposed to do. |
Very true. The idea behind installing the compressor as early in the process as possible is that I compensate for the filters' frequency response when mixing/EQing. |
Is it possible to work around this with equalizer ? For example, if I have multiband compressor and multiband limiter in series and with same crossover points, both showing -6db pits in their GUIs at those points, will adding 12db at those points in equalizer with matching curves help or mess it up more ? |
Those are quite close together, which could be making the notch worse due to phase issues. |
That isn't how it works. Linkwitz-Riley filter sections are -6dB at the designated frequency, but summing the LPF and HPF at that point doubles the level back to 0dB (both are in phase at the crossover frequency with LR4 or LR8). There shouldn't be a notch in the summed response. |
Further info. I've tested LSP Multiband Compressor, ZaMultiComp, and zita-lrx crossover, all set to similar frequencies to the Calf Multiband Compressor defaults (all LR4). All have similar ripples in the response, ie. around 1dB difference between min and max. Perhaps a completely flat response is expecting too much from this type of filter. A suggestion: how about making the default filter mode LR4 instead of LR8? |
But that completely side-steps my entire question which is "Is it possible to work around this with equalizer ?", "THIS" being "the problem" of this issue and "work around" being what @lpirl does to "compensate for the filters' frequency response when mixing/EQing". Does it actually behaves like it supposed to ? Is there supposed to be a workaround in implementation (some additional compensation step in calculations ?) or in configuration (claimed EQ compensation and such) ? And if it an intrinsic problem to this algorithm, are there better alternatives ? Are those alternatives implemented in some similar F/OSS-licensed JACK plugin toolkit ? And what makes one assume that "commercial implementations" are somehow differ ? |
To avoid holes for the final EQ curve, you need to utilize dynamic shelving filters to adjust band's gain instead of LR filters with future summing of results.
But this won't work for crossover where you decompose the signal into bands and then summarize them somewhere back. |
@v-fox If you compensate that way are going to change phase of the input signal and you are not going to end with a flat response. I'm not assuming "commercial implementations" are different, I know they are different. You can measure the frequency response using an impulse, and you are going to see that the response is perfectly flat. And that is because they use Linkwitz-Riley filters that are correctly implemented, the ones that are being used in Calf just have the name of a Linkwitz-Riley filter but they are something completely different. It is completely possible to create perfectly flat crossovers, I made one and I may submit a patch if I have time (because my coding standards are really different). |
That would be highly appreciated. |
Can a 4th-order LR filter not be implemented by cascading two 2nd-order Butterworth filters? IIRC that's how the original analogue LR crossovers were made. |
No, it can't. If we take:
The final equation:
will become false due to complex nature of the p parameter. |
@sadko4u You are a bit confused, a 2 band Linkwitz–Riley consists of a parallel combination of a low-pass and a high-pass. Each filter is created cascading two Butterworth filters, each of which has −3 dB gain at the cut-off frequency. The resulting Linkwitz–Riley filter has a −6 dB gain at the cutoff frequency. This means that summing the low-pass and high-pass outputs, the gain at the crossover frequency will be 0 dB. But this is the most trivial case, if you need an n band frecuency splitter you also need to add an all-pass filters. These all-pass filters are made of Linkwitz–Riley 2 band cross-overs to add the same amount of phase to every band. |
@Bk8, alright. Let's start with second-order Butterworth filter.
As we see, we get a notch or a hump, depending on the phase (positive, negative) of one of results: Now let's build LR filters:
What about if we change gain?
What about higher-order filter? Let's take 3-order Butterworth filter as a base:
|
@Bk8 , I've looked again at what you've said and seems that you're right about LR filters which are based no 2N-order of butterworth filter. |
@Bk8 |
@sadko4u You helped me in the past, thanks to you! For fixing it, finally there is a great multiband compressor for linux! |
Oh wow! I've always heard there's some phase issues in Calf Mutiband Comprssor, as it created a very distinct character in my drum sounds, though recently @x42 has shown me Ardour's phase and frequency response analysis - and it looked terrible! Are these issues fixed now though? |
Are you open to explain how you designed your all pass filters for the phase compensation? I am currently struggling with this issue and your help will be deeply appreciated. |
I'll talk in terms of analog filters. If we have a low-pass filter with HL[p] complex transfer characteristic and a high-pass filter with HH[p] complex transfer characteristic, then after we sum the characteristics we get HA[p] = HL[p] + HH[p] transfer characteristic which, actually, is an all-pass filter with phase shift. Example: The desired all-pass filter: |
The overall optimized chain with all-pass filters for multiband compressor: |
Thank you so much for your fast reply! Much appreciated! It was exactly the concept which I was missing. Cheers! |
So is the phase issue resolved, is a fix coming? |
@bsjdsp for LSP, not for Calf. |
I was measuring the frequency response of your crossover filters and is not flat. I looked to this issue:
#98
I don't really understand the code, but since you are using Linkwitz-Riley (as is mentioned in the issue) you need to compensate the phase introduced by each extra band split with an all-pass filter (look this link: https://www.modernmetalproduction.com/linkwitz-riley-crossovers-digital-multiband-processing/). I was not really able to solve this issue, this are the frequencies I used for this test: 5349.8 hz, 11602.1 hz and 15247.8 hz .
The text was updated successfully, but these errors were encountered: