It's a coping/protection mechanism - when he plays the piano, his negative feelings from his past resurface, and his mind blocks him from hearing sounds that have a negative (as in Psychological Conditioning Principals) association in his mind.
How exactly this manifests for him is made fairly clear in the anime - if you watch the scenes again where he's playing the piano, and freaking out over not being able to hear it, it's illustrated as him drowning in very deep water, with appropriate impact on his hearing.
I'd say that your own personal experience (presuming you have no such negative association with piano), is the idea that you're focusing so intently on your hands, that you've filtered out the audio. It's not dissimilar, but his is triggered by traumatic mental association.