BASS.NET API for the Un4seen BASS Audio LibraryBassMidiBASS_MIDI_FontGetPreset Method BASS.NET API for the Un4seen BASS Audio Library

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

public static string BASS_MIDI_FontGetPreset(
	int handle,
	int preset,
	int bank


Type: SystemInt32
The soundfont handle to get the preset name from.
Type: SystemInt32
Preset number to load... -1 = all presets (the first encountered).
Type: SystemInt32
Bank number to load... -1 = all banks (the first encountered).

Return Value

Type: String
If successful, the requested preset name is returned, else is returned. Use BASS_ErrorGetCode to get the error code.

SFZ files do not contain preset names, so their filenames (minus the ".sfz" extension) are used instead when available.

A list of all presets in a soundfont is available from BASS_MIDI_FontGetPresets(Int32, Int32).

Drum kits are located in bank 128, and possibly bank 127 in the case of XG drum kits.

ERROR CODEDescription
BASS_ERROR_HANDLEhandle is not valid.
BASS_ERROR_NOTAVAILThe soundfont does not contain the requested preset.

See Also