Table of Contents

Namespace NAudio.Midi

Classes

ChannelAfterTouchEvent

Represents a MIDI Channel AfterTouch Event.

ControlChangeEvent

Represents a MIDI control change event

KeySignatureEvent

Represents a MIDI key signature event event

LiveMidiInstrument

Plays an IMidiInstrument from a live MIDI source (a hardware keyboard, an on-screen keyboard, etc.). Unlike SequencedMidiPlayer, which reads events from a timeline on the audio thread, events here arrive asynchronously from other threads (a MIDI input callback, the UI thread, …).

MetaEvent

Represents a MIDI meta event

MidiEvent

Represents an individual MIDI event

MidiEventCollection

A helper class to manage collection of MIDI events It has the ability to organise them in tracks

MidiEventComparer

Utility class for comparing MidiEvent objects

MidiFile

Class able to read a MIDI file

MidiFileSequence

A MIDI file loaded into the sequencing core: its channel events placed on an EventTimeline<T> at the canonical PPQ (CanonicalPpq), and its tempo changes built into an ITempoMap. Feed it through a SequencedMidiPlayer (or OfflineMidiRenderer) to play it on any IMidiInstrument — the NAudio.Sampler engine, a synthesiser, a hosted VST instrument.

Note/CC/pitch-bend/aftertouch/program and sysex events are kept; other meta events are dropped except SetTempo, which builds the tempo map.

MidiIn

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

MidiInMessageEventArgs

MIDI In Message Information

MidiInSysexMessageEventArgs

MIDI In Sysex Message Information

MidiMessage

Represents a MIDI message

MidiOut

Represents a MIDI out device backed by the legacy winmm midiOut* API.

MidiOutputExtensions

Convenience extensions on IMidiOutput.

NoteEvent

Represents a note MIDI event

NoteOnEvent

Represents a MIDI note on event

OfflineMidiRenderer

Renders a MidiFileSequence through an IMidiInstrument offline (faster than real time), to an in-memory buffer or a WAV file. The rendering is sample-accurate (events are dispatched at their exact frame), deterministic, and needs no audio hardware.

PatchChangeEvent

Represents a MIDI patch change event

PitchWheelChangeEvent

Represents a MIDI pitch wheel change event

RawMetaEvent

Represents a MIDI meta event with raw data

SequencedMidiPlayer

Plays an EventTimeline<T> of MIDI events on an IMidiInstrument, driven by a Transport. Unlike SequencedSampleProvider<T> (which spawns a sample provider per event into a mixer), this drives a single stateful polyphonic instrument: on each Read(Span<float>) it dispatches the buffer's MIDI events to the instrument at their exact frame offset, rendering the instrument in segments between events so timing is sample-accurate within the block.

SequencerSpecificEvent

Represents a Sequencer Specific event

SmpteOffsetEvent

SMPTE Offset Event

SysexEvent

Represents a MIDI sysex message

TempoEvent

Represents a MIDI tempo event

TextEvent

Represents a MIDI text event

TimeSignatureEvent

Represents a MIDI time signature event

TrackSequenceNumberEvent

Represents a MIDI track sequence number event event

Structs

MidiInCapabilities

MIDI In Device Capabilities

MidiOutCapabilities

class representing the capabilities of a MIDI out device MIDIOUTCAPS: http://msdn.microsoft.com/en-us/library/dd798467%28VS.85%29.aspx

Interfaces

IMidiInput

A device-agnostic MIDI input. Implemented by the legacy winmm-backed MidiIn (in NAudio.WinMM) and the WinRT-backed WinRTMidiIn (in NAudio.Wasapi).

IMidiInstrument

An instrument that consumes MIDI events and renders audio: MIDI in via ProcessMidiEvent(MidiEvent), audio out via the ISampleProvider pull model. Implemented by the NAudio.Sampler engine, and the seam for any other MIDI-driven renderer (a synthesiser, a hosted VST instrument, …) to plug into the same playback hosts: SequencedMidiPlayer (timeline playback), OfflineMidiRenderer (faster-than-real-time render) and LiveMidiInstrument (live input from another thread).

IMidiOutput

A device-agnostic MIDI output. Implemented by the legacy winmm-backed MidiOut (in NAudio.WinMM) and the WinRT-backed WinRTMidiOut (in NAudio.Wasapi).

Enums

MetaEventType

MIDI MetaEvent Type

MidiCommandCode

MIDI command codes

MidiController

MidiController enumeration http://www.midi.org/techspecs/midimessages.php#3

MidiOutTechnology

Represents the different types of technology used by a MIDI out device