Get the value of a single VST effect parameter.
Namespace: Un4seen.Bass.AddOn.Vst
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
[DllImportAttribute("bass_vst")] public static float BASS_VST_GetParam( int vstHandle, int paramIndex )
Parameters
- vstHandle
- Type: SystemInt32
The VST effect handle as returned by BASS_VST_ChannelSetDSP(Int32, String, BASSVSTDsp, Int32). - paramIndex
- Type: SystemInt32
The index of the parameter (must be smaller than BASS_VST_GetParamCount(Int32)).
Return Value
Type: Singleon success.
Remarks
All VST effect parameters are in the range from 0.0 to 1.0 (float), however, from the view of a VST effect, they may represent completely different values. E.g. some might represent a multiplier to some internal constants and will result in number of samples or some might represent a value in dB etc.
You can use BASS_VST_GetParamInfo(Int32, Int32, BASS_VST_PARAM_INFO) to get further information about a single parameter, which will also present you with the current value in a readable format.
Examples
// assign and load the VST effect vstHandle = BassVst.BASS_VST_ChannelSetDSP(_stream, "C:\\VstPlugins\\DelayEditGUI.dll", BASSVSTDsp.BASS_VST_DEFAULT, 1); // get the total number of parameters 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); Console.WriteLine( paramValue.ToString() ); // and get further info about the parameter BassVst.BASS_VST_GetParamInfo(vstHandle, i, paramInfo); Console.WriteLine( paramInfo.ToString() ); }
0,5 Delay = 22049 samples 0,5 FeedBack = 0.500000 amount 0,75 Volume = -2.49877 dB
See Also