Old 05-21-2020, 06:08 PM   #1
Iain_mf
Human being with feelings
 
Join Date: May 2020
Posts: 2
Default New to JSFX. Here is my Dynamic Low Frequency Limiter proof of concept.

Hello. I have managed to Frankenstein parts together to make an effect that hard limits low-frequencies using the level of high frequencies as a threshold. It's ugly but it works.

The idea is that low frequencies tend to mask higher ones, so you can make things clearer if you limit the low frequencies to prevent masking. I have been using it to audiobooks I have downloaded from my library.



desc: Dynamic LF limiter
import cookdsp.jsfx-inc

slider1:1000<100,5000>Cutoff Frequency In Hz
slider2:20<1,200>speed Hz
slider3:0<-12,12,0.1>threshold offset
slider4:-40<-60,0>floor

@init
// Initializes the filters
filt1.butlp(slider1);
levelsmooth1.butlp(slider2);
levelsmooth2.butlp(slider2);
lo_level=hi_level=0;
gr1=gr2=1;
offset=2 ^ (slider3/6);
floor_level=2 ^ (slider4/6);

@slider
filt1.butlp_set_freq(slider1);
levelsmooth1.butlp_set_freq(slider2);
levelsmooth2.butlp_set_freq(slider2);
offset=2 ^ (slider3/6);
floor_level=2 ^ (slider4/6);

@sample


lo_pass=filt1.butlp_do(spl0);
hi_pass=spl0-lo_pass;

// filter abs values to get something like RMS level
// adjust lo_level by offset as threshold adjustment
// floor level means that the effect is not apply to low level signals like noise
lo_level= max(levelsmooth1.butlp_do(abs(lo_pass))*offset,flo or_level);
hi_level= max(levelsmooth2.butlp_do(abs(hi_pass)),floor_leve l);

// Calcualte gain reduction to hard limit lo_level with threhold of hi_level
gr1= min((hi_level/lo_level),1);

spl0 = (lo_pass*gr1)+hi_pass;
spl1 = spl0;


I was only using the left input to keep things simple for a beginner like me I used spl1 to output the gain reduction so I could see it on an oscilloscope. That's why the inputs and output are strange.


What I would really like it to add gain reduction meter, but when I looked at the code from other plugins I was confused.
Is there a step by step guide for gfx?

Also, any feedback is most welcome.
Iain_mf is offline   Reply With Quote
Old 05-21-2020, 11:00 PM   #2
junh1024
Human being with feelings
 
Join Date: Feb 2014
Posts: 151
Default

Quote:
Originally Posted by Iain_mf View Post
What I would really like it to add gain reduction meter, but when I looked at the code from other plugins I was confused.
Is there a step by step guide for gfx?

Also, any feedback is most welcome.

Have a look at my @gfx section https://github.com/junh1024/Reaper-S...mpressor_6.txt , or Liteon's deesser (GPL) . IIRC you set gr_meter in your code to the gain, & then the gfx updates using that.

Also, does this get better results than ReaXComp for you?
junh1024 is offline   Reply With Quote
Old 05-22-2020, 12:43 AM   #3
Iain_mf
Human being with feelings
 
Join Date: May 2020
Posts: 2
Default

Quote:
Originally Posted by junh1024 View Post
Have a look at my @gfx section https://github.com/junh1024/Reaper-S...mpressor_6.txt , or Liteon's deesser (GPL) . IIRC you set gr_meter in your code to the gain, & then the gfx updates using that.

Also, does this get better results than ReaXComp for you?
Thanks, I will look into that.


The big difference between this and ReaXcomp is this has a dynamic threshold. The threshold for the low band limiting is the RMS level of the high band.




That means that if the low band's level is higher than the high-band's level the low-band gain is reduced regardless of the level of the low band. Likewise, if the low band is very loud but still quieter than the high band, it will have no gain reduction.

I haven't done extensive testing, but one area that it might be useful to others is controlling proximity effect. If you have a singer that has an inconsistent position to the microphone this, theoretically, will prevent the changes in low-frequency level while maintaining the dynamics.

Edit: Success. You gain reduction meter works! Thanks again.

Last edited by Iain_mf; 05-22-2020 at 01:03 AM.
Iain_mf is offline   Reply With Quote
Old 05-22-2020, 02:58 AM   #4
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 9,014
Default

Nice !

(But supposedly could be done by using the Splitter and the Limiter plugins which come with Reaper).

Thanks,
-Michael
mschnell is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:23 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.