Gabor transforms and scalograms are used for mathematically analysing music, identifying patterns in the time-frequency structure of music at multiple time scales, and providing insight into the nature of music. Musical passages from classical music, popular song, bird song, and fractal music are analysed using a synthesis of the generative theory of tonal music and the mathematical methods of Gabor transforms and scalograms. Applications to musical processing, and musical synthesis are described using inversion of Gabor transforms.