Retrieves the preset currently in use on a channel of a MIDI stream.
Namespace: Un4seen.Bass.AddOn.Midi
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
[DllImportAttribute("bassmidi")] public static bool BASS_MIDI_StreamGetPreset( int handle, int chan, BASS_MIDI_FONT font )
Parameters
- handle
- Type: SystemInt32
The MIDI stream to retrieve the soundfont configuration of... 0 = get default soundfont configuration. - chan
- Type: SystemInt32
The MIDI channel... 0 = channel 1. - font
- Type: Un4seen.Bass.AddOn.MidiBASS_MIDI_FONT
Pointer to a structure to receive the preset information.
Return Value
Type: BooleanIf successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
No preset information will be available for a MIDI channel until a note is played in that channel. The present and bank numbers will not necessarily match the channel's current MIDI_EVENT_PROGRAM and MIDI_EVENT_BANK event values, but rather what the MIDI stream's soundfont configuration maps those event values to.
ERROR CODE | Description |
---|---|
BASS_ERROR_HANDLE | handle is not valid. |
BASS_ERROR_ILLPARAM | chan is not valid. |
BASS_ERROR_NOTAVAIL | No preset is currently in use on the specified MIDI channel. |
See Also