Exemplo n.º 1
0
        public static WavesSSLChannel ToWavesSSLChannel(this UADSSLChannel uadSSLChannel)
        {
            var wavesSSLChannel = new WavesSSLChannel();

            wavesSSLChannel.PresetName          = uadSSLChannel.PresetName;
            wavesSSLChannel.PresetGenericType   = "SLCH";
            wavesSSLChannel.PresetGroup         = null;
            wavesSSLChannel.PresetPluginName    = "SSLChannel";
            wavesSSLChannel.PresetPluginSubComp = "SCHS";
            wavesSSLChannel.PresetPluginVersion = "9.92.0.45";
            wavesSSLChannel.PresetActiveSetup   = "SETUP_A";
            wavesSSLChannel.PresetSetupName     = "";

            wavesSSLChannel.CompThreshold  = uadSSLChannel.FindClosestParameterValue("CMP Thresh", uadSSLChannel.CMPThresh);
            wavesSSLChannel.CompRatio      = uadSSLChannel.FindClosestParameterValue("CMP Ratio", uadSSLChannel.CMPRatio);
            wavesSSLChannel.CompFastAttack = uadSSLChannel.CMPAttack == 1 ? true : false;
            wavesSSLChannel.CompRelease    = uadSSLChannel.FindClosestParameterValue("CMP Release", uadSSLChannel.CMPRelease);

            wavesSSLChannel.ExpThreshold = uadSSLChannel.FindClosestParameterValue("EXP Thresh", uadSSLChannel.EXPThresh);
            wavesSSLChannel.ExpRange     = uadSSLChannel.FindClosestParameterValue("EXP Range", uadSSLChannel.EXPRange);

            wavesSSLChannel.ExpGate = uadSSLChannel.Select >= 0.25 ? true : false;

            wavesSSLChannel.ExpFastAttack = uadSSLChannel.EXPAttack == 1 ? true : false;
            wavesSSLChannel.ExpRelease    = uadSSLChannel.FindClosestParameterValue("EXP Release", uadSSLChannel.EXPRelease);

            wavesSSLChannel.DynToByPass     = uadSSLChannel.DYNIn == 0 ? true : false;
            wavesSSLChannel.DynToChannelOut = uadSSLChannel.PreDyn == 1 ? true : false;

            wavesSSLChannel.LFTypeBell = uadSSLChannel.LFBell == 1 ? true : false;
            wavesSSLChannel.LFGain     = uadSSLChannel.FindClosestParameterValue("LF Gain", uadSSLChannel.LFGain);
            wavesSSLChannel.LFFrq      = uadSSLChannel.FindClosestParameterValue("LF Freq", uadSSLChannel.LFFreq);

            wavesSSLChannel.LMFGain = uadSSLChannel.FindClosestParameterValue("LMF Gain", uadSSLChannel.LMFGain);
            wavesSSLChannel.LMFFrq  = uadSSLChannel.FindClosestParameterValue("LMF Freq", uadSSLChannel.LMFFreq) / 1000;
            wavesSSLChannel.LMFQ    = uadSSLChannel.FindClosestParameterValue("LMF Q", uadSSLChannel.LMFQ);

            wavesSSLChannel.HMFGain = uadSSLChannel.FindClosestParameterValue("HMF Gain", uadSSLChannel.HMFGain);
            wavesSSLChannel.HMFFrq  = uadSSLChannel.FindClosestParameterValue("HMF Freq", uadSSLChannel.HMFFreq) / 1000;
            wavesSSLChannel.HMFQ    = uadSSLChannel.FindClosestParameterValue("HMF Q", uadSSLChannel.HMFQ);

            wavesSSLChannel.HFTypeBell = uadSSLChannel.HFBell == 1 ? true : false;
            wavesSSLChannel.HFGain     = uadSSLChannel.FindClosestParameterValue("HF Gain", uadSSLChannel.HFGain);
            wavesSSLChannel.HFFrq      = uadSSLChannel.FindClosestParameterValue("HF Freq", uadSSLChannel.HFFreq) / 1000;

            wavesSSLChannel.EQToBypass = uadSSLChannel.EQIn == 0 ? true : false;
            wavesSSLChannel.EQToDynSC  = uadSSLChannel.EQDynSC == 1 ? true : false;

            wavesSSLChannel.HPFrq = uadSSLChannel.FindClosestParameterValue("HP Freq", uadSSLChannel.HPFreq);

            if (uadSSLChannel.LPFreq == 0)
            {
                wavesSSLChannel.LPFrq = 30;
            }
            else
            {
                wavesSSLChannel.LPFrq = uadSSLChannel.FindClosestParameterValue("LP Freq", uadSSLChannel.LPFreq) / 1000;
            }

            wavesSSLChannel.FilterSplit = true;

            wavesSSLChannel.Gain         = uadSSLChannel.FindClosestParameterValue("Output", uadSSLChannel.Output);
            wavesSSLChannel.Analog       = false;
            wavesSSLChannel.VUShowOutput = true;
            wavesSSLChannel.PhaseReverse = uadSSLChannel.Phase == 1 ? true : false;
            wavesSSLChannel.InputTrim    = uadSSLChannel.FindClosestParameterValue("Input", uadSSLChannel.Input);

            return(wavesSSLChannel);
        }
        public static UADSSLChannel ToUADSSLChannel(this WavesSSLChannel wavesSSLChannel)
        {
            var uadSSLChannel = new UADSSLChannel();

            uadSSLChannel.PresetName = wavesSSLChannel.PresetName;

            uadSSLChannel.CMPThresh  = uadSSLChannel.FindClosestValue("CMP Thresh", wavesSSLChannel.CompThreshold);
            uadSSLChannel.CMPRatio   = uadSSLChannel.FindClosestValue("CMP Ratio", wavesSSLChannel.CompRatio);
            uadSSLChannel.CMPAttack  = Convert.ToSingle(wavesSSLChannel.CompFastAttack);
            uadSSLChannel.CMPRelease = uadSSLChannel.FindClosestValue("CMP Release", wavesSSLChannel.CompRelease);

            uadSSLChannel.EXPThresh = uadSSLChannel.FindClosestValue("EXP Thresh", wavesSSLChannel.ExpThreshold);
            uadSSLChannel.EXPRange  = uadSSLChannel.FindClosestValue("EXP Range", wavesSSLChannel.ExpRange);
            if (wavesSSLChannel.ExpGate)
            {
                uadSSLChannel.Select = uadSSLChannel.FindClosestValue("Select", 0.5f);
            }
            else
            {
                uadSSLChannel.Select = uadSSLChannel.FindClosestValue("Select", 0.0f);
            }
            uadSSLChannel.EXPAttack  = Convert.ToSingle(wavesSSLChannel.ExpFastAttack);
            uadSSLChannel.EXPRelease = uadSSLChannel.FindClosestValue("EXP Release", wavesSSLChannel.ExpRelease);
            uadSSLChannel.ExpIn      = 1.0f;

            uadSSLChannel.CompIn = Convert.ToSingle(!wavesSSLChannel.DynToByPass);
            uadSSLChannel.DYNIn  = Convert.ToSingle(!wavesSSLChannel.DynToByPass);
            uadSSLChannel.PreDyn = Convert.ToSingle(wavesSSLChannel.DynToChannelOut);

            uadSSLChannel.LFBell = Convert.ToSingle(wavesSSLChannel.LFTypeBell);
            uadSSLChannel.LFGain = uadSSLChannel.FindClosestValue("LF Gain", wavesSSLChannel.LFGain);
            uadSSLChannel.LFFreq = uadSSLChannel.FindClosestValue("LF Freq", wavesSSLChannel.LFFrq);

            uadSSLChannel.LMFGain = uadSSLChannel.FindClosestValue("LMF Gain", wavesSSLChannel.LMFGain);
            uadSSLChannel.LMFFreq = uadSSLChannel.FindClosestValue("LMF Freq", wavesSSLChannel.LMFFrq * 1000);
            uadSSLChannel.LMFQ    = uadSSLChannel.FindClosestValue("LMF Q", wavesSSLChannel.LMFQ);

            uadSSLChannel.HMFGain = uadSSLChannel.FindClosestValue("HMF Gain", wavesSSLChannel.HMFGain);
            uadSSLChannel.HMFFreq = uadSSLChannel.FindClosestValue("HMF Freq", wavesSSLChannel.HMFFrq * 1000);
            uadSSLChannel.HMFQ    = uadSSLChannel.FindClosestValue("HMF Q", wavesSSLChannel.HMFQ);

            uadSSLChannel.HFBell = Convert.ToSingle(wavesSSLChannel.HFTypeBell);
            uadSSLChannel.HFGain = uadSSLChannel.FindClosestValue("HF Gain", wavesSSLChannel.HFGain);
            uadSSLChannel.HFFreq = uadSSLChannel.FindClosestValue("HF Freq", wavesSSLChannel.HFFrq * 1000);

            uadSSLChannel.EQIn    = Convert.ToSingle(!wavesSSLChannel.EQToBypass);
            uadSSLChannel.EQDynSC = Convert.ToSingle(wavesSSLChannel.EQToDynSC);

            uadSSLChannel.HPFreq = uadSSLChannel.FindClosestValue("HP Freq", wavesSSLChannel.HPFrq);
            if (wavesSSLChannel.LPFrq == 30)
            {
                uadSSLChannel.LPFreq = 0;
            }
            else
            {
                uadSSLChannel.LPFreq = uadSSLChannel.FindClosestValue("LP Freq", wavesSSLChannel.LPFrq * 1000);
            }
            //wavesSSLChannel.FilterSplit;

            uadSSLChannel.Output = uadSSLChannel.FindClosestValue("Output", wavesSSLChannel.Gain);
            //wavesSSLChannel.Analog;
            //wavesSSLChannel.VUShowOutput;
            uadSSLChannel.Phase = Convert.ToSingle(wavesSSLChannel.PhaseReverse);
            uadSSLChannel.Input = uadSSLChannel.FindClosestValue("Input", wavesSSLChannel.InputTrim);

            uadSSLChannel.EQType     = 0.0f; // Black EQ Type
            uadSSLChannel.StereoLink = 1.0f;
            uadSSLChannel.Power      = 1.0f;

            return(uadSSLChannel);
        }