Hi,
Here's the bug report I promised in the volume settings thread :)
If you want to preload a soundfont that is set in the configuration dialog to use a bank number (offset) and all presets (-1),
but the given bank does not exists in the soundfont you get an error:
'Error while preloading soundfont
Error:37
Description: BASS_ERROR_NOTAVAIL: The soundfont does not contain the requested preset.'
This error does not make much sense. This must be a bank/preset misconfiguration.
Reason: If you select -1 for Preset value (all presets) the preset+bank numbers do not designate a precise instrument but an offeset where to load all instruments from the soundfont. So the given bank does not have to exist in the soundfont to use a bank number as an offset.
Quote from the bassmidi documentation:
'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.'
Ps: I think the root of the problem can be that in case of
BASS_MIDI_FontLoad(HSOUNDFONT handle, int preset, int bank)
you pass the preset and bank parameters just like it was given in the configutration dialog. This obviously does not work since the given preset+bank combination really does not exists. Instead you should call
BASS_MIDI_FontLoad() with both preset and bank set to -1. This way the whole soundfont can be loaded the same way as when you do not specify a bank offset.
Bassmidi documentation:
Parameters
handle: The soundfont handle.
preset: Preset number to load... -1 = all presets.
bank: Bank number to load... -1 = all banks.
Thanks.
Zoltán Bacskó
Falcosoft