"playing a violin" means playing any (unidentified) violin. "playing the violin" could mean playing a particular violin -- one that has been mentioned previously and is known to the reader/listener. This is the usual "a"/"the" distinction.
However, "playing the <instrument>" is also a common idiom in which "the" does not refer to a particular identified instance of th