BASS.NET API for the Un4seen BASS Audio LibraryMidiOutputDeviceSend Method (MidiShortMessage)BASS.NET API for the Un4seen BASS Audio Library
Sends a short message to the output Device.

Namespace: radio42.Multimedia.Midi
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

public bool Send(
	MidiShortMessage shortMessage
)

Parameters

shortMessage
Type: radio42.Multimedia.MidiMidiShortMessage
The instance of the MidiShortMessage to send.

Return Value

Type: Boolean
on success, else (see LastErrorCode for details).
Remarks

The Device must have been opened with the Open method (or check IsOpened) before sending any message.

Examples

VB
private MidiOutputDevice _outDevice = null;
...
_outDevice = New MidiOutputDevice(0)
If Not _outDevice.Open() Then
  Console.WriteLine("Could not open Midi device!")
End If 

' create and send a new short message to the output device
Dim msg As New MidiShortMessage(MIDIStatus.NoteOn, 0, 64, 65, 0)
If _outDevice.Send(msg) Then
  Console.WriteLine("Error sending short message!")
End If
private MidiOutputDevice _outDevice = null;
...
_outDevice = new MidiOutputDevice(0);
if (!_outDevice.Open())
  Console.WriteLine( "Could not open Midi device!" );

// create and send a new short message to the output device
MidiShortMessage msg = new MidiShortMessage(MIDIStatus.NoteOn, 0, 64, 65, 0);
if (_outDevice.Send(msg))
  Console.WriteLine("Error sending short message!");
See Also

Reference