User:Gnathan87/Draft/Interval number and quality

Interval naming
In Western music theory, an interval name is composed of a number (or diatonic number) and quality. For example, the interval 'major third' has number '3' and and quality 'major'. These terms describe the interval relative to the major scale whose tonic is the lower note in the interval. Without accidentals, the upper note represents a particular degree of the scale, while any accidentals represent a deviation from that degree. The interval number describes the degree; the interval quality the deviation.

Number
Suppose the key is the major key of the lower note, and consider the major scale of this key. If the lower note itself is defined as degree 1 in the scale, the interval number is the degree of the upper note written without accidentals. Equivalently, it is the number of staff positions (lines and spaces) encompassed by the interval, including the endpoints. For example, the interval E♭–A has interval number 4. This is either because in E♭ major, A must be written A♮, so without the accidental A♭ is the fourth degree of the E♭ major scale, or because E♭–A encompasses two lines and two spaces on the stave.

Quality
Simple intervals (up to an octave) whose upper note lies in the major scale of the lower note have the quality perfect if the interval number is 1, 4, 5 or 8, or major if the interval number is 2, 3, 6 or 7. The effect of accidentals is shown in the diagram. Perfect and major intervals widened by one semitone are augmented. Perfect intervals contracted by one semitone are diminished, and major intervals contracted by one semitone are minor. Major intervals contracted by two semitones are also called diminished. Augmented/diminished intervals become doubly/triply/etc augmented/diminished as they are expanded or contracted further, although these are rarely seen in practice.

Compound intervals (over an octave) have the quality of the simple interval on which they are based. For example, C0–E1 is a major 10th, as C1–E1 is a major 3rd.

Another view of interval quality is to consider all possible intervals within the diatonic scale, as shown for C major in the table. It can be seen that each interval number has at most two possible qualities. For interval numbers 1, 4, 5 and 8, the non-tritone is perfect, and the tritone (if present) is augmented or diminished with respect to the non-tritone. For interval numbers 2, 3, 6 and 7 the larger interval is major and the smaller interval minor. Adding an accidental to the lower note has the same effect on the interval name as adding the opposite accidental to the upper note, so the diagram of interval qualities can be used to determine how quality changes as accidentals are added to either note.

Shorthand notation
Interval names may also be written in a shorthand form composed of an abbreviated quality name and the interval number. For example, 'M3' for major third. M (major) or P (perfect) may optionally be omitted. The abbreviation "TT" (without a number) may be used for a tritone. The following abbreviations may be used for interval quality:

Examples
Compare the intervals A–C♯, A–D♭, A♯–D, and A♭–B♯. Each of these spans four semitones, but:
 * A–C♯ is a major third (as it spans three staff positions),
 * A–D♭ and A♯–D are diminished fourths,
 * A♭–B♯ is a doubly augmented second.

The interval F♭–B♯ is an example of a triply-augmented fourth. In the (exotic) key of F♭ major, B has a double flat, so the sharp augments the perfect fourth F♭–B𝄫 by three semitones.

Below is the complete set of intervals on C: