Pitch interval


In musical set theory,[] a pitch interval is the number of semitones that separates one pitch from another, upward or downward.
They are notated as follows:
For example C4 to D4 is 3 semitones:
While C4 to D5 is 15 semitones:
However, under octave equivalence these are the same pitches, thus the #Pitch-interval class may be used.

Pitch-interval class

In musical set theory, a pitch-interval class is a pitch interval modulo twelve.
The PIC is notated and related to the PI thus:

Equations

Using integer notation and modulo 12, ordered pitch interval, ip, may be defined, for any two pitches x and y, as:
and:
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 classes, depends on whichever pitch is chosen as 0. Thus the ordered pitch class interval, i, may be defined as:
Ascending intervals are indicated by a positive value, and descending intervals by a negative one.