Struct RomanNumeralChord
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
degreeScaleDegreeThe chord's diatonic scale degree.
qualityChordQualityThe chord's quality.
functionHarmonicFunctionThe chord's harmonic function.
Fields
Degree
The chord's diatonic scale degree.
public readonly ScaleDegree Degree
Field Value
Function
The chord's harmonic function.
public readonly HarmonicFunction Function
Field Value
IsValid
public readonly bool IsValid
Field Value
Quality
The chord's quality.
public readonly ChordQuality Quality
Field Value
Properties
Invalid
public static RomanNumeralChord Invalid { get; }
Property Value
Methods
GetPitchClassMask(KeySignature)
Returns a 12-bit pitch-class mask for this chord in the given key.
public ushort GetPitchClassMask(KeySignature key)
Parameters
keyKeySignature
Returns
GetPitchClasses(KeySignature)
Returns chord pitch classes (0-11) as an array.
public byte[] GetPitchClasses(KeySignature key)
Parameters
keyKeySignature
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
keyKeySignature
Returns
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
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
ToString()
Returns the roman numeral followed by the harmonic function (e.g. "V7 (Dominant)").
public override string ToString()
Returns
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
keyKeySignaturedestinationSpan<byte>