Well, maybe it's second. Because there are thousands of songs that allow the Spirit to testify of Christ to me--and not just hymns. There are other church-y songs but also some secular ones in which I feel the Spirit and know that Christ lives and that He loves me. So testifying is the first. Comforting is the 2nd.
Teaching is the 3rd. This mostly relates to hymns. I have gained a lot related to doctrine when I use the hymns in trying to learn more in my research. I know that the Spirit influenced those involved in creating the hymns and then helps me to find and grasp the knowledge therein.
Fourth, music has occasionally given me guidance in my life. When I've been praying for answers that will give me direction in life, or even when I've just been pondering my choices, I have at times heard music (both secular and spiritual) which has helped me make a decision.
I actually have an experience that incorporated all 4 of these. After undergraduate school, I was prompted to go home. (Well--quite blatantly told, actually, but that's another story.) I was at a very emotional low when I moved home. I needed it then. But as time wore on, I got a job, I was in graduate school, I had a great church calling. I found things to do and I was useful. Onward and upward and all that. After being home for more than a year, I began to feel stifled and trapped where I was. I felt guilty for being so, because my family and friends had done so much to help and support me through my ups and downs, my attempts at being an adult and being responsible (job, schooling, etc). But I was so low and I didn't quite know where to go or how to go about getting there. Or even if I should. Surrounded my loved ones and feeling utterly alone.
And then a song made it to the top charts. I heard it played over and over again on the radio. Every time I did, I ended in tears. Because the song reminded me that Jesus--through His Atonement--knew exactly how I felt. That He understood and wanted me to feel better--because that's what this song started to do for me. I felt like I wasn't alone in feelings like this (comfort). Teaching came about from two lines that taught me that just because I wanted a change in my circumstances, it didn't mean I was ungrateful or would forget who and what made me who I was. But I also didn't need to let them hold me back. If their part in my life had filled its purpose, moving on was not ingratitude. And guidance? The whole chorus helped me know that I needed to leave the comfort zone I had put myself in. I needed to look for ways to change my situation and pursue them--with no guilt to hold me back and the encouragement to try something new or different. So I decided to start on the path that would change the situation.
It was a very powerful experience. And I'm sure you would like to know what the song is. It no longer makes me cry, because I'm years and miles away from that trapped situation. But I will forever hear it with gratitude that the Lord loves me and has the Spirit help me in so many ways.
"Breakaway" by Kelly Clarkson