Each instance of this class describes a MIDI input device installed on the system. You cannot create your own instances, but instead must go through the InstalledDevices property to find which devices are available. You may wish to examine the DeviceBase.Name property of each one and present the user with a choice of which device(s) to use.
Open an input device with Open and close it with Close. While it is open, you may arrange to start receiving messages with StartReceiving and then stop receiving them with StopReceiving. An input device can only receive messages when it is both open and started.
Incoming messages are routed to the corresponding events, such as NoteOn and ProgramChange. The event handlers are invoked on a background thread which is started in StartReceiving and stopped in StopReceiving.
As each message is received, it is assigned a timestamp in one of two ways. If StartReceiving is called with a Clock, then each message is assigned a time by querying the clock's Clock.Time property. If StartReceiving is called with null, then each message is assigned a time based on the number of seconds since StartReceiving was called.