Follow up to this answer:
The article cited in the answer cites sources that prohibit playing a musical instrument in shul. I assume that this applies only during prayer.
I recall that Shlomo Carlebach would play his guitar during Havdallah. (IIRC, once a person has said Ata Chonantanu, he may perform work.) I am fairly certain that his Havdallah was part of the service itself (I.e., before Aleinu.) Based on this opinion, how was Shlomo Carlebach permitted to do this, or did he go against accepted practice regarding this?