Go Back   Cockos Incorporated Forums > REAPER Forums > newbieland

Reply
 
Thread Tools Display Modes
Old 01-15-2020, 08:04 AM   #1
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 148
Default FX to do bass and treble gain like Delay w/ Tone Control?

Hello again.


I've discovered the Delay w/ Tone Control FX and found it to my liking. That is, I like the way it provides a simple option for basic tone control. By allowing to boost a bass or treble frequency with an amount of dB.


I've found it simple but effective. I'm wondering what other FX would duplicate the algorithm? Since there isn't an isolated Tone Control FX by itself.


I'm looking into things like Booster, ReaEQ and 3-Band-EQ. But don't know if they differ. Not without comparing the JSFX code in each. :-)
Hypex is offline   Reply With Quote
Old 01-15-2020, 12:51 PM   #2
ErBird
Human being with feelings
 
Join Date: Jan 2017
Location: Los Angeles
Posts: 551
Default

The tone control is two basic peak filters. You could edit out the delay code and continue to use the tone control as is. Or you could use ReaEQ. The result will be identical with the right BW value. 3-Band-EQ uses shelves so not the same.

Code:
desc: Tone Control

slider1:0<-60,60,0.1>Bass Gain (dB)
slider2:200<20,500,1>Bass Frequency (Hz)
slider3:0<-60,60,0.1>Treble Gain (dB)
slider4:4000<500,20000,1>Treble Frequency (Hz)

in_pin:left input
in_pin:right input
out_pin:left output
out_pin:right output

@init

Bc0=Bc1=Bc2=0;
Bli1=Bli2=Bri1=Bri2=0;
Tc0=Tc1=Tc2=0;
Tli1=Tli2=Tri1=Tri2=0;

@slider

width=1.5;
// bass control
arc=(2*$pi*slider2)/srate;
gain=(2^(slider1/6));
a=(sin(arc)*width) * (gain < 1 ? 1 : 0.25);
tmp=1/(1+a);  
Bc0=tmp*a*(gain-1);
Bc1=tmp*2*cos(arc);
Bc2=tmp*(a-1);

// treble control
arc=(2*$pi*slider4)/srate;
gain=(2^(slider3/6));
a=(sin(arc)*width) * (gain < 1 ? 1 : 0.25);
tmp=1/(1+a);  
Tc0=tmp*a*(gain-1);
Tc1=tmp*2*cos(arc);
Tc2=tmp*(a-1);

@sample

Btmp=Bc0*(spl0-ldelay2) + Bc1*Bli1 + Bc2*Bli2;
Ttmp=Tc0*(spl0-ldelay2) + Tc1*Tli1 + Tc2*Tli2;
ldelay2=ldelay1; ldelay1=spl0; 
Tli2=Tli1; spl0 += (Tli1=Ttmp);
Bli2=Bli1; spl0 += (Bli1=Btmp);

Btmp=Bc0*(spl1-rdelay2) + Bc1*Bri1 + Bc2*Bri2;
Ttmp=Tc0*(spl1-rdelay2) + Tc1*Tri1 + Tc2*Tri2;
rdelay2=rdelay1; rdelay1=spl1; 
Tri2=Tri1; spl1 += (Tri1=Ttmp);
Bri2=Bri1; spl1 += (Bri1=Btmp);
ErBird is offline   Reply With Quote
Old 01-18-2020, 06:52 AM   #3
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 148
Default

Quote:
Originally Posted by ErBird View Post
The tone control is two basic peak filters. You could edit out the delay code and continue to use the tone control as is. Or you could use ReaEQ. The result will be identical with the right BW value. 3-Band-EQ uses shelves so not the same.

Thank you for your work on this. As it happens I was testing using ReaEQ on the band setting as you have demonstrated. Just with dB up to 3 and bandwidth on default 2. Then later matching your 2.4 figure. I found it still didn't sound the same, at least not to me. It was working as I could see the graph in the VST. But I couldn't get it working to the same depth. Somehow Tone Control is simple but effective. Don't know why the code hasn't been isolated by itself. I tried earlier to use it by itself with a 0 delay and no feedback but it didn't work.



I tested your version. And it looks like you did some tedious work reducing those sliders from 7 to 4. But I cannot hear any difference. I noticed you took out the Output Mix. And add it directly in. So would it then assume an output of 1 for a wet mix only?
Hypex 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 01:07 AM.


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