1-based scale degree of the chord root: 1 is the tonic.
Key/scale context, as a key name, a key/scale, or a Key.
The diatonic triad.
If the scale is not heptatonic. Stacking thirds means skipping every other degree, which only lands on a triad when there are seven of them, so the pentatonic, blues, whole-tone, octatonic and chromatic scales have no diatonic triad; use chordFromDegree with an explicit quality there.
Build the diatonic triad rooted on a scale degree by stacking scale thirds.
Unlike chordFromDegree, the chord quality is derived from the scale rather than supplied, so degrees yield their scale-correct triads (e.g. a diminished triad on the leading tone of a major key).