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, String)
    MidiEvent.Equals(MidiEvent, MidiEvent, MidiEventEqualityCheckSettings)
    MidiEvent.Equals(MidiEvent, MidiEvent, MidiEventEqualityCheckSettings, String)
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    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 SMPE 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 occured:

    • 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.

    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
    Int32 Size of the event's content.
    Overrides
    MetaEvent.GetContentSize(WritingSettings)

    ReadContent(MidiReader, ReadingSettings, Int32)

    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.
    Int32 size Size of the event's content.
    Overrides
    MetaEvent.ReadContent(MidiReader, ReadingSettings, Int32)

    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 2022 / Generated by DocFX