Table of Contents

Struct VoiceNote

Namespace
Celeritas.Core.Analysis
Assembly
Celeritas.dll

A note assigned to a specific voice.

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

Properties

Duration

Duration in whole-note units.

public Rational Duration { get; init; }

Property Value

Rational

End

End time (Offset + Duration) in whole-note units.

public Rational End { get; }

Property Value

Rational

Offset

Onset time in whole-note units.

public Rational Offset { get; init; }

Property Value

Rational

OriginalIndex

Original index in the NoteBuffer.

public int OriginalIndex { get; init; }

Property Value

int

Pitch

MIDI pitch number (middle C = 60).

public int Pitch { get; init; }

Property Value

int

Velocity

Note velocity.

public float Velocity { get; init; }

Property Value

float

Methods

ToString()

Formats as note name, octave, and onset (e.g. C4 @ 0).

public override string ToString()

Returns

string

Remarks

Folded rather than %: C# keeps the sign, so a pitch below zero — which Transpose(NoteBuffer, int) documents it can produce — indexed the name table backwards and printing a separated voice threw IndexOutOfRangeException. The octave is computed by flooring for the same reason, so B-1 does not print as B0.