@libraz/libcantus - v1.1.0
    Preparing search index...

    Function chordFromDegree

    • Build a chord rooted on a diatonic scale degree.

      The root pitch class is the degree's diatonic pitch class in key; the quality's interval template is attached unchanged. Degrees beyond the scale length wrap around, so degree 8 of a heptatonic scale is its degree 1.

      Parameters

      • degree: number

        1-based scale degree of the chord root: 1 is the tonic.

      • ext: ChordQuality

        Chord quality to apply.

      • key: KeyLike

        Key context supplying the diatonic root, as a key name, a key/scale, or a Key.

      Returns ChordData

      The constructed chord.

      If degree is not a positive integer, or ext is not a known quality.