This question already has an answer here:
Unfortunately, I don't have a lot of details on this story; I can't even recall when I read it - except that it was almost certainly over 30 years ago. It may have been a story in an anthology, but I won't swear to that; I have the impression that it may actually have been novella-length.
The basic plot element was that it was illegal to create music in the social context of the story, and the protagonist did so. The only real detail from the story that I recall is a scene where they stopped him from singing by placing a device against his throat that disabled his larynx, and later had to stop him from playing by (painlessly) amputating his fingers.