Returns the parameters of a given program.
Namespace: Un4seen.Bass.AddOn.Vst
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
Parameters
- vstHandle
- Type: SystemInt32
The VST effect handle as returned by BASS_VST_ChannelSetDSP(Int32, String, BASSVSTDsp, Int32). - programIndex
- Type: SystemInt32
The program number for which to query the parameter values, must be smaller than BASS_VST_GetProgramCount(Int32).
Return Value
Type: SingleAn array of float values representing the parameter values of the given program or if the program (VST effect) has no parameters or an error occurred.
Remarks
The parameters of the currently selected program can also be queried by BASS_VST_GetParam(Int32, Int32).
The function returns the parameters as an array of floats. The number of elements in the returned array is equal to BASS_VST_GetParamCount(Int32).
This function does not change the selected program!
Examples
vstHandle = BassVst.BASS_VST_ChannelSetDSP(_stream, "C:\\VstPlugins\\Ambience.dll", BASSVSTDsp.BASS_VST_DEFAULT, 1 ); // get the number of available programs int vstProgCount = BassVst.BASS_VST_GetProgramCount(vstHandle); if (vstProgCount > 1) { // as an example get the parameters of program #1 (selected should be #0 in this case) float[] progParams = BassVst.BASS_VST_GetProgramParam(vstHandle, 1); if (progParams != null) { // loop over all paramter for (int i=0; i<progParams.Length; i++) { // print the program's param value Console.WriteLine( String.Format( "{0} = {1}", i, progParams[i]) ); } } }
See Also