Summing dry/wet signals

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

SKyzZz wrote: Mon Nov 01, 2021 7:28 pm There are two filters(LP+HP) and compression. This is the result of the signal being processed. I want to understand how to sum up such a processed signal AND what I cut with a conventional filter. That is, it is a compressor that filters part of the frequencies compresses what remains, but in the AND adds up the raw signal by the compressor and is processed.

untitled (4).png
This schematic should lead to this pseudocode:

Code: Select all

auto in = *in_buffer;
auto x = in;
x = lowpass(x);
x = highpass(x);
auto leftover = in - x;
x = compressor(x);
auto out = x + leftover;
Or the short one:

Code: Select all

auto in = *in_buffer;
auto x = highpass(lowpass(in));
auto out = compressor(x) + in - x;
For more than one channel just repeat it for each channel. Note: each channel should have its own filter and compressor states and it doesn't seem the case in the code you posted.

Also, if your compressor introduces latency, you should mix its result with delayed leftover.

Post

Vokbuz wrote: Tue Nov 02, 2021 11:10 am
SKyzZz wrote: Mon Nov 01, 2021 7:28 pm There are two filters(LP+HP) and compression. This is the result of the signal being processed. I want to understand how to sum up such a processed signal AND what I cut with a conventional filter. That is, it is a compressor that filters part of the frequencies compresses what remains, but in the AND adds up the raw signal by the compressor and is processed.

untitled (4).png
This schematic should lead to this pseudocode:

Code: Select all

auto in = *in_buffer;
auto x = in;
x = lowpass(x);
x = highpass(x);
auto leftover = in - x;
x = compressor(x);
auto out = x + leftover;
Or the short one:

Code: Select all

auto in = *in_buffer;
auto x = highpass(lowpass(in));
auto out = compressor(x) + in - x;
For more than one channel just repeat it for each channel. Note: each channel should have its own filter and compressor states and it doesn't seem the case in the code you posted.
In principle, I did, but here's the problem:
You do not have the required permissions to view the files attached to this post.

Post

Firstly, try removing the compressor by setting compressor(x)=x. Then you should get output identical to input. If you don't, then there is something wrong with your earlier logic.

Then I think you need to clarify what exactly you are trying to achieve, and how - in your first picture you've labelled 'wet' as the central overlap of the LP and HP filters, which would be achieved using something like HP(LP(x)) - but in this latest picture you have 'wet' as the non-overlapped region which is a very different scenario.

Nobody can help you if they don't know what you are trying to do. :)

Post

This is a 3 band crossover where you send the central band to the compressor and sum back the lows and highs afterwards.

As said before, you need a 3 band Linkwitz-riley crossover (IIR) or a 3 band linear-phase one.

It is only on linear-phase filters that you can directly subtract from the (delayed) input directly to get the complementary response.

Post

Vokbuz wrote: Tue Nov 02, 2021 10:56 am Repeating code is not a good practice. In fact it is a bad one. Nobody's perfect and typos appear even in a very simple code. OO makes perfect sense in this case.
just cause we aint all annie oakleys don't mean we cain't have no fun shootin.
but stills yall best not get into no gunfights with an actual annie.
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

xoxos wrote: Tue Nov 02, 2021 10:16 pm just cause we aint all annie oakleys don't mean we cain't have no fun shootin.
Just make sure you don't shoot yourself in the foot and don't shoot somebody else while having this fun. I believe Annie Oakley did know and follow the safety rules.

Post

safety rules?

holmes. my dear detective. code without error is the foundation of computer programming. every person here has to come to terms with the fact of not making errors in order to achieve a functional instruction.

telling me that the processes i've used for thirty eight years of coding are bad or not safe doesn't make a whit of difference. you can march up and down on my face all eternity long. get a marching band and some flags.

a linear interpolation is one multiply and two sums. you can add a branch to each one if you don't trust yourself enough.

are we done with our routine now?
are we done with our routine now?
are we done with our routine now?
you come and go, you come and go. amitabha neither a follower nor a leader be tagore "where roads are made i lose my way" where there is certainty, consideration is absent.

Post

rafa1981 wrote: Tue Nov 02, 2021 12:56 pm This is a 3 band crossover where you send the central band to the compressor and sum back the lows and highs afterwards.

As said before, you need a 3 band Linkwitz-riley crossover (IIR) or a 3 band linear-phase one.

It is only on linear-phase filters that you can directly subtract from the (delayed) input directly to get the complementary response.
I just want to quote this to emphasize that there really is no other option: it has to be either linear-phase, or a proper Linkwitz-Riley cross-over network (and using trapezoidal/BLT filters, because no other design will match the phases properly).

Post Reply

Return to “DSP and Plugin Development”