BASS.NET API for the Un4seen BASS Audio Library

radio42.Multimedia.Midi Namespace

BASS.NET API for the Un4seen BASS Audio Library
This namespace contains all classes, delegates and enumerations to support native MIDI communication. This implementation wraps the WINMM.DLL Microsoft Multimedia API library, which is actually not part of BASS, but rather the Microsoft operating system. So it is not to be confused with the BassMidi add-on (which about real-time playback of MIDI notes and files)!

The main class Midi wraps most common MIDI API calls (like enumerating the MIDI devices and sending or receiving MIDI messages) and has been implemented as static methods. These methods might be used to implement your own native MIDI communication. So there is NO need to create an instance of the Midi class!

The other two main objects, which might be even more useful, are the MidiInputDevice and MidiOutputDevice which are real classes and make use of the Midi methods internally. With the MidiShortMessage and MidiSysExMessage classes you might create (encode, pack) or read (decode, unpack) any Midi data or system-exclusive message. Alltogether they handle effective communication with MIDI ports (like sending and reveiving any kind of message). Those classes need to be instantiated before their use.

For more information about MIDI see here: Musical Instrument Digital Interface (MIDI).


Public classMidi
This class represents the general Win32 MIDI Functions and Constants.

Requires: winmm.dll - Microsoft Multimedia Win32 library.

Public classMIDI_HEADER
Represents a wrapper for the Windows Multimedia MIDIHDR structure.
Public classMIDI_INCAPS
Represents MIDI input device capabilities as returned by the MIDI_InGetDevCaps(Int32, MIDI_INCAPS) method.
Public classMIDI_OUTCAPS
Represents MIDI output device capabilities as returned by the MIDI_OutGetDevCaps(Int32, MIDI_OUTCAPS) method.
Public classCode exampleMidiInputDevice
This class handles all communication with a Midi input device.
Public classMidiMessageEventArgs
EventArgs class to be passed as the second parameter of a MessageReceived or MessageReceived event handler.
Public classCode exampleMidiOutputDevice
This class handles all communication with a Midi output device.
Public classCode exampleMidiShortMessage
This class represents a Midi short (data) message as for example received in a MIM_DATA message of a MIDIINPROC.
Public classCode exampleMidiSysExMessage
This class represents a Midi system-exclusive message as for example received in a MIM_LONGDATA message of a MIDIINPROC or as being used with the MIDI_OutLongMsg(IntPtr, IntPtr) and returned back in the MIDIOUTPROC with the MOM_DONE message.

Public structureMIDI_TIME
Represents the Windows Multimedia MMTIME structure.

Public delegateCode exampleMIDIINPROC
Represents the general callback delegate for handling Midi Input messages.
Public delegateMidiMessageEventHandler
Definition of the MessageReceived and MessageReceived event handler.
Public delegateCode exampleMIDIOUTPROC
Represents the general callback delegate for handling Midi Output messages.

Public enumerationMIDIControllerType
Defines constants for controller types.
Public enumerationMIDIDevice
Type of the MIDI output device, to be used with the technology flag field.
Public enumerationMIDIError
General list of Midi Error Codes.
Public enumerationMIDIFlags
General Midi Flags.
Public enumerationMIDIHeader
Flag of the MIDI_HEADER flags property.
Public enumerationMIDIManufacturer
Defines constants representing the special Midi ManufacturerID within a system-exclusive message (see Manufacturer for details).
Public enumerationMIDIMessage
Midi Message Types.
Public enumerationMidiMessageEventType
Types of Midi message event that has occurred with the MidiInputDevice resp. MidiOutputDevice class.
Public enumerationMIDIMessageType
Defines constants representing MIDI message types.
Public enumerationMIDIMTCType
Defines constants representing the Midi Time Code (MTC) type used by the MidiTimeCode status given in a StatusType member (also see TimeCodeType and TimeCodeValue).
Public enumerationMIDINote
Defines constants representing the 12 Note of the chromatic scale.
Public enumerationMIDIStatus
Defines constants for Midi message status.
Public enumerationMIDITimeType
Defines constants representing the Midi timing format used by the MIDI_TIME structure.