BASS.NET API for the Un4seen BASS Audio LibraryMidiOutputDeviceSend Method (MidiSysExMessage)BASS.NET API for the Un4seen BASS Audio Library
Sends a system-exclusive message to the output Device.

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

public bool Send(
	MidiSysExMessage sysexMessage


Type: radio42.Multimedia.MidiMidiSysExMessage
The unprepared instance of the MidiSysExMessage to send.

Return Value

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

The MidiSysExMessage must be created for this output Device and must be unprepared (meaning the Prepare method should not have been called yet, since this will be handled inside this method).

If you created the system-exclusive message for a different Device this method will return .

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


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

' create a new system-exclusive message for the output device
Dim sysex As New MidiSysExMessage(False, _outDevice.Device)
sysex.CreateBuffer(New Byte(7) {&HF0, &H43, &H75, &H73, &H12, &H0, &HF7})
' send it
If _outDevice.Send(sysex) Then
  Console.WriteLine("Error sending system-exclusive message!")
End If
private MidiOutputDevice _outDevice = null;
_outDevice = new MidiOutputDevice(0);
if ( !_outDevice.Open() )
  Console.WriteLine("Could not open Midi device!");

// create a new system-exclusive message for the output device
MidiSysExMessage sysex = new MidiSysExMessage(false, _outDevice.Device);
sysex.CreateBuffer(new byte[7] {0xF0, 0x43, 0x75, 0x73, 0x12, 0x00, 0xF7});
// send it
if ( _outDevice.Send(sysex) )
  Console.WriteLine("Error sending system-exclusive message!");
See Also