Old 06-29-2020, 11:55 PM   #1
zookthespook
Human being with feelings
 
Join Date: Mar 2015
Location: India Mumbai
Posts: 816
Default Adding a mute button to 4band splitter

Hi,
Can someone help me in adding a mute button to the crossover sliders in the JSFX 4band splitter ?
below is the code for the same .

zook
Quote:
// (C) 2006, Michael Gruhn.

// NO WARRANTY IS GRANTED. THIS PLUG-IN IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
// WARRANTY OF ANY KIND. NO LIABILITY IS GRANTED, INCLUDING, BUT NOT LIMITED TO,
// ANY DIRECT OR INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGE ARISING
// OUT OF THE USE OR INABILITY TO USE THIS PLUG-IN, COMPUTER FAILTURE OF
// MALFUNCTION INCLUDED. THE USE OF THE SOURCE CODE, EITHER PARTIALLY OR IN
// TOTAL, IS ONLY GRANTED, IF USED IN THE SENSE OF THE AUTHOR'S INTENTION, AND
// USED WITH ACKNOWLEDGEMENT OF THE AUTHOR. FURTHERMORE IS THIS PLUG-IN A THIRD
// PARTY CONTRIBUTION, EVEN IF INCLUDED IN REAPER(TM), COCKOS INCORPORATED OR
// ITS AFFILIATES HAVE NOTHING TO DO WITH IT. LAST BUT NOT LEAST, BY USING THIS
// PLUG-IN YOU RELINQUISH YOUR CLAIM TO SUE IT'S AUTHOR, AS WELL AS THE CLAIM TO
// ENTRUST SOMEBODY ELSE WITH DOING SO.

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

slider1:200<0,22000,1>Crossover 1 (Hz)
slider2:2000<0,22000,1>Crossover 2 (Hz)
slider3:5000<0,22000,1>Crossover 3 (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
out_pin:uberhigh output left
out_pin:uberhigh output right

@init
cDenorm=10^-30;

@slider

freqHI = max(min(slider3,srate),slider2);
xHI = exp(-2.0*$pi*freqHI/srate);
a0HI = 1.0-xHI;
b1HI = -xHI;

freqMID = max(min(min(slider2,srate),slider3),slider1);
xMID = exp(-2.0*$pi*freqMID/srate);
a0MID = 1.0-xMID;
b1MID = -xMID;

freqLOW = min(min(slider1,srate),slider2);
xLOW = exp(-2.0*$pi*freqLOW/srate);
a0LOW = 1.0-xLOW;
b1LOW = -xLOW;

@sample

s0 = spl0;
s1 = spl1;

low0 = (tmplMID = a0MID*s0 - b1MID*tmplMID + cDenorm);
low1 = (tmprMID = a0MID*s1 - b1MID*tmprMID + cDenorm);

spl0 = (tmplLOW = a0LOW*low0 - b1LOW*tmplLOW + cDenorm);
spl1 = (tmprLOW = a0LOW*low1 - b1LOW*tmprLOW + cDenorm);

spl2 = low0 - spl0;
spl3 = low1 - spl1;

hi0 = s0 - low0;
hi1 = s1 - low1;

spl4 = (tmplHI = a0HI*hi0 - b1HI*tmplHI + cDenorm);
spl5 = (tmprHI = a0HI*hi1 - b1HI*tmprHI + cDenorm);

spl6 = hi0 - spl4;
spl7 = hi1 - spl5;
zookthespook is offline   Reply With Quote
Old 06-30-2020, 12:09 PM   #2
sai'ke
Human being with feelings
 
sai'ke's Avatar
 
Join Date: Aug 2009
Location: NL
Posts: 1,458
Default

I mean, easiest way to just hack it in quick and dirty would be to mute those channels at the end.

Code:
// (C) 2006, Michael Gruhn.

// NO WARRANTY IS GRANTED. THIS PLUG-IN IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
// WARRANTY OF ANY KIND. NO LIABILITY IS GRANTED, INCLUDING, BUT NOT LIMITED TO,
// ANY DIRECT OR INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGE ARISING
// OUT OF THE USE OR INABILITY TO USE THIS PLUG-IN, COMPUTER FAILTURE OF
// MALFUNCTION INCLUDED. THE USE OF THE SOURCE CODE, EITHER PARTIALLY OR IN
// TOTAL, IS ONLY GRANTED, IF USED IN THE SENSE OF THE AUTHOR'S INTENTION, AND
// USED WITH ACKNOWLEDGEMENT OF THE AUTHOR. FURTHERMORE IS THIS PLUG-IN A THIRD
// PARTY CONTRIBUTION, EVEN IF INCLUDED IN REAPER(TM), COCKOS INCORPORATED OR
// ITS AFFILIATES HAVE NOTHING TO DO WITH IT. LAST BUT NOT LEAST, BY USING THIS
// PLUG-IN YOU RELINQUISH YOUR CLAIM TO SUE IT'S AUTHOR, AS WELL AS THE CLAIM TO
// ENTRUST SOMEBODY ELSE WITH DOING SO.

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

slider1:200<0,22000,1>Crossover 1 (Hz)
slider2:2000<0,22000,1>Crossover 2 (Hz)
slider3:5000<0,22000,1>Crossover 3 (Hz)
slider4:mute1=0<0,1,0{Playing,Muted}>Band 1
slider5:mute2=0<0,1,0{Playing,Muted}>Band 2
slider6:mute3=0<0,1,0{Playing,Muted}>Band 3
slider7:mute4=0<0,1,0{Playing,Muted}>Band 4

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
out_pin:uberhigh output left
out_pin:uberhigh output right

@init
cDenorm=10^-30;

@slider

freqHI = max(min(slider3,srate),slider2);
xHI = exp(-2.0*$pi*freqHI/srate);
a0HI = 1.0-xHI;
b1HI = -xHI;

freqMID = max(min(min(slider2,srate),slider3),slider1);
xMID = exp(-2.0*$pi*freqMID/srate);
a0MID = 1.0-xMID;
b1MID = -xMID;

freqLOW = min(min(slider1,srate),slider2);
xLOW = exp(-2.0*$pi*freqLOW/srate);
a0LOW = 1.0-xLOW;
b1LOW = -xLOW;

@sample

s0 = spl0;
s1 = spl1;

low0 = (tmplMID = a0MID*s0 - b1MID*tmplMID + cDenorm);
low1 = (tmprMID = a0MID*s1 - b1MID*tmprMID + cDenorm);

spl0 = (tmplLOW = a0LOW*low0 - b1LOW*tmplLOW + cDenorm);
spl1 = (tmprLOW = a0LOW*low1 - b1LOW*tmprLOW + cDenorm);

spl2 = low0 - spl0;
spl3 = low1 - spl1;

hi0 = s0 - low0;
hi1 = s1 - low1;

spl4 = (tmplHI = a0HI*hi0 - b1HI*tmplHI + cDenorm);
spl5 = (tmprHI = a0HI*hi1 - b1HI*tmprHI + cDenorm);

spl6 = hi0 - spl4;
spl7 = hi1 - spl5;

spl0 *= (1.0 - mute1);
spl1 *= (1.0 - mute1);
spl2 *= (1.0 - mute2);
spl3 *= (1.0 - mute2);
spl4 *= (1.0 - mute3);
spl5 *= (1.0 - mute3);
spl6 *= (1.0 - mute4);
spl7 *= (1.0 - mute4);
If you want a splitter that's a bit steeper, I also have this one:

https://raw.githubusercontent.com/Jo...dSplitter.jsfx
__________________
[Tracker Plugin: Thread|Github|Reapack] | [Routing Plugin: Thread|Reapack] | [More JSFX: Thread|Descriptions|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 12:33 AM.


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