Text this: Structural functions of harmony