BASS_MIDI_FontFlags

Modifies and retrieves a soundfont's flags.

DWORD BASS_MIDI_FontFlags(
    HSOUNDFONT handle,
    DWORD flags,
    DWORD mask
);

Parameters

handleThe soundfont handle.
flagsA combination of these flags.
BASS_MIDI_FONT_LINATTMODUse a linear attack phase in SF2 modulation (pitch/filter) envelopes. Otherwise a convex curve is used. The attack phase is always linear in SFZ envelopes.
BASS_MIDI_FONT_LINDECVOLUse linear decay and release phases in volume envelopes. Otherwise a concave curve is used. The attack phase is always linear.
BASS_MIDI_FONT_MINFXTreat the reverb/chorus levels in the soundfont as minimums. The higher of them and the MIDI levels (CC91/93) will be used instead of the sum of both.
BASS_MIDI_FONT_MMAPThe file is mapped into memory. This cannot be modified.
BASS_MIDI_FONT_NOFXIgnore the reverb/chorus levels in the soundfont and only use the MIDI levels (CC91/93).
BASS_MIDI_FONT_NOLIMITSDo not limit SF2 generator values to emulate Creative/SoundBlaster hardware. This cannot be modified.
BASS_MIDI_FONT_NORAMPINNever ramp-in the start of a sample in the soundfont. Otherwise a sample will be ramped-in if its data does not begin with a 0 (further away results in a longer ramp). This is only relevant when the volume envelope has no attack phase.
BASS_MIDI_FONT_XGDRUMSUse bank 127 in the soundfont for XG drum kits. When an XG drum kit is needed, bank 127 in soundfonts that have this flag set will be checked first, before falling back to bank 128 (the standard SF2 drum kit bank) if it is not available there.
maskThe flags (as above) to modify. Flags that are not included in this are left as they are, so it can be set to 0 in order to just retrieve the current flags.

Return value

If successful, the soundfont's updated flags are returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.

Error codes

BASS_ERROR_HANDLEhandle is not valid.

Remarks

A soundfont will need to be freed (including any duplicates) and reloaded to modify the BASS_MIDI_FONT_NOLIMITS flag because most of the Creative/SoundBlaster hardware limits are applied when loading a soundfont.

Example

Ignore a soundfont's reverb/chorus levels.
BASS_MIDI_FontFlags(handle, BASS_MIDI_FONT_NOFX, BASS_MIDI_FONT_NOFX);

See also

BASS_MIDI_FontGetInfo, BASS_MIDI_FontGetPresets, BASS_MIDI_FontGetVolume, BASS_MIDI_FontSetVolume