// your VST callback - referenced below by BASS_VST_SetCallback() private static int VstProc_CallBack(int vstHandle, BASSVSTAction action, int param1, int param2, IntPtr user) { switch (action) { case BASSVSTAction.BASS_VST_PARAM_CHANGED: // we get notified that the user has changed some sliders in the editor - // do what to do here ... //_paramValue = BassVst.BASS_VST_GetParam(_vstBasicStrip, 0); BassVst.BASS_VST_SetParamCopyParams(_vstBasicStrip, Channel1Fx.GetChannelStrip); //Console.WriteLine(_paramValue.ToString()); break; case BASSVSTAction.BASS_VST_EDITOR_RESIZED: // the editor window requests a new size, // maybe we should resize the window the editor is embedded in? // the new width/height can be found in param1/param2 break; case BASSVSTAction.BASS_VST_AUDIO_MASTER: // this is only for people familiar with the VST SDK, // param1 is a pointer to a BASS_VST_AUDIO_MASTER_PARAM structure // which contains all information needed break; } return(0); }
// VST插件回调方法 private int VSTEditorCallback(int vstDummy, BASSVSTAction action, int param1, int param2, IntPtr user) { if (action == BASSVSTAction.BASS_VST_PARAM_CHANGED) { // the user has changed some slider in the unchanneled editor // copy the changes to the 'real' channels BassVst.BASS_VST_SetParamCopyParams(vstDummy, vstHandle); } return(0); }
// your VST callback - referenced below by BASS_VST_SetCallback() private static int VstProc_CallBack(int vstHandle, BASSVSTAction action, int param1, int param2, IntPtr user) { switch (action) { case BASSVSTAction.BASS_VST_PARAM_CHANGED: if (vstHandle == _vstEffectEQ1band) { m_isEQ1bandSettingChange = true; } else if (vstHandle == _vstEffectCompressor) { m_isCompressorSettingChange = true; } else if (vstHandle == _vstEffectEQ4Band) { m_isEQ4BandSettingChange = true; } else if (vstHandle == _vstEffectEQ4BandPhone) { m_isEQ4BandPhoneSettingChange = true; } else if (vstHandle == _vstEffectDeEsser) { m_isDeEsserSettingChange = true; } else if (vstHandle == _vstBasicStrip) { BassVst.BASS_VST_SetParamCopyParams(_vstBasicStrip, Channel2Fx.GetChannelStrip); } // we get notified that the user has changed some sliders in the editor - // do what to do here ... break; case BASSVSTAction.BASS_VST_EDITOR_RESIZED: // the editor window requests a new size, // maybe we should resize the window the editor is embedded in? // the new width/height can be found in param1/param2 break; case BASSVSTAction.BASS_VST_AUDIO_MASTER: // this is only for people familiar with the VST SDK, // param1 is a pointer to a BASS_VST_AUDIO_MASTER_PARAM structure // which contains all information needed break; } return(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); }
/// <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; }