Music Loop

I want to loop a sound/music until I set it not to through a function. I thought about using a scoreboard dummy and when the score is 1 it plays and when the score is 0 but how do I get it to loop without playing the song multiple times, and if I use a recursive function /stopsound doesn't work anyone know how I could go about this for reference not that it matters the sound/music I want to play is called tsf:music.glidermusic2 and it lasts for 140 seconds

Continue to help post