BASS MIDI

BASS_MIDI_FontGetPreset


Retrieves the name of a preset in a soundfont.

char *BASS_MIDI_FontGetPreset(
    HSOUNDFONT handle,
    int preset,
    int bank
);

Parameters

handleThe soundfont to get the preset name from.
presetPreset number... -1 = any preset (the first encountered).
bankBank 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_HANDLEhandle is not valid.
BASS_ERROR_NOTAVAILThe 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.

See also

BASS_MIDI_FontGetInfo, BASS_MIDI_FontGetPresets, BASS_MIDI_FontInit