Table of Contents

Struct RhythmEvent

Namespace
Celeritas.Core.Analysis
Assembly
Celeritas.dll

A rhythmic event (onset) with metrical position.

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

Properties

BeatInMeasure

Position within the measure, in whole-note units from the barline.

public Rational BeatInMeasure { get; init; }

Property Value

Rational

Duration

Duration of the event, in whole-note units.

public Rational Duration { get; init; }

Property Value

Rational

End

End time of the event (Offset + Duration), in whole-note units.

public Rational End { get; }

Property Value

Rational

IsSyncopated

Whether the note is syncopated: it starts on a weaker metrical position than the strongest beat it holds through, such as a quarter on the "and" of 1 lasting through beat 2.

public bool IsSyncopated { get; init; }

Property Value

bool

Remarks

This used to ask only whether the note held through a strong or medium beat, so the quarter on the "and" of 1 in the analyzer's own Syncopated pattern (eighth, quarter, eighth) was not syncopated, and two bars of it scored 0.00 in the same result that said "featuring Syncopated pattern". A half note on beat 2 of 3/4 still is not syncopated: beat 3, which it holds through, is no stronger than the beat it began on.

Measure

Zero-based index of the measure containing the onset.

public int Measure { get; init; }

Property Value

int

Offset

Onset time of the event, in whole-note units.

public Rational Offset { get; init; }

Property Value

Rational

OriginalIndex

Index of the note in the original input buffer.

public int OriginalIndex { get; init; }

Property Value

int

Strength

Metrical strength of the onset position.

public BeatStrength Strength { get; init; }

Property Value

BeatStrength