BASS.NET API for the Un4seen BASS Audio Library

BassMidiBASS_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: 2.4.17.5
Syntax

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

Parameters

handle
Type: SystemInt32
The soundfont handle to get the preset name from.
preset
Type: SystemInt32
Preset number to load... -1 = all presets (the first encountered).
bank
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.
Remarks

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

Reference