Class MidiFile
Class able to read a MIDI file
public class MidiFile
- Inheritance
-
MidiFile
- Inherited Members
Constructors
MidiFile(Stream, bool)
Opens a MIDI file stream for reading
public MidiFile(Stream inputStream, bool strictChecking)
Parameters
inputStreamStreamThe input stream containing a MIDI file
strictCheckingboolIf true will error on non-paired note events
MidiFile(string)
Opens a MIDI file for reading
public MidiFile(string filename)
Parameters
filenamestringName of MIDI file
MidiFile(string, bool)
Opens a MIDI file for reading
public MidiFile(string filename, bool strictChecking)
Parameters
Properties
DeltaTicksPerQuarterNote
Delta Ticks Per Quarter Note
public int DeltaTicksPerQuarterNote { get; }
Property Value
Events
The collection of events in this MIDI file
public MidiEventCollection Events { get; }
Property Value
FileFormat
MIDI File format
public int FileFormat { get; }
Property Value
Tracks
Number of tracks in this MIDI file
public int Tracks { get; }
Property Value
Methods
Export(Stream, MidiEventCollection)
Exports a MIDI event collection to a stream.
public static void Export(Stream stream, MidiEventCollection events)
Parameters
streamStreamStream to write the MIDI data to. Must be writable and seekable — track chunk sizes are patched in after each track is written. The stream is left open on completion; the caller is responsible for disposing it.
eventsMidiEventCollectionEvents to export.
Export(string, MidiEventCollection)
Exports a MIDI file
public static void Export(string filename, MidiEventCollection events)
Parameters
filenamestringFilename to export to
eventsMidiEventCollectionEvents to export
ToString()
Describes the MIDI file
public override string ToString()
Returns
- string
A string describing the MIDI file and its events