BASS.NET API for the Un4seen BASS Audio LibraryBassMidiBASS_MIDI_StreamGetEvent Method BASS.NET API for the Un4seen BASS Audio Library
Retrieves the current value of an event in a MIDI stream channel.

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

[DllImportAttribute("bassmidi.dll", CharSet = CharSet.Unicode)]
public static int BASS_MIDI_StreamGetEvent(
	int handle,
	int chan,
	BASSMIDIEvent eventtype
)

Parameters

handle
Type: SystemInt32
The MIDI stream to retrieve the event from (as returned by BASS_MIDI_StreamCreate(Int32, BASSFlag, Int32)).
chan
Type: SystemInt32
The MIDI channel to get the event value from... 0 = channel 1.
eventtype
Type: Un4seen.Bass.AddOn.MidiBASSMIDIEvent
The event value to retrieve (see BASSMIDIEvent for details on the available event types and their values). With the drum key events (MIDI_EVENT_DRUM_CUTOFF/etc) and the MIDI_EVENT_KEYPRES and MIDI_EVENT_SCALETUNING events, the HIWORD - use MAKELONG(event,key) - can be used to specify which key/note to get the value from.

Return Value

Type: Int32
The event parameter (see BASSMIDIEvent for details) if successful - else -1 (use BASS_ErrorGetCode to get the error code).
Remarks

SYNCs can be used to be informed of when event values change.

ERROR CODEDescription
BASS_ERROR_HANDLEhandle is not valid.
BASS_ERROR_ILLPARAMOne of the other parameters is invalid.

See Also

Reference