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
Properties
Denominator
public int Denominator { get; init; }
Property Value
FourFour
Common time (4/4).
public static TimeSignature FourFour { get; }
Property Value
Numerator
public int Numerator { get; init; }
Property Value
TicksPerBar
The number of canonical ticks per bar in this time signature.
public long TicksPerBar { get; }
Property Value
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
Methods
Validate()
Throws if the time signature is structurally invalid.
public void Validate()