I experienced an interesting phenomenon regarding attention when I used to grade computer programs that my students submitted as homework. That required extreme concentration.
In order to mask potentially distracting sounds, I would play familiar recorded music. But the recordings that I played had to be ones that I had played many times before, because new recordings or radio broadcasts of similar music were too distracting.