Search Results for

    Show / Hide Table of Contents

    Class MetaEvent

    Represents a MIDI file meta event.
    Inheritance
    object
    MidiEvent
    MetaEvent
    BaseTextEvent
    ChannelPrefixEvent
    EndOfTrackEvent
    KeySignatureEvent
    PortPrefixEvent
    SequenceNumberEvent
    SequencerSpecificEvent
    SetTempoEvent
    SmpteOffsetEvent
    TimeSignatureEvent
    UnknownMetaEvent
    Inherited Members
    MidiEvent.UnknownContentSize
    MidiEvent.EventType
    MidiEvent.DeltaTime
    MidiEvent.CloneEvent()
    MidiEvent.Clone()
    MidiEvent.Equals(MidiEvent, MidiEvent)
    MidiEvent.Equals(MidiEvent, MidiEvent, out string)
    MidiEvent.Equals(MidiEvent, MidiEvent, MidiEventEqualityCheckSettings)
    MidiEvent.Equals(MidiEvent, MidiEvent, MidiEventEqualityCheckSettings, out string)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Melanchall.DryWetMidi.Core
    Assembly: Melanchall.DryWetMidi.dll
    Syntax
    public abstract class MetaEvent : MidiEvent
    Remarks

    Meta event specifies non-MIDI information useful to specific applications.

    As with chunks, future meta events may be designed which may not be known to existing programs, so programs must properly ignore meta events which they do not recognize, and indeed, should expect to see them. Programs must never ignore the length of a meta-event which they do recognize, and they shouldn't be surprised if it's bigger than they expected. If so, they must ignore everything past what they know about. However, they must not add anything of their own to the end of a meta-event.

    You can create custom meta events that can be read from and written to a MIDI file. See Custom meta events article to learn more.

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

    Constructors

    MetaEvent()

    Initializes a new instance of the MetaEvent.
    Declaration
    protected MetaEvent()

    Methods

    GetContentSize(WritingSettings)

    Gets the size of the content of a MIDI meta event.
    Declaration
    protected abstract int GetContentSize(WritingSettings settings)
    Parameters
    Type Name Description
    WritingSettings settings Settings according to which the event's content must be written.
    Returns
    Type Description
    int Size of the event's content.

    GetStandardMetaEventStatusBytes()

    Returns array of status bytes of standard meta events.
    Declaration
    public static byte[] GetStandardMetaEventStatusBytes()
    Returns
    Type Description
    byte[] Array of status bytes of standard meta events.
    Remarks
    This method can be used for choosing status byte for custom meta event to prevent the status byte is equal to one of the standard ones.

    ReadContent(MidiReader, ReadingSettings, int)

    Reads content of a MIDI meta event.
    Declaration
    protected abstract void ReadContent(MidiReader reader, ReadingSettings settings, int size)
    Parameters
    Type Name Description
    MidiReader reader Reader to read the content with.
    ReadingSettings settings Settings according to which the event's content must be read.
    int size Size of the event's content.

    WriteContent(MidiWriter, WritingSettings)

    Writes content of a MIDI meta event.
    Declaration
    protected abstract void WriteContent(MidiWriter writer, WritingSettings settings)
    Parameters
    Type Name Description
    MidiWriter writer Writer to write the content with.
    WritingSettings settings Settings according to which the event's content must be written.
    In this article
    Back to top 2024 / Generated by DocFX