The joke is a pun.  'Pitch' can refer to the throwing of the baseball by the pitcher in the sport of baseball.  'Pitch' can also mean the tone of a one's singing.
If you sing while playing baseball , you won ' t get a good pitch .