Page 1 of 1

Another filter topic!

Posted: Sat May 31, 2014 12:35 pm
by Father
Lets forget about the 64bit stuff for now!
I was experimenting with the multi-filter in the toolbox, and some others. In high resonances like 80% or so, the output level is dramatically increasing, specially between mid and low frequencies. which is not good if you're using a limiter or clipper somewhere, it will create some nasty artifacts.
I think there is a few ways to get this thing in control like:
- Change or Modify the filter (I don't have a clue!)
- Use a warm overdrive
- Use a limiter, with about 2ms attack, 90ms release and 0db ceiling, after.

1- How would you do it?
2- Is there a nice limiter around?

Re: Another filter topic!

Posted: Sat May 31, 2014 4:39 pm
by KG_is_back
When you set filter to high resonance it does what you'd expect - it resonates = dramatically boosts narrow frequency band. If some loud single pitched sound (like the first few harmonics of most sounds always are) they get boosted like crazy.
One thing that'd be fun to do is a distortion in the feedback of the filter (to distort the output for example with htan even before the feedback).

here's a little cpu-fiendly stereo brickwall limiter.

Re: Another filter topic!

Posted: Sat May 31, 2014 6:49 pm
by Father
KG_is_back wrote:here's a little cpu-fiendly stereo brickwall limiter.

just a quick test and it sounds good. This should do it. Thanks KG. Always appreciate the help.
KG_is_back wrote:One thing that'd be fun to do is a distortion in the feedback of the filter

That is fun. I guess it will also add warmth and character to the sound. Could you do an example on that?

Re: Another filter topic!

Posted: Sat May 31, 2014 7:12 pm
by Nubeat7
you also could use a soft clipper, thats what i normally use but i dont know whats better maybe its just taste?

Re: Another filter topic!

Posted: Sat May 31, 2014 8:30 pm
by Father
Nubeat7 wrote:you also could use a soft clipper, thats what i normally use but i dont know whats better maybe its just taste?

Negative. Both these limiters and clippers are introducing artifacts.
The limiter needs to have a few ms attack time in order to eliminate this problem. Its crucial, specially on those relatively low frequencies. Otherwise no matter how much release there is, still going to hear some ugly distortion.
Can we add attack parameter to this limiter?

Re: Another filter topic!

Posted: Sat May 31, 2014 9:02 pm
by KG_is_back
here you go...

and what I meant with the distortion in the filter:
generally the filter formula is:

Code: Select all

y[0] = x[0]*b0 + x[1]*b1 + x[2]*b2 - y[1]*a1 - y[2]*a2;
y[2] = y[1];
y[1] = y[0];
x[2] = x[1];
x[1] = x[0];

you can add a distortion into the feedback:

Code: Select all

y[0] = distort(x[0]*b0 + x[1]*b1 + x[2]*b2 - y[1]*a1 - y[2]*a2);
y[2] = y[1]; y[1] = y[0]; x[2] = x[1]; x[1] = x[0];

note that this is a pseudocode by distort you can use whatever waveshaper curve you like (for example hyperbolic tangent)

Re: Another filter topic!

Posted: Sat May 31, 2014 10:10 pm
by Father
This is close to being perfect! :) But if you wanna take one step further, it should keep everything below threshold even with attack time.
I wonder how FL limiter works.

Re: Another filter topic!

Posted: Sat May 31, 2014 11:25 pm
by KG_is_back
Lookahead limiter might do...

use this code within the limiter and delay "in"and leave "inD" without delay.

Code: Select all

streamin in;
streamin inD;
streamout out;
streamout GR;
streamin rel;
streamin att;

float TH=0.99;
float env=0;
int absmask=2147483647;

//envelope follower
movaps xmm0,in;
andps xmm0,absmask;
movaps xmm3,inD;
andps xmm3,absmask;
maxps xmm0,xmm3;
movaps xmm1,xmm0;
movaps xmm3,env;
cmpps xmm1,xmm3,1;
movaps xmm5,rel;
movaps xmm4,att;
subps xmm5,xmm4;
andps xmm1,xmm5;
addps xmm1,xmm4;
subps xmm3,xmm0;
mulps xmm1,xmm3;
addps xmm1,xmm0;
movaps env,xmm1;
//comparator
movaps xmm0,xmm1;
shufps xmm0,xmm0,17;
maxps xmm0,xmm1;

movaps xmm6,TH;
maxps xmm0,xmm6;
divps xmm6,xmm0;
movaps GR,xmm6;
mulps xmm6,in;
movaps out,xmm6;

Re: Another filter topic!

Posted: Sun Jun 01, 2014 12:17 am
by Father
I'm not a fan of using delay but sometimes there is no choice. Even FL limiter is using a significant look ahead delay.
I used a soft clipper after the limiter, it wasn't bad but using delay is giving much better results. Best setting was:
3ms attack, 150ms release, and 25ms delay.
I think this is it! A nice limiter to use and love!