The music part would never work for me... whenever I put some music to play I get completely absorbed, and all studying, or coding, for that matter, comes to a full stop.
I can do it with any music, from crazy hip hop to smooth jazz ;) I get massive energy from the music and sometimes my coworkers catch me singing while i code lol !
Music doesn't work for me either, but I have no problems with background noise at a cafe or office or something like that. I think it has to do with background noise lacking any sort of discernible structure to focus on. That sort of background is more like white noise and easy to phase out, music gives me too much to focus on.
I listen to music to deafen out the environment. Its not the best solution (Which would be working in a quiet environemnt), but the "distraction" from music is a lesser evil compared to the "distraction" from working in an office.