Try to learn the Pomodoro Technique. It's all about learning to focus on a task for short periods. It has excellent techniques for deflecting distractions, both internal and external. Short description from the site:
The basic unit of work in the Pomodoro Technique can be split in five simple steps:
1. Choose a task to be accomplished
2. Set the Pomodoro to 25 minutes (the Pomodoro is the timer)
3. Work on the task until the Pomodoro rings, then put a check on your sheet of paper
4. Take a short break (5 minutes is OK)
5. Every 4 Pomodoros take a longer break
What I've found is that if the task itself isn't engaging, I tend to look for distractions. Hearing voices and conversations just makes it more difficult. Part of training yourself to tune it out involves more than just overpowering the noise. You'll need to handle disruptions such as the urge to check your email, handling phone calls, people touching you to break your trance, and even bio breaks.
The downloadable book takes a couple of hours to read, and it doesn't cost anything. There are also some software projects that are helpful as well.
Perhaps having a bell go off at regular intervals at your place of work may start to annoy everyone else. Then you can suggest that you'll trade the bell for your music.