Copyright © 2013-2014 MultiMedia Soft

CallbackMidiDevicesEventShortReceived delegate

Previous pageReturn to chapter overviewNext page

Remarks

 

Callback delegate invoked from a secondary thread when a short MIDI event is received from a MIDI input device.

 

MIDI events can be filtered, avoiding this event being generated, through the MidiDevices.InputEventFilterSet method.

 

In order to allow the component invoking this delegate at runtime, the container application must invoke the CallbackMidiDevicesEventShortReceivedSet method passing the address of the callback function.

 

For further details about callback delegates see the How to synchronize the container application with the API tutorial.

For further details about the use of MIDI devices see the ClassMidiDevices class section and the How to manage MIDI devices tutorial.

 

 

Syntax

[Visual Basic]

Public Delegate Sub CallbackMidiDevicesEventShortReceived (

nDeviceUniqueId as Int16,

nMidiCommand as Int16,

nMidiChannel as Int16,

nMidiData1 as Int16,

nMidiData2 as Int16,

nTimeStamp as Int32,

nUserData as Int32

)


 

[C#]

public delegate void CallbackMidiDevicesEventShortReceived (

Int16 nDeviceUniqueId,

Int16 nMidiCommand,

Int16 nMidiChannel,

Int16 nMidiData1,

Int16 nMidiData2,

Int32 nTimeStamp,

Int32 nUserData

)


 

[C++]

public delegate void CallbackMidiDevicesEventShortReceived (

Int16 nDeviceUniqueId,

Int16 nMidiCommand,

Int16 nMidiChannel,

Int16 nMidiData1,

Int16 nMidiData2,

Int32 nTimeStamp,

Int32 nUserData

)


 

 

Parameter

Description

 

 

nDeviceUniqueId

The unique identifier of the MIDI device returned by a previous call to the MidiDevices.Open method

nMidiCommand

Number representing the MIDI command.

A detailed summary of available MIDI commands/messages can be found inside the web site of the MIDI Manufacturers Association

nMidiChannel

Number representing the MIDI channel which received the MIDI command..

nMidiData1

Number representing the first parameter related to the MIDI command.

nMidiData2

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.

nUserData

User instance data