BASS.NET API for the Un4seen BASS Audio LibraryBASS_VST_AEFFECTGetProgramName Method BASS.NET API for the Un4seen BASS Audio Library
Returns a specific program name of the VST effect.

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

public string GetProgramName(
	int program
)

Parameters

program
Type: SystemInt32
The number of the program to return (must be between 0 .. numPrograms-1).

Return Value

Type: String
The name of the selected program - or an empty string, if the effect has no programs.
Remarks

Retrieving a program name other than the current one enforces to change the current program inernally. So this method first retrieves the current program number, then changes the program in order to get that name and afterwards restores the currect selected program. But since changing the program is enforced even for a short period of time, calling this method on a channel based VST effect might produce some sound disturbance. So it is a good idea to either call this method on a non-channel vstHandle (BASS_VST_ChannelSetDSP(Int32, String, BASSVSTDsp, Int32) called with chan=0) or make sure the channel is currently not playing.
Examples

Calling on a non-channel vstHandle:
VB
vstHandle = BassVst.BASS_VST_ChannelSetDSP(0, "C:\VstPlugins\Ambience.dll", BASSVSTDsp.BASS_VST_DEFAULT, 0)
Dim vstInfo As New BASS_VST_INFO()
If BassVst.BASS_VST_GetInfo(vstHandle, vstInfo) Then
  If vstInfo.aeffect <> IntPtr.Zero Then
    Dim aeffect As BASS_VST_AEFFECT = BASS_VST_AEFFECT.FromIntPtr(vstInfo.aeffect)
    ' list all available programs
    Dim i As Integer
    For i = 0 To aeffect.numPrograms - 1
      Console.WriteLine(aeffect.GetProgramName(i))
    Next i
  End If
End If
vstHandle = BassVst.BASS_VST_ChannelSetDSP(0, 
                    "C:\\VstPlugins\\Ambience.dll", BASSVSTDsp.BASS_VST_DEFAULT, 0);
BASS_VST_INFO vstInfo = new BASS_VST_INFO();
if ( BassVst.BASS_VST_GetInfo(vstHandle, vstInfo) )
{
  if (vstInfo.aeffect != IntPtr.Zero)
  {
    BASS_VST_AEFFECT aeffect = BASS_VST_AEFFECT.FromIntPtr(vstInfo.aeffect);
    // list all available programs
    for (int i=0; i<aeffect.numPrograms; i++)
      Console.WriteLine( aeffect.GetProgramName(i) );
  }
}
See Also

Reference