BASS_MIDI_FontGetPreset
Retrieves the name of a preset in a soundfont.
char *BASS_MIDI_FontGetPreset( HSOUNDFONT handle, int preset, int bank );
Parameters
handle | The soundfont to get the preset name from. |
preset | Preset number... -1 = any preset (the first encountered). |
bank | Bank number... -1 = any bank (the first encountered). |
Return value
If successful, the requested preset name is returned, else NULL is returned. Use BASS_ErrorGetCode to get the error code.Error codes
BASS_ERROR_HANDLE | handle is not valid. |
BASS_ERROR_NOTAVAIL | The soundfont does not contain the requested preset. |
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.
Drum kits are located in bank 128, and possibly bank 127 in the case of XG drum kits.