Music is a form of creativity not only for the composer but also for the performer and for the listener who participates over and over in the creative expression of the composer. And while there is a lot of utilitarian music written for money and effect, true music like any art has no real “purpose” except as pure creativity. In this sense, music is a form of devotion, of bhakti. What is celebrated, worshipped, or expressed varies with the music itself, of course. It transforms the listener successfully according to the object of worship or celebration, or does so artificially or not at all with utilitarian music.
Which is probably why great traditions of meditation are based on silence. Music echoes in the mind long after the chords of instrument or voice are silent. The melodies want to continue the act of creation (or manipulation) in our minds, to continue the expression of devotion. But in meditation, the mind, emptied of thoughts, needs now to be emptied of feelings, too. Feelings every bit as strong as those aroused by thoughts — and by music.