Generative Theory of Tonal Music