Old 04-06-2020, 06:32 PM   #1
ReaNico
Human being with feelings
 
Join Date: Jun 2016
Location: Villa Mercedes, San Luis, Argentina
Posts: 54
Default How make a 3 band splitter with 24db slope?

Hi!

Does anyone know how to make a 3 band splitter with 24db slope in JS 3-Band Splitter plugin?

HERES IS THE CODE:

desc:3-Band Splitter
desc:3-Band Splitter (Splits In Low:1+2,Mid:3+4,High:5+6) [LOSER]
//tags: processing routing
//author: LOSER

slider1:200<0,22000,1>Crossover 1 (Hz)
slider2:2000<0,22000,1>Crossover 2 (Hz)

in_pin:left input
in_pin:right input
out_pin:low output left
out_pin:low output right
out_pin:mid output left
out_pin:mid output right
out_pin:high output left
out_pin:high output right

@init
cDenorm=10^-30;

@slider
freqHP = max(min(slider2,srate),slider4);
xHP = exp(-2.0*$pi*freqHP/srate);
a0HP = 1.0-xHP;
b1HP = -xHP;

freqLP = min(min(slider1,srate),slider2);
xLP = exp(-2.0*$pi*freqLP/srate);
a0LP = 1.0-xLP;
b1LP = -xLP;

@sample

s0 = spl0;
s1 = spl1;

spl0 = (tmplLP = a0LP*s0 - b1LP*tmplLP + cDenorm);
spl1 = (tmprLP = a0LP*s1 - b1LP*tmprLP + cDenorm);

spl4 = s0 - (tmplHP = a0HP*s0 - b1HP*tmplHP + cDenorm);
spl5 = s1 - (tmprHP = a0HP*s1 - b1HP*tmprHP + cDenorm);

spl2 = s0 - spl0 - spl4;
spl3 = s1 - spl1 - spl5;
Attached Images
File Type: png 333.png (7.6 KB, 10 views)
ReaNico is offline   Reply With Quote
Old 04-06-2020, 07:47 PM   #2
xpander
Human being with feelings
 
xpander's Avatar
 
Join Date: Jun 2007
Location: Terra incognita
Posts: 5,708
Default

Have you checked Saike's 4-pole BandSplitter/Joiner?
Saike's workshop
xpander is online now   Reply With Quote
Old 04-07-2020, 03:39 AM   #3
sai'ke
Human being with feelings
 
sai'ke's Avatar
 
Join Date: Aug 2009
Location: NL
Posts: 876
Default

Are you looking for a minimum phase or linear phase (this comes at the cost of some performance and latency) one?

You can find an implementation of both here:
https://raw.githubusercontent.com/Jo...dSplitter.jsfx

You can add up to five bands. They are phase matched, so that they sum back exactly to the original signal. In case of the minimum phase ones, they incur some phase distortion, but you'll only notice that if you have another track with the same content running in parallel. If that's the case, and you still need minimum phase, you can look into using the phase matcher, which incurs the same phase distortions:

https://github.com/JoepVanlier/JSFX/...sematcher.jsfx

Tutorial here:
https://www.youtube.com/watch?v=JU_7gIr5RTI

Feel free to use/modify the code in any way you want.
__________________
[Tracker Plugin: Thread|Github|Reapack] | [Routing Plugin: Thread|Reapack] | [Filther: Thread|Github|Reapack] | [More JSFX: Thread|Reapack]
sai'ke is offline   Reply With Quote
Old 04-07-2020, 12:25 PM   #4
ReaNico
Human being with feelings
 
Join Date: Jun 2016
Location: Villa Mercedes, San Luis, Argentina
Posts: 54
Default

Quote:
Originally Posted by xpander View Post
Have you checked Saike's 4-pole BandSplitter/Joiner?
Saike's workshop
Quote:
Originally Posted by sai'ke View Post
Are you looking for a minimum phase or linear phase (this comes at the cost of some performance and latency) one?

You can find an implementation of both here:
https://raw.githubusercontent.com/Jo...dSplitter.jsfx

You can add up to five bands. They are phase matched, so that they sum back exactly to the original signal. In case of the minimum phase ones, they incur some phase distortion, but you'll only notice that if you have another track with the same content running in parallel. If that's the case, and you still need minimum phase, you can look into using the phase matcher, which incurs the same phase distortions:

https://github.com/JoepVanlier/JSFX/...sematcher.jsfx

Tutorial here:
https://www.youtube.com/watch?v=JU_7gIr5RTI

Feel free to use/modify the code in any way you want.
WOW big thanks!!! that is exactly what i'm looking for.
ReaNico is offline   Reply With Quote
Old 04-07-2020, 08:05 PM   #5
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,185
Default

Quote:
Originally Posted by sai'ke View Post
Are you looking for a minimum phase or linear phase (this comes at the cost of some performance and latency) one?

You can find an implementation of both here:
https://raw.githubusercontent.com/Jo...dSplitter.jsfx

You can add up to five bands. They are phase matched, so that they sum back exactly to the original signal. In case of the minimum phase ones, they incur some phase distortion, but you'll only notice that if you have another track with the same content running in parallel. If that's the case, and you still need minimum phase, you can look into using the phase matcher, which incurs the same phase distortions:

https://github.com/JoepVanlier/JSFX/...sematcher.jsfx

Tutorial here:
https://www.youtube.com/watch?v=JU_7gIr5RTI

Feel free to use/modify the code in any way you want.
This is AWESOME to a new degree of AWESOME!!

Thanks for doing this... so talented!
__________________
Cheers,
Andrew K
v6.03+dev0114 - January 14 2020 • Mac 10.12.+ • i7 Quad 2.9GHz • 24GB
Thonex is offline   Reply With Quote
Old 04-10-2020, 01:19 PM   #6
sai'ke
Human being with feelings
 
sai'ke's Avatar
 
Join Date: Aug 2009
Location: NL
Posts: 876
Default

Ghehe, you're welcome guys
__________________
[Tracker Plugin: Thread|Github|Reapack] | [Routing Plugin: Thread|Reapack] | [Filther: Thread|Github|Reapack] | [More JSFX: Thread|Reapack]
sai'ke 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 07:00 AM.


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