NOW LOADING

MidiFileReadStatus


Describes the outcome of reading a MIDI file
Namespace Windows.Devices.Midi2.Utilities.Files
Type Name MidiFileReadStatus
Type WinRT Enumeration (a 32-bit unsigned or signed integer)
IDL MidiFileReadStatusEnum.idl

MidiFileReadStatus is reported by MidiFileReadResult and tells you why a read did or did not produce a sequence.

Values

Value Numeric Value Description
Success 0 The file produced a usable sequence. Check Truncated on the result to find out whether all of it was read
NotAMidiFile 1 The header isn’t one this reader recognizes
UnsupportedFormat 2 It’s a MIDI file, but a kind this reader doesn’t handle
CorruptData 3 The file couldn’t be read far enough to get anything playable
NoPlayableData 4 The file read cleanly, but there’s nothing in it to send
TooLarge 5 Refused before reading, because of the limits in MidiFileReadOptions
ReadError 6 The stream or file couldn’t be read

Remarks

Success doesn’t mean the whole file was read. A file that stops making sense partway through still reports Success, with Truncated set to true on the result, because what was read is usually still worth hearing.

Didn't find what you were looking for?

Windows MIDI Services is an open source project with all source available on GitHub. We have a great community on Discord as well. Between GitHub and Discord, you should find the information you are looking for.