Table of Contents

Struct RomanNumeralChord

Namespace
Celeritas.Core
Assembly
Celeritas.dll

Result of roman numeral analysis

public readonly struct RomanNumeralChord
Inherited Members

Constructors

RomanNumeralChord(ScaleDegree, ChordQuality, HarmonicFunction)

Result of roman numeral analysis

public RomanNumeralChord(ScaleDegree degree, ChordQuality quality, HarmonicFunction function)

Parameters

degree ScaleDegree

The chord's diatonic scale degree.

quality ChordQuality

The chord's quality.

function HarmonicFunction

The chord's harmonic function.

Fields

Degree

The chord's diatonic scale degree.

public readonly ScaleDegree Degree

Field Value

ScaleDegree

Function

The chord's harmonic function.

public readonly HarmonicFunction Function

Field Value

HarmonicFunction

IsValid

true for a real analysis result; false for Invalid.

public readonly bool IsValid

Field Value

bool

Quality

The chord's quality.

public readonly ChordQuality Quality

Field Value

ChordQuality

Properties

Invalid

A sentinel chord representing a failed or absent analysis (IsValid is false).

public static RomanNumeralChord Invalid { get; }

Property Value

RomanNumeralChord

Methods

GetPitchClassMask(KeySignature)

Returns a 12-bit pitch-class mask for this chord in the given key.

public ushort GetPitchClassMask(KeySignature key)

Parameters

key KeySignature

Returns

ushort

GetPitchClasses(KeySignature)

Returns chord pitch classes (0-11) as an array.

public byte[] GetPitchClasses(KeySignature key)

Parameters

key KeySignature

Returns

byte[]

GetRootPitchClass(KeySignature)

Gets the pitch class (0-11) of this chord's root in the given key: the degree's step of the major or natural-minor scale, except that a diminished-family chord on Vii of a minor key stands on the raised seventh — the leading tone of harmonic and melodic minor, where vii°, vii°7 and viiø7 live — a semitone below the tonic. The subtonic a whole step below is never diminished in any form of the minor scale, so the quality decides which seventh degree is meant.

public byte GetRootPitchClass(KeySignature key)

Parameters

key KeySignature

Returns

byte

Remarks

Analyze(int[], KeySignature) reads Bdim7 in C minor as vii°7. Spelled back through the natural-minor step alone, that chord came out on Bb — a diminished seventh no minor key has — so a numeral and its own pitches disagreed.

ToNashville()

Formats this chord in the Nashville Number System: the scale degree as a number (1-7) with a quality suffix (e.g. "2m", "5", "1maj7", "7°"); returns "?" when invalid. Unlike a roman numeral, the number never changes case — quality is carried entirely by the suffix.

public string ToNashville()

Returns

string

ToRomanNumeral()

Formats this chord as a roman numeral with case and quality suffix (e.g. "V7", "iiø7", "IVmaj7"); returns "?" when invalid.

public string ToRomanNumeral()

Returns

string

ToString()

Returns the roman numeral followed by the harmonic function (e.g. "V7 (Dominant)").

public override string ToString()

Returns

string

WritePitchClasses(KeySignature, Span<byte>)

Writes chord pitch classes (0-11) into destination and returns the number written. The chord is spelled from its root using the current Quality.

public int WritePitchClasses(KeySignature key, Span<byte> destination)

Parameters

key KeySignature
destination Span<byte>

Returns

int