BASS.NET API for the Un4seen BASS Audio Library

BassMidiBASS_MIDI_FontInitUser Method

BASS.NET API for the Un4seen BASS Audio Library
Initializes a soundfont via user callback functions.

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

[DllImportAttribute("bassmidi")]
public static int BASS_MIDI_FontInitUser(
	BASS_FILEPROCS procs,
	IntPtr user,
	BASSFlag flags
)

Parameters

procs
Type: Un4seen.BassBASS_FILEPROCS
The user defined file function (see BASS_FILEPROCS).
user
Type: SystemIntPtr
User instance data to pass to the callback functions.
flags
Type: Un4seen.BassBASSFlag
Any combination of these flags (see BASSFlag):
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_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.
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.

Return Value

Type: Int32
If successful, the soundfont's handle is returned, else 0 is returned. Use BASS_ErrorGetCode to get the error code.
Remarks

The unbuffered file system (STREAMFILE_NOBUFFER) is always used by this function.

ERROR CODEDescription
BASS_ERROR_FILEFORMThe file's format is not recognised/supported.
BASS_ERROR_MEMThere is insufficient memory.
BASS_ERROR_MIDI_INCLUDEAn SFZ #include directive file could not be opened.

See Also

Reference