Search Results for

    Show / Hide Table of Contents

    Class BaseTextEvent

    Represents a text meta event.
    Inheritance
    object
    MidiEvent
    MetaEvent
    BaseTextEvent
    CopyrightNoticeEvent
    CuePointEvent
    DeviceNameEvent
    InstrumentNameEvent
    LyricEvent
    MarkerEvent
    ProgramNameEvent
    SequenceTrackNameEvent
    TextEvent
    Inherited Members
    MetaEvent.GetStandardMetaEventStatusBytes()
    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 BaseTextEvent : MetaEvent
    Remarks
    There are several meta events that have text content and the same structure. All these events are derived from BaseTextEvent.

    Constructors

    BaseTextEvent(MidiEventType)

    Initializes a new instance of the BaseTextEvent.
    Declaration
    protected BaseTextEvent(MidiEventType eventType)
    Parameters
    Type Name Description
    MidiEventType eventType

    BaseTextEvent(MidiEventType, string)

    Initializes a new instance of the BaseTextEvent with the specified text.
    Declaration
    protected BaseTextEvent(MidiEventType eventType, string text)
    Parameters
    Type Name Description
    MidiEventType eventType The type of event.
    string text Text contained in the event.
    Exceptions
    Type Condition
    InvalidEnumArgumentException eventType specified an invalid value.

    Properties

    Text

    Gets or sets text contained in the event.
    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    string

    Methods

    GetContentSize(WritingSettings)

    Gets the size of the content of a MIDI meta event.
    Declaration
    protected override sealed 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.
    Overrides
    MetaEvent.GetContentSize(WritingSettings)

    ReadContent(MidiReader, ReadingSettings, int)

    Reads content of a MIDI meta event.
    Declaration
    protected override sealed 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.
    Overrides
    MetaEvent.ReadContent(MidiReader, ReadingSettings, int)
    Exceptions
    Type Condition
    ArgumentOutOfRangeException Text event cannot be read since the size is negative number.

    WriteContent(MidiWriter, WritingSettings)

    Writes content of a MIDI meta event.
    Declaration
    protected override sealed 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.
    Overrides
    MetaEvent.WriteContent(MidiWriter, WritingSettings)
    In this article
    Back to top 2024 / Generated by DocFX