Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //===================================================================================================
- //===================================================================================================
- //===================================================================================================
- //This is a modificatin of a software by Philip S. Considine. The license is the same as the original,
- //which is displayed below:
- //===================================================================================================
- //===================================================================================================
- //===================================================================================================
- /*******************************************************************************
- * Copyright 2007 - 2011, Philip S. Considine *
- * This program is free software: you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation, either version 3 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License (http://www.gnu.org/licenses/)for more details. *
- *******************************************************************************/
- desc:8x Stereo to 1x Stereo Mixer
- desc:8x Stereo to 1x Stereo Mixer [IXix]
- //tags: mixer gain
- //author: IXix
- slider1:0<-60,30,0.1>Level 1 (dB)
- slider2:0<-60,30,0.1>Level 2 (dB)
- slider3:0<-60,30,0.1>Level 3 (dB)
- slider4:0<-60,30,0.1>Level 4 (dB)
- in_pin:input 1
- in_pin:input 2
- in_pin:input 3
- in_pin:input 4
- out_pin:output 1
- out_pin:output 2
- out_pin:output 3
- out_pin:output 4
- ///////////////////////////////////////////////////////////////////////////////
- @init
- gainMin = -60;
- gainMax = 30;
- ///////////////////////////////////////////////////////////////////////////////
- @slider
- slider1 = min(max(slider1, gainMin), gainMax);
- slider2 = min(max(slider2, gainMin), gainMax);
- slider3 = min(max(slider3, gainMin), gainMax);
- slider4 = min(max(slider4, gainMin), gainMax);
- levelA = 2 ^ (slider1 / 6);
- levelB = 2 ^ (slider2 / 6);
- levelC = 2 ^ (slider3 / 6);
- levelD = 2 ^ (slider4 / 6);
- ///////////////////////////////////////////////////////////////////////////////
- @sample
- // Do the left mix
- spl0 = (spl0 * levelA);
- spl1 = (spl1 * levelB);
- spl2 = (spl2 * levelC);
- spl3 = (spl3 * levelD);
Advertisement
Add Comment
Please, Sign In to add comment