Table of Contents

Class Voice

Namespace
Celeritas.Core.Analysis
Assembly
Celeritas.dll

Represents a separated voice (melodic line) in polyphonic music.

public sealed class Voice
Inheritance
Voice
Inherited Members

Properties

AmbitusEnd

Highest pitch (MIDI) in this voice (0 if empty).

public int AmbitusEnd { get; }

Property Value

int

AmbitusStart

Lowest pitch (MIDI) in this voice (0 if empty).

public int AmbitusStart { get; }

Property Value

int

AveragePitch

Average pitch of this voice.

public float AveragePitch { get; }

Property Value

float

Index

Position of this voice among the voices returned with it, 0 = highest: in Voices its place in the list, so Voices[voice.Index] is this voice; in a SatbSeparationResult its label, Soprano 0, Alto 1, Tenor 2, Bass 3. In Voices, Name records the register the voice's average pitch falls in; in an SATB result it is the label.

public int Index { get; init; }

Property Value

int

Remarks

This used to be the register slot the separator had used (soprano 0 … bass 3), which is what NoteToVoice and the crossing and spacing findings reported too, while every other voice number in an analysis was a position in Voices. Empty slots are dropped from that list, so for a tenor/bass duet the two numberings disagreed and Voices[NoteToVoice[i]] threw. There is one numbering now.

Name

Name of the voice: the register its average pitch is nearest, each name used once and in order down the list — Soprano, Alto, Tenor, Bass with four voices to fill, Upper, Middle, Lower with three, Upper and Lower with two; Voice N by position otherwise.

public string Name { get; init; }

Property Value

string

Remarks

This used to be the register slot the voice's first note had been placed in, which is not where the voice lies: a line entering above an active soprano opened in the alto slot and was named Alto while being the highest voice in the list.

Notes

Notes in this voice, ordered by time.

public List<VoiceNote> Notes { get; }

Property Value

List<VoiceNote>

Range

Pitch range of this voice.

public (int Min, int Max) Range { get; }

Property Value

(int Min, int Max)