Search Results for

    Show / Hide Table of Contents

    Class SmpteOffsetEvent

    Represents a SMPTE Offset meta event.
    Inheritance
    object
    MidiEvent
    MetaEvent
    SmpteOffsetEvent
    Inherited Members
    MetaEvent.GetStandardMetaEventStatusBytes()
    MidiEvent.UnknownContentSize
    MidiEvent.EventType
    MidiEvent.DeltaTime
    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.ReferenceEquals(object, object)
    Namespace: Melanchall.DryWetMidi.Core
    Assembly: Melanchall.DryWetMidi.dll
    Syntax
    public sealed class SmpteOffsetEvent : MetaEvent
    Remarks
    The MIDI SMPTE offset meta message specifies an offset for the starting point of a MIDI track from the start of a sequence in terms of SMPTE time (hours:minutes:seconds:frames:subframes).

    Constructors

    SmpteOffsetEvent()

    Initializes a new instance of the SmpteOffsetEvent.
    Declaration
    public SmpteOffsetEvent()

    SmpteOffsetEvent(SmpteFormat, byte, byte, byte, byte, byte)

    Initializes a new instance of the SmpteOffsetEvent with the specified SMPTE format, hours, minutes, seconds, number of frames and sub-frames.
    Declaration
    public SmpteOffsetEvent(SmpteFormat format, byte hours, byte minutes, byte seconds, byte frames, byte subFrames)
    Parameters
    Type Name Description
    SmpteFormat format SMPTE format.
    byte hours Number of hours.
    byte minutes Number of minutes.
    byte seconds Number of seconds.
    byte frames Number of frames.
    byte subFrames Number of sub-frames.
    Exceptions
    Type Condition
    InvalidEnumArgumentException format specified an invalid value.
    ArgumentOutOfRangeException

    One of the following errors occurred:

    • hours is out of valid range.
    • minutes is out of valid range.
    • seconds is out of valid range.
    • frames is out of valid range.
    • subFrames is out of valid range.

    Fields

    MaxHours

    Represents the largest possible hours value.
    Declaration
    public const byte MaxHours = 23
    Field Value
    Type Description
    byte

    MaxMinutes

    Represents the largest possible minutes value.
    Declaration
    public const byte MaxMinutes = 59
    Field Value
    Type Description
    byte

    MaxSeconds

    Represents the largest possible seconds value.
    Declaration
    public const byte MaxSeconds = 59
    Field Value
    Type Description
    byte

    MaxSubFrames

    Represents the largest possible sub-frames value.
    Declaration
    public const byte MaxSubFrames = 99
    Field Value
    Type Description
    byte

    Properties

    Format

    Gets or sets SMPTE format.
    Declaration
    public SmpteFormat Format { get; set; }
    Property Value
    Type Description
    SmpteFormat

    Frames

    Gets or sets number of frames.
    Declaration
    public byte Frames { get; set; }
    Property Value
    Type Description
    byte
    Remarks
    Maximum valid value for the Frames depends on the frame rate specified by the Format: 23 for TwentyFour, 24 for TwentyFive, 28 for ThirtyDrop and 29 for Thirty.
    Exceptions
    Type Condition
    ArgumentOutOfRangeException Frames number is out of valid range.

    Hours

    Gets or sets number of hours.
    Declaration
    public byte Hours { get; set; }
    Property Value
    Type Description
    byte
    Exceptions
    Type Condition
    ArgumentOutOfRangeException Hours number is out of valid range (0-23).

    Minutes

    Gets or sets number of minutes.
    Declaration
    public byte Minutes { get; set; }
    Property Value
    Type Description
    byte
    Exceptions
    Type Condition
    ArgumentOutOfRangeException Minutes number is out of valid range (0-59).

    Seconds

    Gets or sets number of seconds.
    Declaration
    public byte Seconds { get; set; }
    Property Value
    Type Description
    byte
    Exceptions
    Type Condition
    ArgumentOutOfRangeException Seconds number is out of valid range (0-59).

    SubFrames

    Gets or sets number of sub-frames.
    Declaration
    public byte SubFrames { get; set; }
    Property Value
    Type Description
    byte
    Exceptions
    Type Condition
    ArgumentOutOfRangeException Sub-frames number is out of valid range (0-99).

    Methods

    CloneEvent()

    Clones event by creating a copy of it.
    Declaration
    protected override MidiEvent CloneEvent()
    Returns
    Type Description
    MidiEvent Copy of the event.
    Overrides
    MidiEvent.CloneEvent()

    GetContentSize(WritingSettings)

    Gets the size of the content of a MIDI meta event.
    Declaration
    protected override 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 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)

    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 MIDI meta event.
    Declaration
    protected override 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