I play pop/dance/synth music when compiling, running tests, etc, but oddly, sometimes when I really need to concentrate, I pause the song so I can read the code. It's hard to explain, but that's my take.
That's exactly how it is for me too. I tend to listen to either The Mondo Sessions or Tiësto's Club Life podcast both of which are trance - and both seem to put me into a coding trance. When I'm agitated by something hard that's broken my flow the music becomes annoying and I have to switch it off, but I usually leave my over-ear headphones on like earmuffs - it's more still that way.
Occasionally I'll listen to a Tamboura meditation - which is just droning - lower intensity than the club tunes, but similar effect.