BASS.NET API for the Un4seen BASS Audio LibraryMidiOutputDeviceSend Method (MIDIStatus, Byte, Byte, Byte)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(
	MIDIStatus status,
	byte channel,
	byte data1,
	byte data2
)

Parameters

status
Type: radio42.Multimedia.MidiMIDIStatus
The MIDIStatus to use to construct the short message.
channel
Type: SystemByte
The channel number to use to construct the short message (will be combined with the status in lower 4-bits).
data1
Type: SystemByte
The Data1 value to use to construct the short message.
data2
Type: SystemByte
The Data2 value to use to construct the short message.

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 

' send a new short message to the output device
If _outDevice.Send(CByte(MIDIStatus.NoteOn), 1, 64, 65) 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!");

// send a new short message to the output device
if ( _outDevice.Send((byte)MIDIStatus.NoteOn, 1, 64, 65) )
  Console.WriteLine("Error sending short message!");
See Also

Reference