  Musical chords, harmonies or melodies in Just Intonation have note
frequencies which are described by a base frequency multiplied by rational
numbers. For any local section, these notes can be converted to some base
frequency multiplied by whole positive numbers. The structure of the chord can
be analysed mathematically by finding functions which are unchanged upon chord
transposition. These functions are are denoted invariant, and are important for
understanding the structure of harmony. Each chord described by whole numbers
has a greatest common divisor, GCD, and a lowest common multiple, LCM. The
ratio of these is denoted Complexity which is a positive whole number. The set
of divisors of Complexity give a subset of a p limit tone lattice and have both
a natural ordering and a multiplicative structure. The position and orientation
of the original chord, on the ordered set or on the lattice, give rise to many
other invariant functions including measures for otonality and utonality. Other
invariant functions can be constructed from: ratios between note pairs, prime
projections, weighted chords which incorporate loudness. Given a set of
conditions described by invariant functions, algorithms can be developed to
find all scales or chords meeting those conditions, allowing the classification
of consonant harmonies up to specified limits.
