What to do when music gets played in the mind I get the idea of recognizing mind states .Knowing their existence separates them from self but sometimes .I get this addictive Music like a recording in my mind that constantly restarts diverting my concretion from work .I recognize that it may come from states but dealing with it isn't as easy
.


I tried


Knowing that its just music
knowing the reason why it came (maybe when I was listening I wasn't mindful.
diverting my attention ardently away from it



All this didn't work maybe helps in understanding but it still doesn't stop it sometimes it gets even more energy.
Music playing in the mind are mental formations. Approach in the same way as all other mental formations. Notice that it's there but try not to add feeling or thought to it. Doing so will create frustration. In the case of this happening, notice the thoughts you attach to the music in the same way and be with the feelings that occur.

You may say "this repetitive music is annoying me" then you may feel an unpleasant feeling. Notice this! Notice without judgement.

Alternatively, switch your attention to something that requires a high level of focus like creative writing. The music will stop. Become very curious about how it stopped being careful to note the change in mind state and degree of alertness. This will tell you something about your various states of mind namely lower levels and higher levels of functioning. In the lower levels mind has a tendency to do what it likes perhaps governed by the autonomics of conditioning. In the higher levels, conscious directed thought allows you to step out of this process where you can have more choice about how to use your mind.