In musical set theory, there are four kinds of interval:
The ordered pitch interval. is the number of semitones that separates one pitch from another, upward or downward. It is thus more specific than the unordered pitch interval in that it represents the directionality of the interval. An ordered pitch interval always includes a plus or minus sign. Thus this interval type can describe a melodic as well as a harmonic interval.
The unordered pitch interval does not include directionality information and is thus less specific than the ordered pitch interval. It is still the distance between two pitches measured in semitones, but that distance is not qualified by a positive (+) or negative symbol. (-). An unordered pitch interval can describe a harmonic interval but not a melodic interval.
Both types of pitch intervals describe octave information in that they do not treat all octaves as being equivalent. Pitch intervals, both ordered and unordered, may therefore be larger than 12.
By treating all octaves as being equivalent, pitch-classes contain less information (ex 'C') than pitches (ex: C3). Pitch-class intervals (below) are therefore never larger than 12 semitones.
In musical set theory, pitch-class intervals do not distinguish between octaves since pitch-classes themselves treat all octaves as being equivalent.
There are two kinds of pitch-class intervals:
The ordered pitch-class interval describes the number of ascending semitones from one pitch-class to the next, ordered from lowest to highest.
Since pitch-classes have octave equivalence, the ordered pitch -class interval can be computed mathematically as "the absolute value of the difference between the two pitch-classes modulo 12". See Equations, below. A more visual way to do this calculation is to place the pitch-classes on a clockface and measure the difference, always going clockwise (i.e. always ascending).
Unlike the ordered, the unordered pitch-class interval (often called the 'Interval class') does not require the two pitch-classes to be ordered from lowest to highest. Rather, this type of interval measures in semitones whichever interval is smallest.
Because of symmetry, the smallest semitone interval between any two pitch-classes can only be an integer between 0 and 6. (hence the seven 'interval classes') The tonal interval names 'minor 2nd' and 'major 7th' both correspond to "interval class 1" for example, This is because both are composed of one semitone and directional order is unimportant when the criteria becomes to select the smallest interval.
Similarly the 'augmented fourth' and the 'diminished fifth' both correspond to 'interval class 6'. There is no 'interval class 7' therefore, since counting down five semitones can describe the perfect fifth more parsimoniously that counting up seven semitones can.
A visual way to do determine an unordered pitch-class interval is to place the pitch-classes on a clockface and measure clockwise or counter-clockwise, whichever distance is smaller.
Using integer notation and modulo 12, ordered pitch interval, ip, may be defined, for any two pitches x and y, as:
the other way.
One can also measure the distance between two pitches without taking into account direction with the unordered pitch interval, similar to the interval of tonal theory. This may be defined as:
The interval between pitch-classes may be measured with ordered and unordered pitch-class intervals. The ordered one, also called directed interval, may be considered the measure upwards, which, since we are dealing with pitch -lasses, depends on whichever pitch is chosen as 0. Thus the ordered pitch-class interval, i⟨x, y⟩, may be defined as:
Ascending intervals are indicated by a positive value, and descending intervals by a negative one.