Table of Contents

Struct TimeSignature

Namespace
NAudio.Sequencing
Assembly
NAudio.Core.dll

A musical time signature, expressed as numerator over denominator (e.g. 4/4, 3/4, 6/8). The denominator is the actual note value (4 for quarter, 8 for eighth), not the MIDI-file power-of-two exponent.

public readonly record struct TimeSignature : IEquatable<TimeSignature>
Implements
Inherited Members

Constructors

TimeSignature(int, int)

A musical time signature, expressed as numerator over denominator (e.g. 4/4, 3/4, 6/8). The denominator is the actual note value (4 for quarter, 8 for eighth), not the MIDI-file power-of-two exponent.

public TimeSignature(int Numerator, int Denominator)

Parameters

Numerator int
Denominator int

Properties

Denominator

public int Denominator { get; init; }

Property Value

int

FourFour

Common time (4/4).

public static TimeSignature FourFour { get; }

Property Value

TimeSignature

Numerator

public int Numerator { get; init; }

Property Value

int

TicksPerBar

The number of canonical ticks per bar in this time signature.

public long TicksPerBar { get; }

Property Value

long

TicksPerBeat

The number of canonical ticks per beat in this time signature. For 4/4 this is CanonicalPpq; for 6/8 it is half that.

public long TicksPerBeat { get; }

Property Value

long

Methods

Validate()

Throws if the time signature is structurally invalid.

public void Validate()