BASS.NET API for the Un4seen BASS Audio LibraryBASS_VST_AEFFECTGetProgramNames Method BASS.NET API for the Un4seen BASS Audio Library
Returns an array of strings representing the available program names.

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

public string[] GetProgramNames()

Return Value

Type: String
An array of strings representing the available program names.

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.

Calling on a non-channel vstHandle:
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
    ' get all available programs
    Dim progs As String() = aeffect.GetProgramNames()
    If Not (progs Is Nothing) Then
      Dim i As Integer
      For i = 0 To progs.Length - 1
        Console.WriteLine([String].Format("{0}: {1}", i, progs(i)))
      Next i
    End If
  End If
End If
vstHandle = BassVst.BASS_VST_ChannelSetDSP(0, 
                    "C:\\VstPlugins\\Ambience.dll", BASSVSTDsp.BASS_VST_DEFAULT, 0);
if (BassVst.BASS_VST_GetInfo(vstHandle, vstInfo))
  if (vstInfo.aeffect != IntPtr.Zero)
    // get all available programs
    string[] progs = aeffect.GetProgramNames();
    if (progs != null)
      for (int i = 0; i < progs.Length; i++)
        Console.WriteLine(String.Format( "{0}: {1}", i, progs[i]));
See Also