Template:Diatonic interval category

From XenReference

The major third (M3), as a diatonic interval category, is an interval that spans 2 steps of the diatonic scale with the major (wider) quality. It is generated by stacking 4 fifths octave-reduced, and depending on the specific tuning it ranges from 343 to 480 cents (2\7 to 2\5).
An interval in just intonation may be labeled "major third" if it is reasonably mapped to 2 steps of the diatonic scale and 4 steps of the dodecatonic chromatic scale.

The diminished fourth (d4) is enharmonic with the major third, ranging from 240 to 514 cents (1\5 to 3\7). It is generated by stacking 8 fourths octave-reduced (and as such is not found in the diatonic scale).
An interval in just intonation may be labeled "diminished fourth" if it is reasonably mapped to 3 steps of the diatonic scale and 4 steps of the dodecatonic chromatic scale.



The first parameter of the template is the fifthspan of the diatonic interval. Currently this only supports fifthspans within [-12, 12]. The second parameter is whether the interval of 0 fifths should be interpreted as a unison or an octave.