BASS_CONFIG_MIDI_AUTOFONT config option

Automatically load matching soundfonts?

BASS_SetConfig(
    BASS_CONFIG_MIDI_AUTOFONT,
    DWORD autofont
);

Parameters

autofontIf set to 1, BASSMIDI will try to load a soundfont matching the MIDI file. If set to 2, the matching soundfont will also be used on all banks.

Remarks

When enabled, BASSMIDI will check for a matching soundfont when loading a MIDI file. For example, if the MIDI file is "afile.mid", then it will look for a soundfont named "afile.sf2" or "afile.mid.sf2". If found, this soundfont will take precedence over any other soundfonts applied via BASS_MIDI_StreamSetFonts.

When the soundfont is used on all banks (autofont=2), BASSMIDI will first check for the specific bank and preset in the soundfont, but if it does not find that, it will just look for a preset match on any bank.

This option only applies to local MIDI files, loaded using BASS_MIDI_StreamCreateFile (or BASS_StreamCreateFile via the plugin system). BASSMIDI will not look for matching soundfonts for MIDI files loaded from the internet.

By default, this option is set to 1.

See also

BASS_MIDI_StreamCreateFile

BASS_GetConfig, BASS_SetConfig