MidiDevices.EventReadShort method |
|
Remarks
Obtains data of a short MIDI event reported by the MidiDevicesEventReceived event.
For further details about the use of MIDI devices see the MidiDevices object section and the How to manage MIDI devices tutorial.
Syntax
[Visual Basic] control.MidiDevices.EventReadShort ( nEventUniqueId as Integer, nDeviceUniqueId as Integer, nMidiCommand as Integer, nMidiChannel as Integer, nMidiData1 as Integer, nMidiData2 as Integer, nTimeStamp as Long ) as enumDjcErrorCodes |
[C++] short control.MidiDevices.EventReadShort ( short nEventUniqueId, short *nDeviceUniqueId, short *nMidiCommand, short *nMidiChannel, short *nMidiData1, short *nMidiData2, long *nTimeStamp ); |
Parameter |
Description |
|
|
nEventUniqueId |
The unique identifier of the MIDI event reported by the MidiDevicesEventReceived event. After calling this method the event is internally deleted from the queue of MIDI events so this unique identifier becomes automatically invalid. |
nDeviceUniqueId |
Reference that, on return from the method call, will contain the unique identifier (returned by a previous call to the MidiDevices.Open method) of the MIDI input device which generated the event. |
nMidiCommand |
Reference that, on return from the method call, will contain the number representing the MIDI command value or the MIDI status message (hexadecimal values from F0 to FE) A detailed summary of available MIDI commands/messages can be found inside the web site of the MIDI Manufacturers Association |
nMidiChannel |
Reference that, on return from the method call, will contain the number representing the MIDI channel which received the MIDI command. |
nMidiData1 |
Reference that, on return from the method call, will contain the number representing the first parameter related to the MIDI command. |
nMidiData2 |
Reference that, on return from the method call, will contain the number representing the second parameter related to the MIDI command. |
nTimeStamp |
Reference that, on return from the method call, will contain the time stamp of the event expressed in milliseconds elapsed from the moment in which the MIDI input device was opened through a call to the MidiDevices.Open method. |
Return value
Value |
Meaning |
|
|
Negative value |
An error occurred, check the LastError property value in order to get the error code |
enumErrorCodes.ERR_NOERROR (0) |
The method call was successful |