It probably depend from country to country ..... here in Italy is very uncommon (i've seen it done only one time, a friend that was playing in a band, and as "last salutation", the other players done that at the end of the ceremony), but not usually done.
In some countries, instead, is a tradition ..... band and music play ..... and in some others, also, the tradition is to play happy songs for the passed one, and at the end meet in the cemetery for a reunion like a party ..... different cultures, different uses .....