public void LoadChannelStrips(Preferences form, Panel prefsPanel, int width = 0, int height = 0)
        {
            _paramInfo = new BASS_VST_PARAM_INFO();
            int c = BassVst.BASS_VST_GetParamCount(VstEffectHandle);

            for (int i = 0; i < c; i++)
            {
                // get the info about the parameter
                _paramValue = BassVst.BASS_VST_GetParam(VstEffectHandle, i);
                BassVst.BASS_VST_GetParamInfo(VstEffectHandle, i, _paramInfo);
                _paramValue = BassVst.BASS_VST_GetParam(VstEffectHandle, i);
                Console.WriteLine(_paramInfo.ToString() + " : " + _paramValue.ToString());
            }

            // show the embedded editor
            _vstInfo = new BASS_VST_INFO();
            if (BassVst.BASS_VST_GetInfo(VstEffectHandle, _vstInfo) && _vstInfo.hasEditor)
            {
                form.Closing += new CancelEventHandler(f_Closing);
                //form.Text = _vstInfo.effectName + " " + Effects.GetorSetFx;

                BassVst.BASS_VST_EmbedEditor(VstEffectHandle, prefsPanel.Handle);

                _vstEffectHandle = VstEffectHandle;
            }
        }
示例#2
0
        private static void LoadPluginParameters(VstPlugin plugin)
        {
            plugin.Parameters = new List <VstPlugin.VstPluginParameter>();

            if (plugin.Name.Contains("mania"))
            {
                Console.WriteLine("mani");
            }

            var parameterCount = BassVst.BASS_VST_GetParamCount(plugin.Id);

            for (var i = 0; i < parameterCount; i++)
            {
                var parameterInfo = BassVst.BASS_VST_GetParamInfo(plugin.Id, i);

                var name = parameterInfo.name.Trim();
                if (string.IsNullOrWhiteSpace(name) || name.ToLower().StartsWith("unused"))
                {
                    continue;
                }

                var parameter = new VstPlugin.VstPluginParameter
                {
                    Id   = i,
                    Name = parameterInfo.name
                };

                LoadPresetParameterValues(plugin, parameter);

                plugin.Parameters.Add(parameter);
            }
        }
        /// <summary>
        ///     Sets the VST plug-in settings.
        /// </summary>
        /// <param name="plugin">The plug-in.</param>
        /// <param name="parameters">The parameters.</param>
        public static void SetVstPluginParameters(VstPlugin plugin, string parameters)
        {
            if (parameters.Trim() == "")
            {
                return;
            }
            var values         = parameters.Split(',').ToList();
            var parameterCount = BassVst.BASS_VST_GetParamCount(plugin.Id);

            for (var i = 0; i < parameterCount; i++)
            {
                try
                {
                    if (i >= values.Count)
                    {
                        continue;
                    }
                    var value = float.Parse(values[i]);
                    BassVst.BASS_VST_SetParam(plugin.Id, i, value);
                }
                catch
                {
                    // ignored
                }
            }
        }
        /// <summary>
        ///     Gets the VST plug-in settings.
        /// </summary>
        /// <param name="plugin">The plug-in.</param>
        /// <returns>The settings as a key=value comma delimited list</returns>
        public static string GetVstPluginParameters(VstPlugin plugin)
        {
            var values         = new List <string>();
            var parameterCount = BassVst.BASS_VST_GetParamCount(plugin.Id);

            for (var i = 0; i < parameterCount; i++)
            {
                var value = BassVst.BASS_VST_GetParam(plugin.Id, i);
                values.Add(value.ToString(CultureInfo.InvariantCulture));
            }
            return(string.Join(",", values.ToArray()));
        }
示例#5
0
        public static void SetEffects(int stream)
        {
            //EQ 1 Band -----------------
            _vstEffectReverb = BassVst.BASS_VST_ChannelSetDSP(stream, m_vst_plugin_Path + @"OrilRiver.dll", BASSVSTDsp.BASS_VST_DEFAULT, 15);

            int rev = BassVst.BASS_VST_GetParamCount(_vstEffectReverb);

            for (int i = 0; i < rev; i++)
            {
                //  BassVst.BASS_VST_SetParam(_vstEffectReverb, 0, 0.2540541f);
                //  BassVst.BASS_VST_SetParam(_vstEffectReverb, 17, 0.8810811f);
                //  BassVst.BASS_VST_SetParam(_vstEffectReverb, 18, 0.4432433f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 0, 0.4972973f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 1, 0.03f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 2, 1);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 3, 0);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 4, 0.5f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 5, 0.3574602f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 6, 0.83f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 7, 0.2f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 8, 0.38f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 9, 0.4676717f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 10, 0.5414235f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 11, 0.4f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 12, 0.7827124f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 13, 0.585f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 14, 0.863937f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 15, 0);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 16, 0.9354057f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 17, 0.835603f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 18, 0.4120975f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 19, 0);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 20, 0);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 21, 0);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 22, 0);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 23, 0.1765174f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 24, 1);
            }

            _vstBasicStrip = BassVst.BASS_VST_ChannelSetDSP(stream, m_vst_plugin_Path + @"BasicStrip3.dll", BASSVSTDsp.BASS_VST_DEFAULT, 16);

            int strip = BassVst.BASS_VST_GetParamCount(_vstBasicStrip);

            for (int i = 0; i < strip; i++)
            {
                BassVst.BASS_VST_SetParam(_vstBasicStrip, 0, 0.81f);
                BassVst.BASS_VST_SetParam(_vstBasicStrip, 1, 0.5f);
            }
        }
        public void Show(int width = 0, int height = 0)
        {
            // if (_vstEffectHandle != 0)
            // {
            //      return;
            // }

            _paramInfo = new BASS_VST_PARAM_INFO();
            int c = BassVst.BASS_VST_GetParamCount(VstEffectHandle);

            for (int i = 0; i < c; i++)
            {
                // get the info about the parameter
                _paramValue = BassVst.BASS_VST_GetParam(VstEffectHandle, i);
                BassVst.BASS_VST_GetParamInfo(VstEffectHandle, i, _paramInfo);
                _paramValue = BassVst.BASS_VST_GetParam(VstEffectHandle, i);
                Console.WriteLine(_paramInfo.ToString() + " : " + _paramValue.ToString());
            }

            // show the embedded editor
            _vstInfo = new BASS_VST_INFO();
            if (BassVst.BASS_VST_GetInfo(VstEffectHandle, _vstInfo) && _vstInfo.hasEditor)
            {
                // create a new System.Windows.Forms.Form
                Form f = new Form();
                if (width != 0 && height != 0)
                {
                    f.ClientSize = new Size(width, height);
                }
                else
                {
                    f.ClientSize = new Size(_vstInfo.editorWidth, _vstInfo.editorHeight);
                }

                f.MaximizeBox     = false;
                f.MinimizeBox     = false;
                f.FormBorderStyle = FormBorderStyle.FixedSingle;
                f.Closing        += new CancelEventHandler(f_Closing);
                f.Text            = _vstInfo.effectName + " " + Effects.GetorSetFx;
                f.Show();

                BassVst.BASS_VST_EmbedEditor(VstEffectHandle, f.Handle);

                _vstEffectHandle = VstEffectHandle;
            }
        }
示例#7
0
文件: BASSControl.cs 项目: walney/KMC
        public static void InitializeDummyVSTs()
        {
            try
            {
                if (MainWindow.KMCStatus.VSTMode == true)
                {
                    if (Properties.Settings.Default.LoudMaxEnabled == true && MainWindow.KMCStatus.RenderingMode == true)
                    {
                        BASS_VST_INFO LMInfo = new BASS_VST_INFO();
                        MainWindow.VSTs._DummyLoudMaxHan = BassVst.BASS_VST_ChannelSetDSP(0,
                                                                                          String.Format("{0}\\LoudMax.dll", Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)),
                                                                                          BASSVSTDsp.BASS_VST_KEEP_CHANS, 0);
                        BassVst.BASS_VST_GetInfo(MainWindow.VSTs._LoudMaxHan, LMInfo);

                        BASSVSTShowDialog(false, 0, MainWindow.VSTs._DummyLoudMaxHan, LMInfo);
                    }


                    for (int i = 0; i <= 7; i++)
                    {
                        if (!MainWindow.VSTs.VSTInfo[i].isInstrument) // VSTi check
                        {
                            MainWindow.VSTs._DummyVSTHandles[i] = BassVst.BASS_VST_ChannelSetDSP(0, MainWindow.VSTs.VSTDLLs[i], BASSVSTDsp.BASS_VST_DEFAULT, 0);

                            if (MainWindow.VSTs._DummyVSTHandles[i] != 0)
                            {
                                int vstParams = BassVst.BASS_VST_GetParamCount(MainWindow.VSTs._DummyVSTHandles[i]);

                                if (BassVst.BASS_VST_GetInfo(MainWindow.VSTs._DummyVSTHandles[i], MainWindow.VSTs.VSTInfo[i]) && MainWindow.VSTs.VSTInfo[i].hasEditor)
                                {
                                    BASSVSTShowDialog(false, 0, MainWindow.VSTs._DummyVSTHandles[i], MainWindow.VSTs.VSTInfo[i]);
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                BASSCloseStreamCrash(ex);
            }
        }
示例#8
0
        List <float> VST_GET_PARAM(int vstHandle)
        {
            List <float> rez = new List <float>();

            try
            {
                int vstParams = BassVst.BASS_VST_GetParamCount(vstHandle);
                // create a paramInfo object
                BASS_VST_PARAM_INFO paramInfo = new BASS_VST_PARAM_INFO();
                for (int i = 0; i < vstParams; i++)
                {
                    // get the info about the parameter
                    float paramValue = BassVst.BASS_VST_GetParam(vstHandle, i);
                    // and get further info about the parameter
                    BassVst.BASS_VST_GetParamInfo(vstHandle, i, paramInfo);
                    rez.Add(paramValue);
                    Trace.WriteLine("GETparam: " + paramInfo.ToString() + " = " + paramValue.ToString());
                }
            }
            catch (Exception ex) { System.Windows.MessageBox.Show(ex.Message); }
            return(rez);
        }
示例#9
0
        /// <summary>
        /// This routine is called, whenever a change is done in the VST Editor
        /// </summary>
        /// <param name="vstEditor"></param>
        /// <param name="action"></param>
        /// <param name="param1"></param>
        /// <param name="param2"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        private int vstEditorCallBack(int vstEditor, BASSVSTAction action, int param1, int param2, IntPtr user)
        {
            switch (action)
            {
            case BASSVSTAction.BASS_VST_PARAM_CHANGED:
                // Some slider has been changed in the editor
                BASS_VST_PARAM_INFO paramInfo = new BASS_VST_PARAM_INFO();
                for (int i = BassVst.BASS_VST_GetParamCount(vstEditor) - 1; i >= 0; i--)
                {
                    BassVst.BASS_VST_SetParam(_vstHandle, i, BassVst.BASS_VST_GetParam(vstEditor, i));
                    BassVst.BASS_VST_GetParamInfo(_vstHandle, i, paramInfo);
                }
                break;

            case BASSVSTAction.BASS_VST_EDITOR_RESIZED:
                // the editor window requests a new size,
                break;

            case BASSVSTAction.BASS_VST_AUDIO_MASTER:
                break;
            }
            return(0);
        }
示例#10
0
        public static void SetEffects(int stream)
        {
            string plugin_path = "";

            if (EffectsInteface.Is64Bit())
            {
                plugin_path = m_vst_plugin_PathX64;
            }
            else
            {
                plugin_path = m_vst_plugin_Path;
            }

            //EQ 1 Band -----------------
            _vstEffectEQ1band = BassVst.BASS_VST_ChannelSetDSP(stream, m_vst_plugin_Path + @"TDR Nova_1_0.dll", BASSVSTDsp.BASS_VST_DEFAULT, 5);

            int eq1_1 = BassVst.BASS_VST_GetParamCount(_vstEffectEQ1band);

            for (int i = 0; i < eq1_1; i++)
            {
                BassVst.BASS_VST_SetParam(_vstEffectEQ1band, i, AppSettings.Get <float>("CH2EQ1band" + i));
            }

            /*  for (int i = 0; i < eq1_1; i++)
             * {
             *    // get the info about the parameter
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 0, 0);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 1, 1);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 4, 0.260f);
             *    //  BassVst.BASS_VST_SetParam(_vstEffectEQ1band[0], 5, 1);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 12, 0);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 13, 0);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 24, 0);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 25, 0);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 36, 0);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 37, 0);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 48, 1);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 49, 1);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 50, 0.260f);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 51, 0.6666667f);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 69, 0.0f);
             * }*/
            //EQ1Band();

            //Compressor
            _vstEffectCompressor = BassVst.BASS_VST_ChannelSetDSP(stream, m_vst_plugin_Path + @"MCompressor_1.dll", BASSVSTDsp.BASS_VST_DEFAULT, 6);

            int comp1_1 = BassVst.BASS_VST_GetParamCount(_vstEffectCompressor);

            for (int i = 0; i < comp1_1; i++)
            {
                BassVst.BASS_VST_SetParam(_vstEffectCompressor, i, AppSettings.Get <float>("CH2Comp" + i));
            }

            /* for (int i = 0; i < comp1_1; i++)
             * {
             *   // get the info about the parameter
             *
             *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 0, 0.5f);
             *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 1, 0.5f);
             *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 2, 0.3162278f);
             *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 3, 0.3162278f);
             *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 4, 0.1f);
             *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 5, 0.3444445f);
             *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 6, 0.2357953f);
             *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 7, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 8, 0.25f);
             *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 9, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 10, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 11, 0);
             *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 12, 0.5f);
             *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 13, 0.5f);
             *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 14, 0.5f);
             *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 15, 0.5f);
             *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 16, 0);
             *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 17, 0);
             * }*/
            //Compressor();

            //EQ4Band -----
            _vstEffectEQ4Band = BassVst.BASS_VST_ChannelSetDSP(stream, m_vst_plugin_Path + @"TDR Nova_1_1.dll", BASSVSTDsp.BASS_VST_DEFAULT, 7);
            int eq7_1 = BassVst.BASS_VST_GetParamCount(_vstEffectEQ4Band);

            for (int i = 0; i < eq7_1; i++)
            {
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, i, AppSettings.Get <float>("CH2EQ4band" + i));
            }


            /* for (int i = 0; i < eq7_1; i++)
             * {
             *   // get the info about the parameter
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 0, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 1, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 3, 0.563f);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 4, 0.278f);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 5, 0);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 12, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 13, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 15, 0.563f);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 16, 0.361f); //Band 2 F
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 24, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 25, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 27, 0.563f);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 28, 0.63883f); //Band 3 F
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 36, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 37, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 39, 0.563f);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 40, 0.7712674f); //Band 4 F
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 41, 1); //Band 4 T
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 69, 0.0f);
             * }*/

            _vstEffectDeEsser = BassVst.BASS_VST_ChannelSetDSP(stream, m_vst_plugin_Path + @"MCompressor_1_D-Es.dll", BASSVSTDsp.BASS_VST_DEFAULT, 8);

            int deEs = BassVst.BASS_VST_GetParamCount(_vstEffectDeEsser);

            for (int i = 0; i < deEs; i++)
            {
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, i, AppSettings.Get <float>("CH2DeEsser" + i));
            }

            /* for (int i = 0; i < deEs; i++)
             * {
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 0, 0.5f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 1, 0.2288729f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 2, 0.3162278f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 3, 0.4728708f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 4, 0.1f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 5, 0.1713131f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 6, 0.3978892f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 7, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 8, 0.25f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 9, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 10, 0);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 11, 0);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 12, 0.5f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 13, 0.5f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 14, 0.5f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 15, 0.5f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 16, 0);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 17, 0);
             * } */

            _vstBasicStrip = BassVst.BASS_VST_ChannelSetDSP(stream, m_vst_plugin_Path + @"BasicStrip1.dll", BASSVSTDsp.BASS_VST_DEFAULT, 9);

            int strip = BassVst.BASS_VST_GetParamCount(_vstBasicStrip);

            for (int i = 0; i < strip; i++)
            {
                BassVst.BASS_VST_SetParam(_vstBasicStrip, 0, 1.0f);
                BassVst.BASS_VST_SetParam(_vstBasicStrip, 1, 0.5f);
            }

            m_VstProc = new VSTPROC(VstProc_CallBack);
            BassVst.BASS_VST_SetCallback(_vstBasicStrip, m_VstProc, IntPtr.Zero);
        }
示例#11
0
        /// <summary>
        /// Save Effects Settings
        /// </summary>
        public override void SaveSettings()
        {
            Settings.Instance.MusicDirectory = _initialMusicDirectory;

            // Settings for BASS DSP/FX
            Settings.Instance.BassEffects.Clear();
            BassEffect basseffect;

            // Gain
            if (textBoxGainDBValue.Text != "0")
            {
                basseffect            = new BassEffect();
                basseffect.EffectName = "Gain";
                basseffect.Parameter.Add(new BassEffectParm("Gain_dbV", textBoxGainDBValue.Text));
                Settings.Instance.BassEffects.Add(basseffect);
            }

            // Dynamic Amplification
            if (checkBoxDAmp.Checked)
            {
                basseffect            = new BassEffect();
                basseffect.EffectName = "DynAmp";
                basseffect.Parameter.Add(new BassEffectParm("Preset", comboBoxDynamicAmplification.SelectedIndex.ToString()));
                Settings.Instance.BassEffects.Add(basseffect);
            }

            // Compressor
            if (checkBoxCompressor.Checked)
            {
                basseffect            = new BassEffect();
                basseffect.EffectName = "Compressor";
                basseffect.Parameter.Add(new BassEffectParm("Threshold", trackBarCompressor.Value.ToString()));
                Settings.Instance.BassEffects.Add(basseffect);
            }

            // Settings for VST Plugings
            Settings.Instance.VSTPlugins.Clear();
            VSTPlugin vstplugin;

            foreach (string plugindll in _vstHandles.Keys)
            {
                vstplugin           = new VSTPlugin();
                vstplugin.PluginDll = plugindll;
                _vstHandle          = _vstHandles[plugindll];
                BASS_VST_PARAM_INFO paramInfo = new BASS_VST_PARAM_INFO();
                for (int i = BassVst.BASS_VST_GetParamCount(_vstHandle) - 1; i >= 0; i--)
                {
                    BassVst.BASS_VST_GetParamInfo(_vstHandle, i, paramInfo);
                    float value = BassVst.BASS_VST_GetParam(_vstHandle, i);
                    vstplugin.Parameter.Add(new VSTPluginParm(paramInfo.name, i, value.ToString()));
                }
                Settings.Instance.VSTPlugins.Add(vstplugin);
            }

            // Settings for WinAmpPlugins
            WinAmpPlugin winampplugin;

            // Clear all settings first
            Settings.Instance.WinAmpPlugins.Clear();
            foreach (DSPPluginInfo pluginInfo in listBoxSelectedPlugins.Items)
            {
                if (pluginInfo.DSPPluginType == DSPPluginInfo.PluginType.Winamp)
                {
                    winampplugin           = new WinAmpPlugin();
                    winampplugin.PluginDll = pluginInfo.FilePath;
                    Settings.Instance.WinAmpPlugins.Add(winampplugin);
                }
            }
            Settings.SaveSettings();
        }
示例#12
0
        public static void SetEffects(int stream)
        {
            string plugin_path = "";

            if (EffectsInteface.Is64Bit())
            {
                plugin_path = m_vst_plugin_PathX64;
            }
            else
            {
                plugin_path = m_vst_plugin_Path;
            }

            //EQ 1 Band -----------------
            _vstEffectEQ1band = BassVst.BASS_VST_ChannelSetDSP(stream, m_vst_plugin_Path + @"TDR Nova_2_0.dll", BASSVSTDsp.BASS_VST_DEFAULT, 10);

            int eq1_1 = BassVst.BASS_VST_GetParamCount(_vstEffectEQ1band);

            for (int i = 0; i < eq1_1; i++)
            {
                // get the info about the parameter
                BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 0, 0);
                BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 1, 1);
                BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 4, 0.260f);
                //  BassVst.BASS_VST_SetParam(_vstEffectEQ1band[0], 5, 1);
                BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 12, 0);
                BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 13, 0);
                BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 24, 0);
                BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 25, 0);
                BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 36, 0);
                BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 37, 0);
                BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 48, 1);
                BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 49, 1);
                BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 50, 0.260f);
                BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 51, 0.6666667f);
                BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 69, 0.0f);
            }
            //EQ1Band();

            //Compressor
            _vstEffectCompressor = BassVst.BASS_VST_ChannelSetDSP(stream, m_vst_plugin_Path + @"MCompressor_2.dll", BASSVSTDsp.BASS_VST_DEFAULT, 11);

            int comp1_1 = BassVst.BASS_VST_GetParamCount(_vstEffectCompressor);

            for (int i = 0; i < comp1_1; i++)
            {
                // get the info about the parameter

                /* BassVst.BASS_VST_SetParam(_vstEffectCompressor, 0, 0.520f);
                 * BassVst.BASS_VST_SetParam(_vstEffectCompressor, 1, 0.406f);
                 * BassVst.BASS_VST_SetParam(_vstEffectCompressor, 2, 0.0f);
                 * BassVst.BASS_VST_SetParam(_vstEffectCompressor, 3, 0.017f);
                 * BassVst.BASS_VST_SetParam(_vstEffectCompressor, 4, 0.0745f);
                 * BassVst.BASS_VST_SetParam(_vstEffectCompressor, 5, 0);*/
                BassVst.BASS_VST_SetParam(_vstEffectCompressor, 0, 0.5f);
                BassVst.BASS_VST_SetParam(_vstEffectCompressor, 1, 0.5f);
                BassVst.BASS_VST_SetParam(_vstEffectCompressor, 2, 0.3162278f);
                BassVst.BASS_VST_SetParam(_vstEffectCompressor, 3, 0.3162278f);
                BassVst.BASS_VST_SetParam(_vstEffectCompressor, 4, 0.1f);
                BassVst.BASS_VST_SetParam(_vstEffectCompressor, 5, 0.3444445f);
                BassVst.BASS_VST_SetParam(_vstEffectCompressor, 6, 0.2357953f);
                BassVst.BASS_VST_SetParam(_vstEffectCompressor, 7, 1);
                BassVst.BASS_VST_SetParam(_vstEffectCompressor, 8, 0.25f);
                BassVst.BASS_VST_SetParam(_vstEffectCompressor, 9, 1);
                BassVst.BASS_VST_SetParam(_vstEffectCompressor, 10, 1);
                BassVst.BASS_VST_SetParam(_vstEffectCompressor, 11, 0);
                BassVst.BASS_VST_SetParam(_vstEffectCompressor, 12, 0.5f);
                BassVst.BASS_VST_SetParam(_vstEffectCompressor, 13, 0.5f);
                BassVst.BASS_VST_SetParam(_vstEffectCompressor, 14, 0.5f);
                BassVst.BASS_VST_SetParam(_vstEffectCompressor, 15, 0.5f);
                BassVst.BASS_VST_SetParam(_vstEffectCompressor, 16, 0);
                BassVst.BASS_VST_SetParam(_vstEffectCompressor, 17, 0);
            }
            //Compressor();

            //EQ4Band -----
            _vstEffectEQ4Band = BassVst.BASS_VST_ChannelSetDSP(stream, m_vst_plugin_Path + @"TDR Nova_2_1.dll", BASSVSTDsp.BASS_VST_DEFAULT, 12);
            int eq7_1 = BassVst.BASS_VST_GetParamCount(_vstEffectEQ4Band);

            for (int i = 0; i < eq7_1; i++)
            {
                // get the info about the parameter
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 0, 1);
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 1, 1);
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 3, 0.563f);
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 4, 0.278f);
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 5, 0);
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 12, 0);
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 13, 0);
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 15, 0.563f);
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 16, 0.361f); //Band 2 F
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 24, 0);
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 25, 0);
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 27, 0.563f);
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 28, 0.63883f); //Band 3 F
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 36, 1);
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 37, 1);
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 39, 0.563f);
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 40, 0.7712674f); //Band 4 F
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 41, 1);          //Band 4 T
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 48, 1);          //HP Selec
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 49, 1);          //HP Activ
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 50, 0.4586f);
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 51, 0.25f);
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 52, 1);          //LP Selec
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 53, 1);          //LP Activ
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 54, 0.7812674f); //LP Frequ
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 55, 0.6666667f);
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 69, 0.0f);
            }

            _vstEffectDeEsser = BassVst.BASS_VST_ChannelSetDSP(stream, m_vst_plugin_Path + @"MCompressor_2_D-Es.dll", BASSVSTDsp.BASS_VST_DEFAULT, 13);

            int deEs = BassVst.BASS_VST_GetParamCount(_vstEffectDeEsser);

            for (int i = 0; i < deEs; i++)
            {
                /* BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 0, 0.4724762f);
                 * BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 1, 0.3333333f);
                 * BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 2, 0.3923903f);*/
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 0, 0.5f);
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 1, 0.2288729f);
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 2, 0.3162278f);
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 3, 0.4728708f);
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 4, 0.1f);
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 5, 0.1713131f);
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 6, 0.3978892f);
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 7, 1);
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 8, 0.25f);
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 9, 1);
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 10, 0);
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 11, 0);
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 12, 0.5f);
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 13, 0.5f);
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 14, 0.5f);
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 15, 0.5f);
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 16, 0);
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 17, 0);
            }

            _vstBasicStrip = BassVst.BASS_VST_ChannelSetDSP(stream, m_vst_plugin_Path + @"BasicStrip2.dll", BASSVSTDsp.BASS_VST_DEFAULT, 14);

            int strip = BassVst.BASS_VST_GetParamCount(_vstBasicStrip);

            for (int i = 0; i < strip; i++)
            {
                BassVst.BASS_VST_SetParam(_vstBasicStrip, 0, 1.0f);
                BassVst.BASS_VST_SetParam(_vstBasicStrip, 1, 0.5f);
            }

            m_stripParamDefaultValue = BassVst.BASS_VST_GetParam(_vstBasicStrip, 0);
            IsDefaultValue           = true;
            // Channel1Fx.GetStripParamValue = _paramValue;

            m_VstProc = new VSTPROC(VstProc_CallBack);
            BassVst.BASS_VST_SetCallback(_vstBasicStrip, m_VstProc, IntPtr.Zero);
        }
示例#13
0
        public static void SetEffects(int stream)
        {
            string plugin_path = "";

            if (EffectsInteface.Is64Bit())
            {
                plugin_path = m_vst_plugin_PathX64;
            }
            else
            {
                plugin_path = m_vst_plugin_Path;
            }

            m_VstProc = new VSTPROC(VstProc_CallBack);

            //EQ 1 Band -----------------
            _vstEffectEQ1band = BassVst.BASS_VST_ChannelSetDSP(stream, m_vst_plugin_Path + @"TDR Nova_0_0.dll", BASSVSTDsp.BASS_VST_DEFAULT, 0);

            eq1 = BassVst.BASS_VST_GetParamCount(_vstEffectEQ1band);

            for (int i = 0; i < eq1; i++)
            {
                BassVst.BASS_VST_SetParam(_vstEffectEQ1band, i, AppSettings.Get <float>("CH1EQ1band" + i));
            }

            BassVst.BASS_VST_SetCallback(_vstEffectEQ1band, m_VstProc, IntPtr.Zero);

            /*  for (int i = 0; i < eq1; i++)
             * {
             *    // get the info about the parameter
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 0, 0);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 1, 1);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 4, 0.260f);
             *    //  BassVst.BASS_VST_SetParam(_vstEffectEQ1band[0], 5, 1);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 12, 0);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 13, 0);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 24, 0);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 25, 0);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 36, 0);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 37, 0);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 48, 1);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 49, 1);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 50, 0.260f);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 51, 0.6666667f);
             *    BassVst.BASS_VST_SetParam(_vstEffectEQ1band, 69, 0.0f);
             * }*/
            //EQ1Band();

            try
            {
                //Compressor
                _vstEffectCompressor = BassVst.BASS_VST_ChannelSetDSP(stream, m_vst_plugin_Path + @"MCompressor_0.dll", BASSVSTDsp.BASS_VST_DEFAULT, 1);

                comp1 = BassVst.BASS_VST_GetParamCount(_vstEffectCompressor);
                for (int i = 0; i < comp1; i++)
                {
                    BassVst.BASS_VST_SetParam(_vstEffectCompressor, i, AppSettings.Get <float>("CH1Comp" + i));
                }

                BassVst.BASS_VST_SetCallback(_vstEffectCompressor, m_VstProc, IntPtr.Zero);

                /* for (int i = 0; i < comp1; i++)
                 * {
                 *   // get the info about the parameter
                 *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 0, 0.5f);
                 *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 1, 0.5f);
                 *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 2, 0.3162278f);
                 *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 3, 0.3162278f);
                 *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 4, 0.1f);
                 *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 5, 0.3444445f);
                 *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 6, 0.2357953f);
                 *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 7, 1);
                 *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 8, 0.25f);
                 *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 9, 1);
                 *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 10, 1);
                 *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 11, 0);
                 *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 12, 0.5f);
                 *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 13, 0.5f);
                 *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 14, 0.5f);
                 *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 15, 0.5f);
                 *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 16, 0);
                 *   BassVst.BASS_VST_SetParam(_vstEffectCompressor, 17, 0);
                 * }*/
                //Compressor();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            //EQ4Band -----
            _vstEffectEQ4Band = BassVst.BASS_VST_ChannelSetDSP(stream, m_vst_plugin_Path + @"TDR Nova_0_1.dll", BASSVSTDsp.BASS_VST_DEFAULT, 2);
            eq7 = BassVst.BASS_VST_GetParamCount(_vstEffectEQ4Band);

            for (int i = 0; i < eq7; i++)
            {
                BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, i, AppSettings.Get <float>("CH1EQ4band" + i));
            }

            BassVst.BASS_VST_SetCallback(_vstEffectEQ4Band, m_VstProc, IntPtr.Zero);

            /* for (int i = 0; i < eq7; i++)
             * {
             *   // get the info about the parameter
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 0, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 1, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 3, 0.563f);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 4, 0.278f);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 5, 0);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 12, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 13, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 15, 0.563f);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 16, 0.361f); //Band 2 F
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 24, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 25, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 27, 0.563f);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 28, 0.63883f); //Band 3 F
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 36, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 37, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 39, 0.563f);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 40, 0.7712674f); //Band 4 F
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 41, 1); //Band 4 T
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4Band, 69, 0.0f);
             * }*/
            _vstEffectEQ4BandPhone = BassVst.BASS_VST_ChannelSetDSP(stream, m_vst_plugin_Path + @"TDR Nova_0_2.dll", BASSVSTDsp.BASS_VST_DEFAULT, 2);
            eq7Phone = BassVst.BASS_VST_GetParamCount(_vstEffectEQ4BandPhone);

            for (int i = 0; i < eq7Phone; i++)
            {
                BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, i, AppSettings.Get <float>("CH1EQ4bandPhone" + i));
            }

            BassVst.BASS_VST_SetCallback(_vstEffectEQ4BandPhone, m_VstProc, IntPtr.Zero);

            /* for (int i = 0; i < eq7Phone; i++)
             * {
             *   // get the info about the parameter
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 0, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 1, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 3, 0.563f);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 4, 0.278f);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 5, 0);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 12, 0);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 13, 0);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 15, 0.563f);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 16, 0.361f); //Band 2 F
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 24, 0);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 25, 0);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 27, 0.563f);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 28, 0.63883f); //Band 3 F
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 36, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 37, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 39, 0.563f);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 40, 0.7712674f); //Band 4 F
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 41, 1); //Band 4 T
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 48, 1); //HP Selec
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 49, 1); //HP Activ
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 50, 0.4586f);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 51, 0.25f);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 52, 1); //LP Selec
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 53, 1); //LP Activ
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 54, 0.7812674f); //LP Frequ
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 55, 0.6666667f);
             *   BassVst.BASS_VST_SetParam(_vstEffectEQ4BandPhone, 69, 0.0f);
             * }*/


            _vstEffectDeEsser = BassVst.BASS_VST_ChannelSetDSP(stream, m_vst_plugin_Path + @"MCompressor_0_D-Es.dll", BASSVSTDsp.BASS_VST_DEFAULT, 3);

            deEs = BassVst.BASS_VST_GetParamCount(_vstEffectDeEsser);

            for (int i = 0; i < deEs; i++)
            {
                BassVst.BASS_VST_SetParam(_vstEffectDeEsser, i, AppSettings.Get <float>("CH1DeEsser" + i));
            }

            BassVst.BASS_VST_SetCallback(_vstEffectDeEsser, m_VstProc, IntPtr.Zero);

            /* for (int i = 0; i < deEs; i++)
             * {
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 0, 0.5f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 1, 0.2288729f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 2, 0.3162278f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 3, 0.4728708f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 4, 0.1f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 5, 0.1713131f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 6, 0.3978892f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 7, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 8, 0.25f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 9, 1);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 10, 0);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 11, 0);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 12, 0.5f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 13, 0.5f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 14, 0.5f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 15, 0.5f);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 16, 0);
             *   BassVst.BASS_VST_SetParam(_vstEffectDeEsser, 17, 0);
             * }*/

            _vstEffectReverb = BassVst.BASS_VST_ChannelSetDSP(stream, m_vst_plugin_Path + @"OrilRiver.dll", BASSVSTDsp.BASS_VST_DEFAULT, 15);

            int rev = BassVst.BASS_VST_GetParamCount(_vstEffectReverb);

            for (int i = 0; i < rev; i++)
            {
                //  BassVst.BASS_VST_SetParam(_vstEffectReverb, 0, 0.2540541f);
                //  BassVst.BASS_VST_SetParam(_vstEffectReverb, 17, 0.8810811f);
                //  BassVst.BASS_VST_SetParam(_vstEffectReverb, 18, 0.4432433f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 0, 0.8128305f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 1, 0.03f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 2, 1);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 3, 0);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 4, 0.5f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 5, 0.3574602f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 6, 0.83f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 7, 0.2f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 8, 0.38f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 9, 0.4676717f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 10, 0.5414235f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 11, 0.4f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 12, 0.7827124f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 13, 0.585f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 14, 0.863937f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 15, 0);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 16, 0.9354057f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 17, 0.835603f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 18, 0.4120975f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 19, 0);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 20, 0);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 21, 0);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 22, 0);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 23, 0.1765174f);
                BassVst.BASS_VST_SetParam(_vstEffectReverb, 24, 1);
            }

            _vstBasicStrip = BassVst.BASS_VST_ChannelSetDSP(stream, m_vst_plugin_Path + @"BasicStrip0.dll", BASSVSTDsp.BASS_VST_DEFAULT, 4);

            int strip = BassVst.BASS_VST_GetParamCount(_vstBasicStrip);

            for (int i = 0; i < strip; i++)
            {
                BassVst.BASS_VST_SetParam(_vstBasicStrip, 0, 1.0f);
                BassVst.BASS_VST_SetParam(_vstBasicStrip, 1, 0.5f);
            }

            BassVst.BASS_VST_SetCallback(_vstBasicStrip, m_VstProc, IntPtr.Zero);
        }