Table of Contents

Class HarmonizationResult

Namespace
Celeritas.Core.Harmonization
Assembly
Celeritas.dll

Result of melody harmonization.

public sealed class HarmonizationResult
Inheritance
HarmonizationResult
Inherited Members

Properties

Chords

Chord assignments for each time slice.

public IReadOnlyList<ChordAssignment> Chords { get; init; }

Property Value

IReadOnlyList<ChordAssignment>

Key

The detected or specified key.

public KeySignature Key { get; init; }

Property Value

KeySignature

TotalCost

Total cost of this harmonization (lower = better).

public float TotalCost { get; init; }

Property Value

float

Methods

GetSymbols()

The chord symbols of Chords in order — "C", "Dm", "Bdim" — spelled with flats when Key is written with flats (F, Bb, Eb, Ab and Db major and their relative minors D, G, C, F and Bb; pitch class 6 is F# major and pitch class 3 minor is D# minor, as ToString() names them), so a harmonization can be handed straight to ProgressionAdvisor and the other readers of symbols.

public IEnumerable<string> GetSymbols()

Returns

IEnumerable<string>

Remarks

These used to be the display names ToString() gives, "B Diminished" and "A# Major", of which TryParseChordSymbol(string, out int[]) happens to read only the major and minor ones: every diminished chord was refused, and a flat key came back spelled in sharps. A chord whose quality has no conventional symbol still reads as its name, e.g. "C Unknown".