BASS_CONFIG_MIDI_DEFFONT config option
The default soundfont.
BASS_SetConfigPtr(
BASS_CONFIG_MIDI_DEFFONT,
char *filename
);
Parameters
filename | Filename of the soundfont... NULL = no default soundfont. If this begins with * then the file will be memory-mapped (if possible).
|
Remarks
A copy is made of the provided filename, so it does not need to persist beyond the BASS_SetConfigPtr call. If the specified soundfont cannot be loaded, the default soundfont setting will remain as it is. BASS_GetConfigPtr can be used to confirm what that is.
Platform-specific
On Windows, the BASS_UNICODE flag can be used to set/get the soundfont filename in UTF-16 form, otherwise it is ANSI. The filename is in UTF-8 form on other platforms. On Windows, the default is to use one of the Creative soundfonts (28MBGM.SF2 or CT8MGM.SF2 or CT4MGM.SF2 or CT2MGM.SF2) if present in the Windows system directory.
Example
Set a default soundfont.
BASS_SetConfigPtr(BASS_CONFIG_MIDI_DEFFONT, "c:\\soundfonts\\default.sf2");
Set a default soundfont with memory-mapping.
BASS_SetConfigPtr(BASS_CONFIG_MIDI_DEFFONT, "*c:\\soundfonts\\default.sf2");
See also
BASS_MIDI_StreamCreateFile
BASS_GetConfigPtr, BASS_SetConfigPtr