midiOutShortMsg (winmm)
Last changed: -95.150.180.171

.
Summary
TODO - a short description

C# Signature:

[DllImport("winmm.dll")]

static extern uint midiOutShortMsg(IntPtr hMidiOut, uint dwMsg);

VB Signature:

Declare Function midiOutShortMsg Lib "winmm.dll" (TODO) As TODO

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

//hmidi is an IntPtr obtained via midiOutOpen or other means.

byte[] data = new byte[4];

//[0] = voice message

//[1] = status

//[2] = data 1

//[3] = data 2 (unused?)

data[0] = 0xC0;//change instrument, channel 0

data[1] = (byte)127;//gunshot

uint msg = BitConverter.ToUInt32(data, 0);

midiOutShortMsg(hmidi, msg);

data[0] = 0x90;//note on, channel 0

data[1] = 50;//pitch

data[2] = 100;//velocity

msg = BitConverter.ToUInt32(data, 0);

midiOutShortMsg(hmidi, msg);

Documentation