Structural functions of harmony