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; } }
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; } }
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); }