Class VoiceSeparationResult
Result of voice separation analysis.
public sealed record VoiceSeparationResult : IEquatable<VoiceSeparationResult>
- Inheritance
-
VoiceSeparationResult
- Implements
- Inherited Members
Properties
NoteToVoice
The voice each note went to, keyed by the note's index in the source buffer: the value is
a position in Voices, so Voices[NoteToVoice[i]] is the voice holding
note i. Rests have no entry.
public Dictionary<int, int> NoteToVoice { get; init; }
Property Value
- Dictionary<int, int>
Remarks
The value used to be the register slot the note was assigned to (soprano 0 … bass 3), which is not a position in Voices once an empty slot has been dropped: a tenor/bass duet mapped every note to 2 or 3 in a list of two voices.
SeparationQuality
Heuristic separation quality, 0..1 (higher = cleaner).
public required float SeparationQuality { get; init; }
Property Value
TotalNotes
Total number of notes in the source buffer.
public required int TotalNotes { get; init; }
Property Value
VoiceCrossings
Count of detected voice crossings: notes placed above the latest pitch of the voice listed before theirs, or below that of the voice listed after it.
public required int VoiceCrossings { get; init; }
Property Value
Voices
Separated voices, ordered highest to lowest by average pitch; empty voices are omitted. Each voice's Index is its position here, and so is every voice number in NoteToVoice and in the polyphony analysis and counterpoint check built on this result.
public required IReadOnlyList<Voice> Voices { get; init; }
Property Value
Remarks
The order used to be that of the register slots the separator had assigned in, which is the order of the voices' first notes, not of the voices: once a line may enter above an active voice, the highest voice could come second.