Table of Contents

Class MidiIn

Namespace
NAudio.Midi
Assembly
NAudio.WinMM.dll

Represents a MIDI in device backed by the legacy winmm midiIn* API.

public class MidiIn : IMidiInput, IDisposable
Inheritance
MidiIn
Implements
Inherited Members

Constructors

MidiIn(int)

Opens a specified MIDI in device

public MidiIn(int deviceNo)

Parameters

deviceNo int

The device number

Properties

NumberOfDevices

Gets the number of MIDI input devices available in the system

public static int NumberOfDevices { get; }

Property Value

int

Methods

Close()

Closes this MIDI in device

public void Close()

DeviceInfo(int)

Gets the MIDI in device info

public static MidiInCapabilities DeviceInfo(int midiInDeviceNumber)

Parameters

midiInDeviceNumber int

Returns

MidiInCapabilities

Dispose()

Closes this MIDI in device

public void Dispose()

Dispose(bool)

Closes the MIDI in device

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

True if called from Dispose

~MidiIn()

Cleanup

protected ~MidiIn()

Reset()

Reset the MIDI in device

public void Reset()

Start()

Start the MIDI in device

public void Start()

Stop()

Stop the MIDI in device

public void Stop()

Events

ErrorReceived

Raised when an invalid MIDI message is received.

public event EventHandler<MidiInMessageEventArgs> ErrorReceived

Event Type

EventHandler<MidiInMessageEventArgs>

Remarks

This is winmm-specific and is not part of IMidiInput; the WinRT backend does not surface invalid-message events.

MessageReceived

Called when a MIDI message is received

public event EventHandler<MidiInMessageEventArgs> MessageReceived

Event Type

EventHandler<MidiInMessageEventArgs>

SysexMessageReceived

Called when a Sysex MIDI message is received

public event EventHandler<MidiInSysexMessageEventArgs> SysexMessageReceived

Event Type

EventHandler<MidiInSysexMessageEventArgs>