Search Results for

    Show / Hide Table of Contents

    Class UnknownChunk

    Represents an unknown chunk.
    Inheritance
    object
    MidiChunk
    UnknownChunk
    Inherited Members
    MidiChunk.IdLength
    MidiChunk.ChunkId
    MidiChunk.GetStandardChunkIds()
    MidiChunk.Equals(MidiChunk, MidiChunk)
    MidiChunk.Equals(MidiChunk, MidiChunk, out string)
    MidiChunk.Equals(MidiChunk, MidiChunk, MidiChunkEqualityCheckSettings)
    MidiChunk.Equals(MidiChunk, MidiChunk, MidiChunkEqualityCheckSettings, out string)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Melanchall.DryWetMidi.Core
    Assembly: Melanchall.DryWetMidi.dll
    Syntax
    public sealed class UnknownChunk : MidiChunk
    Remarks

    Structure of MIDI file chunks allows custom chunks be implemented and written to a MIDI file. Chunks DryWetMIDI doesn't know about will be read as an instances of the UnknownChunk.

    See https://midi.org/standard-midi-files-specification for detailed MIDI file specification.

    Properties

    Data

    Gets data contained in the current UnknownChunk.
    Declaration
    public byte[] Data { get; }
    Property Value
    Type Description
    byte[]

    Methods

    Clone()

    Clones chunk by creating a copy of it.
    Declaration
    public override MidiChunk Clone()
    Returns
    Type Description
    MidiChunk Copy of the chunk.
    Overrides
    MidiChunk.Clone()

    GetContentSize(WritingSettings)

    Gets size of UnknownChunk's content as number of bytes required to write it according to the specified WritingSettings.
    Declaration
    protected override uint GetContentSize(WritingSettings settings)
    Parameters
    Type Name Description
    WritingSettings settings Settings according to which the chunk's content will be written.
    Returns
    Type Description
    uint Number of bytes required to write UnknownChunk's content.
    Overrides
    MidiChunk.GetContentSize(WritingSettings)

    ReadContent(MidiReader, ReadingSettings, uint)

    Reads content of a UnknownChunk.
    Declaration
    protected override void ReadContent(MidiReader reader, ReadingSettings settings, uint size)
    Parameters
    Type Name Description
    MidiReader reader Reader to read the chunk's content with.
    ReadingSettings settings Settings according to which the chunk's content must be read.
    uint size Expected size of the content taken from the chunk's header.
    Overrides
    MidiChunk.ReadContent(MidiReader, ReadingSettings, uint)
    Remarks
    Content of an UnknownChunk is array of bytes.
    Exceptions
    Type Condition
    ObjectDisposedException Method was called after the reader's underlying stream was disposed.
    IOException An I/O error occurred on the reader's underlying stream.

    ToString()

    Returns a string that represents the current object.
    Declaration
    public override string ToString()
    Returns
    Type Description
    string A string that represents the current object.
    Overrides
    object.ToString()

    WriteContent(MidiWriter, WritingSettings)

    Writes content of a UnknownChunk.
    Declaration
    protected override void WriteContent(MidiWriter writer, WritingSettings settings)
    Parameters
    Type Name Description
    MidiWriter writer Writer to write the chunk's content with.
    WritingSettings settings Settings according to which the chunk's content must be written.
    Overrides
    MidiChunk.WriteContent(MidiWriter, WritingSettings)
    Remarks
    Content of an UnknownChunk is array of bytes.
    Exceptions
    Type Condition
    ObjectDisposedException Method was called after the writer's underlying stream was disposed.
    IOException An I/O error occurred on the writer's underlying stream.

    Extension Methods

    CsvSerializer.SerializeToCsv(MidiChunk, Stream, TempoMap, CsvSerializationSettings, ObjectType, ObjectDetectionSettings)
    CsvSerializer.SerializeToCsv(MidiChunk, string, bool, TempoMap, CsvSerializationSettings, ObjectType, ObjectDetectionSettings)
    In this article
    Back to top 2024 / Generated by DocFX