I have playlists for each character I write, which is usually defined by something about the character. A woodland elf is instrumental music with a focus on strings and flutes. A starfighter pilot is heavy rock/metal to give emphasis to the concept of an 8-second life expectancy in combat. If it's a very complex character, I may even have separate playlists for different types of posts or moods. In the case of a character from the 1960's, I even had a playlist of 50's and 60's music so that I had a reference for what that character would think of or listen to.
So I'd say I change what I listen to based on what it is that I am writing.