Thanks for your answers. Please allow me to clarify my point:
If someone asks,"What did you buy at that music shop?", you could say, "I bought a violin", meaning "I bought, not a guitar or a flute, but a violin." In this case no further explanation about the violin is required, is it?
On the contrary, if you say, "I bought the violin", the one who asked would say, "The violin? Which violin? You never mentioned that violin before."
In the same manner, I thought, if someone asks "What did you play at the concert?", you could say, "I played a violin", meaning "I played, not a guitar or a flute, but a violin."