BASS.NET API for the Un4seen BASS Audio LibraryBassVstBASS_VST_GetProgramParam Method BASS.NET API for the Un4seen BASS Audio Library
Returns the parameters of a given program.

Namespace: Un4seen.Bass.AddOn.Vst
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

public static float[] BASS_VST_GetProgramParam(
	int vstHandle,
	int programIndex
)

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: Single
An 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

List all parameter values of a certain program:
VB
vstHandle = BassVst.BASS_VST_ChannelSetDSP(_stream, 
                    "C:\VstPlugins\Ambience.dll", BASSVSTDsp.BASS_VST_DEFAULT, 1)
' get the number of available programs
Dim vstProgCount As Integer = BassVst.BASS_VST_GetProgramCount(vstHandle)
If vstProgCount > 1 Then
  ' as an example get the parameters of program #1 (selected should be #0 in this case)
  Dim progParams As Single() = BassVst.BASS_VST_GetProgramParam(vstHandle, 1)
  If Not (progParams Is Nothing) Then
    ' loop over all paramter
    Dim i As Integer
    For i = 0 To progParams.Length - 1
      ' print the program's param value
      Console.WriteLine([String].Format("{0} = {1}", i, progParams(i)))
    Next i
  End If
End If
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

Reference