What is pitch class?
Pitch & TuningA group of pitches treated as equivalent when separated by one or more octaves. For example, all C notes belong to the same pitch class regardless of register.
A group of pitches treated as equivalent when separated by one or more octaves. For example, all C notes belong to the same pitch class regardless of register.
A pitch class groups notes that differ by whole octaves, setting their register aside. C3 and C5 are different pitches but belong to the same pitch class. This distinction lets a musician describe a chord’s note content without specifying exactly where each note is played.
In twelve-tone equal-tempered set theory, enharmonic spellings are also grouped: C-sharp and D-flat belong to pitch class 1 when C is numbered 0. The twelve classes are numbered 0 through 11. This convention is useful for calculation, but it deliberately leaves out distinctions of spelling and tonal function.
n is an integer semitone index, with every C assigned a multiple of 12; p is the canonical nonnegative remainder in {0, …, 11}. In standard MIDI note numbering, C4 = 60 and C5 = 72 both yield p = 0, while C♯4 = 61 yields p = 1. For negative integer indices the modulo operation must still return a representative from 0 through 11. This assumes twelve equal-tempered pitch classes and does not distinguish enharmonic notation or octave register.
Pitch class does not specify octave or frequency. Treating enharmonic notes as equivalent is an analytical convention suited to a twelve-class system; it should not erase spelling or tuning distinctions when those matter to the music.