Class ReadingSettings
Settings according to which MIDI data should be read.
Inheritance
ReadingSettings
Assembly: Melanchall.DryWetMidi.dll
Syntax
public class ReadingSettings
Properties
CustomChunkTypes
Gets or sets collection of custom chunks types.
Declaration
public ChunkTypesCollection CustomChunkTypes { get; set; }
Property Value
Gets or sets collection of custom meta events types.
Declaration
public EventTypesCollection CustomMetaEventTypes { get; set; }
Property Value
DecodeTextCallback
Gets or sets a callback used to decode a string from the specified bytes during reading a text-based
meta event's text. The default is null
.
Declaration
public DecodeTextCallback DecodeTextCallback { get; set; }
Property Value
EndOfTrackStoringPolicy
Gets or sets reaction of the reading engine on End Of Track event encountered.
The default is
Omit.
Declaration
public EndOfTrackStoringPolicy EndOfTrackStoringPolicy { get; set; }
Property Value
Exceptions
Gets or sets reaction of the reading engine on new track chunk if already read
track chunks count is greater or equals the one declared in the file's header chunk.
The default is
Read.
Declaration
public ExtraTrackChunkPolicy ExtraTrackChunkPolicy { get; set; }
Property Value
Exceptions
InvalidChannelEventParameterValuePolicy
Gets or sets reaction of the reading engine on invalid value of a channel event's
parameter value. The default is
Abort.
Declaration
public InvalidChannelEventParameterValuePolicy InvalidChannelEventParameterValuePolicy { get; set; }
Property Value
Exceptions
InvalidChunkSizePolicy
Gets or sets reaction of the reading engine on difference between actual chunk's size and
the one declared in its header. The default is
Abort.
Declaration
public InvalidChunkSizePolicy InvalidChunkSizePolicy { get; set; }
Property Value
Exceptions
Gets or sets reaction of the reading engine on invalid value of a meta event's
parameter value. The default is
Abort.
Declaration
public InvalidMetaEventParameterValuePolicy InvalidMetaEventParameterValuePolicy { get; set; }
Property Value
Exceptions
InvalidSystemCommonEventParameterValuePolicy
Gets or sets reaction of the reading engine on invalid value of a system common event's
parameter value. The default is
Abort.
Declaration
public InvalidSystemCommonEventParameterValuePolicy InvalidSystemCommonEventParameterValuePolicy { get; set; }
Property Value
Exceptions
MissedEndOfTrackPolicy
Gets or sets reaction of the reading engine on missed
End Of Track
event.
The default is
Ignore.
Declaration
public MissedEndOfTrackPolicy MissedEndOfTrackPolicy { get; set; }
Property Value
Exceptions
Gets or sets reaction of the reading engine on missing of the header chunk in the MIDI file.
The default is
Abort.
Declaration
public NoHeaderChunkPolicy NoHeaderChunkPolicy { get; set; }
Property Value
Exceptions
NotEnoughBytesPolicy
Gets or sets reaction of the reading engine on lack of bytes in the underlying stream
that are needed to read MIDI data (for example, DWORD requires 4 bytes available).
The default is
Abort.
Declaration
public NotEnoughBytesPolicy NotEnoughBytesPolicy { get; set; }
Property Value
Exceptions
ReaderSettings
Gets or sets settings according to which
MidiReader should read MIDI data.
Declaration
public ReaderSettings ReaderSettings { get; set; }
Property Value
SilentNoteOnPolicy
Gets or sets reaction of the reading engine on
Note On
events with velocity of zero.
The default is
NoteOff.
Declaration
public SilentNoteOnPolicy SilentNoteOnPolicy { get; set; }
Property Value
Exceptions
StopReadingOnExpectedTrackChunksCountReached
Gets or sets a value indicating whether the reading engine should stop or not when
the count of read chunks is equal to the value defined in a file's header. The
default value is false
which means all chunks will be read.
Declaration
public bool StopReadingOnExpectedTrackChunksCountReached { get; set; }
Property Value
See Also
TextEncoding
Gets or sets an
Encoding that will be used to read the text of a
text-based meta events. The default is
ASCII.
Declaration
public Encoding TextEncoding { get; set; }
Property Value
UnexpectedTrackChunksCountPolicy
Gets or sets reaction of the reading engine on unexpected track chunks count. The default is
Ignore.
Declaration
public UnexpectedTrackChunksCountPolicy UnexpectedTrackChunksCountPolicy { get; set; }
Property Value
Exceptions
UnknownChannelEventCallback
Declaration
public UnknownChannelEventCallback UnknownChannelEventCallback { get; set; }
Property Value
UnknownChannelEventPolicy
Gets or sets reaction of the reading engine on unknown channel event. The default is
Abort.
Declaration
public UnknownChannelEventPolicy UnknownChannelEventPolicy { get; set; }
Property Value
Exceptions
UnknownChunkIdPolicy
Gets or sets reaction of the reading engine on chunk with unknown ID. The default
is
ReadAsUnknownChunk.
Declaration
public UnknownChunkIdPolicy UnknownChunkIdPolicy { get; set; }
Property Value
Exceptions
Gets or sets reaction of the reading engine on unknown file format stored in a header chunk.
The default is
Ignore.
Declaration
public UnknownFileFormatPolicy UnknownFileFormatPolicy { get; set; }
Property Value
Exceptions
ZeroLengthDataPolicy
Gets or sets reaction of the reading engine on zero-length objects such as strings or arrays.
The default is
ReadAsEmptyObject.
Declaration
public ZeroLengthDataPolicy ZeroLengthDataPolicy { get; set; }
Property Value
Exceptions