Then it ain't your problem anymore
Summing dry/wet signals
- KVRAF
- 16861 posts since 8 Mar, 2005 from Utrecht, Holland
Just sum it and give the user a trim/gain control.
Then it ain't your problem anymore
Then it ain't your problem anymore
We are the KVR collective. Resistance is futile. You will be assimilated. 
My MusicCalc is served over https!!
My MusicCalc is served over https!!
-
- Banned
- 12367 posts since 30 Apr, 2002 from i might peeramid
Code: Select all
in1_filtered = fFilters[EFilters::kLp1].Process(*in1, 0);
in2_filtered = fFilters[EFilters::kLp1].Process(*in2, 0);
in1_filtered = fFilters[EFilters::kHp1].Process(in1_filtered, 0);
in2_filtered = fFilters[EFilters::kHp1].Process(in2_filtered, 0);
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.
-
- KVRist
- Topic Starter
- 77 posts since 17 Jan, 2021
Relly?xoxos wrote: Mon Nov 01, 2021 8:28 pmCode: Select all
in1_filtered = fFilters[EFilters::kLp1].Process(*in1, 0); in2_filtered = fFilters[EFilters::kLp1].Process(*in2, 0); in1_filtered = fFilters[EFilters::kHp1].Process(in1_filtered, 0); in2_filtered = fFilters[EFilters::kHp1].Process(in2_filtered, 0);![]()
- KVRist
- 243 posts since 24 Aug, 2014
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.xoxos wrote: Mon Nov 01, 2021 1:38 pm i know i should shut up but in the old days people just typed the filter there instead of using OO for using OO for a 6dB lowpass is one of those crazy things. just because everyone else jumps off a cliff and chews off their own limbs in a giant bleeding heap of people who make everything three times longer to type.
- KVRist
- 243 posts since 24 Aug, 2014
This schematic should lead to this pseudocode: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
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;
Code: Select all
auto in = *in_buffer;
auto x = highpass(lowpass(in));
auto out = compressor(x) + in - x;
Also, if your compressor introduces latency, you should mix its result with delayed leftover.
-
- KVRist
- Topic Starter
- 77 posts since 17 Jan, 2021
In principle, I did, but here's the problem:Vokbuz wrote: Tue Nov 02, 2021 11:10 amThis schematic should lead to this pseudocode: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).pngOr the short one: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;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.Code: Select all
auto in = *in_buffer; auto x = highpass(lowpass(in)); auto out = compressor(x) + in - x;
You do not have the required permissions to view the files attached to this post.
- KVRian
- 804 posts since 25 Apr, 2011
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.
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.
-
- KVRian
- 1119 posts since 4 Jan, 2007
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.
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.
-
- Banned
- 12367 posts since 30 Apr, 2002 from i might peeramid
just cause we aint all annie oakleys don't mean we cain't have no fun shootin.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.
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.
- KVRist
- 243 posts since 24 Aug, 2014
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.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.
-
- Banned
- 12367 posts since 30 Apr, 2002 from i might peeramid
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?
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.
- KVRAF
- 8503 posts since 12 Feb, 2006 from Helsinki, Finland
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).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.
