Text this: A Generative Theory of Tonal Music