BASS.NET API for the Un4seen BASS Audio LibraryBASS_MIDI_FONTEX StructureBASS.NET API for the Un4seen BASS Audio Library

Namespace: Un4seen.Bass.AddOn.Midi
Assembly: Bass.Net (in Bass.Net.dll) Version:

public struct BASS_MIDI_FONTEX

The BASS_MIDI_FONTEX type exposes the following members.


Constructor already setting the members.

Public methodToString
A description of the soundfont configuration object (font, preset, bank)
(Overrides ValueTypeToString.)

Public fielddbank
Destination bank number, or a base bank number when using all presets from all banks. This determines what MIDI_EVENT_BANK event value(s) the soundfont is used for.
Public fielddbanklsb
Destination bank number LSB. This is the MIDI_EVENT_BANK_LSB event value that the soundfont is used for.
Public fielddpreset
Destination preset/program number... 0-65535, -1 = all presets. This determines what MIDI_EVENT_PROGRAM event value(s) the soundfont is used for.
Public fieldfont
Soundfont handle, previously inititialized with BASS_MIDI_FontInit(String, BASSFlag).
Public fieldsbank
Soundfont bank number... 0-128, -1 = use all banks.
Public fieldspreset
Soundfont preset number... 0-127, -1 = use all presets.

This is an extended version of the BASS_MIDI_FONT structure that allows more flexible mapping of soundfont presets to MIDI programs, including access to the bank LSB (eg. MIDI controller 32).

When using an individual preset from a soundfont, BASSMIDI will first look for the exact spreset and sbank 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(Int32, Int32, BASSMIDIEvent, Int32).

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

The bank LSB raises the maximum number of melodic banks from 128 to 16384 (128 x 128), but the SF2 soundfont format only supports 128 banks, so a soundfont that is set to be used on all banks (dpreset and dbank are -1) will still only apply to the single bank LSB specified by dbanklsb.

See Also