BASS MIDI

BASS_MIDI_FONT structure


Used with BASS_MIDI_StreamSetFonts and BASS_MIDI_StreamGetFonts to set and retrieve soundfont configurations.

typedef struct {
    HSOUNDFONT font;
    int preset;
    int bank;
} BASS_MIDI_FONT;

Members

fontSoundfont handle, previously initialized with BASS_MIDI_FontInit.
presetPreset number... 0-65535, -1 = use all presets in the soundfont. This determines what MIDI_EVENT_PROGRAM event value(s) the soundfont is used for.
bankBase bank number, or the bank number of the individual preset. This determines what MIDI_EVENT_BANK event value(s) the soundfont is used for.

Remarks

When using an individual preset from a soundfont, BASSMIDI will first look for the exact preset and bank match, but if that is not present, the first preset from the soundfont will be used. This is useful for single preset soundfonts. Individual presets can be assigned to program numbers beyond the standard 127 limit, up to 65535, which can then be accessed via BASS_MIDI_StreamEvent.

When using all presets in a soundfont, the bank member is a base number that is added to the soundfont's banks. For example, if bank=1 then the soundfont's bank 0 becomes bank 1, etc. Negative base numbers are allowed.

For more flexible mapping of soundfont presets to MIDI programs, see the BASS_MIDI_FONTEX structure.

See also

BASS_MIDI_FontInit, BASS_MIDI_StreamGetFonts, BASS_MIDI_StreamSetFonts