Search Results for

    Show / Hide Table of Contents

    Class TimeSignatureEvent

    Represents a Time Signature meta event.
    Inheritance
    object
    MidiEvent
    MetaEvent
    TimeSignatureEvent
    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 TimeSignatureEvent : MetaEvent
    Remarks
    The MIDI time signature meta message defines the musical time signature of a MIDI sequence.

    Constructors

    TimeSignatureEvent()

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

    TimeSignatureEvent(byte, byte)

    Initializes a new instance of the TimeSignatureEvent with the specified numerator and denominator.
    Declaration
    public TimeSignatureEvent(byte numerator, byte denominator)
    Parameters
    Type Name Description
    byte numerator Numerator of the time signature.
    byte denominator Denominator of the time signature.
    Exceptions
    Type Condition
    ArgumentOutOfRangeException denominator is zero or is not a power of two.

    TimeSignatureEvent(byte, byte, byte, byte)

    Initializes a new instance of the TimeSignatureEvent with the specified numerator, denominator, number of MIDI clocks per metronome click and number of 32nd notes per beat.
    Declaration
    public TimeSignatureEvent(byte numerator, byte denominator, byte clocksPerClick, byte thirtySecondNotesPerBeat)
    Parameters
    Type Name Description
    byte numerator Numerator of the time signature.
    byte denominator Denominator of the time signature.
    byte clocksPerClick Number of MIDI clocks per metronome click.
    byte thirtySecondNotesPerBeat Number of 32nd notes per beat.
    Exceptions
    Type Condition
    ArgumentOutOfRangeException denominator is zero or is not a power of two.

    Fields

    DefaultClocksPerClick

    Default number of MIDI clock ticks per metronome click.
    Declaration
    public const byte DefaultClocksPerClick = 24
    Field Value
    Type Description
    byte

    DefaultDenominator

    Denominator of the default time signature.
    Declaration
    public const byte DefaultDenominator = 4
    Field Value
    Type Description
    byte

    DefaultNumerator

    Numerator of the default time signature.
    Declaration
    public const byte DefaultNumerator = 4
    Field Value
    Type Description
    byte

    DefaultThirtySecondNotesPerBeat

    Default number of 32nd notes per beat.
    Declaration
    public const byte DefaultThirtySecondNotesPerBeat = 8
    Field Value
    Type Description
    byte

    Properties

    ClocksPerClick

    Gets or sets number of MIDI clock ticks per metronome click.
    Declaration
    public byte ClocksPerClick { get; set; }
    Property Value
    Type Description
    byte

    Denominator

    Gets or sets denominator of the time signature.
    Declaration
    public byte Denominator { get; set; }
    Property Value
    Type Description
    byte
    Exceptions
    Type Condition
    ArgumentOutOfRangeException Denominator is zero or is not a power of two.

    Numerator

    Gets or sets numerator of the time signature.
    Declaration
    public byte Numerator { get; set; }
    Property Value
    Type Description
    byte

    ThirtySecondNotesPerBeat

    Gets or sets number of 32nd notes per beat.
    Declaration
    public byte ThirtySecondNotesPerBeat { get; set; }
    Property Value
    Type Description
    byte

    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