The Gemara in Gittin 7a establishes that song is forbidden following the destruction of the Temple, deriving this from the pasuk 'Rejoice not, O Israel, to exultation, like the peoples' (Hoshea 9:1), and further clarifies that the prohibition extends to both instrumental music and vocal song, since if only a verse about instrumental music were cited one might think that vocal music remains permitted.
The Rambam (Mishneh Torah, Fasts 5:14) codifies this as a rabbinic decree, ruling that all types of song and all instruments that produce musical sound are forbidden as a rejoicing activity, and that even vocal song accompanied by wine is prohibited, as derived from the pasuk in Yeshayahu — though he notes that all of Israel has adopted the custom of singing words of praise and thanksgiving to God over wine.
The Mishnah Berurah (560) similarly distinguishes between instrumental music, which is forbidden even apart from a drinking setting, and vocal music, which is forbidden by all opinions specifically when accompanied by wine.
רמב"ן, תורת האדם לפני שער הגמול cites a gaon's qualification that the prohibition on vocal song applies specifically to love songs and songs of human praise — music of the sort known among the Ishmaelites as 'ashar' — whereas songs of praise and remembrance of God's kindnesses are not something any Jew refrained from, and it was the established custom to sing them at weddings and feasts with a musical voice without anyone objecting.
The Shelah (Shenei Luchot HaBerit, Aseret HaDibrot, Taanit, Ner Mitzva:19) likewise rules that music is forbidden whether by instrument or by voice, with the only permitted exception being rejoicing a bride and groom on their wedding day, when even instrumental music is allowed.
The Gemara (Moed Katan 26b) records from Evel Rabbati that a mourner must not hold a young child in his lap because the child will bring him to laughter, and he will appear disgraceful in the eyes of others for having laughed while in mourning — reflecting the broader principle that a mourner must actively avoid occasions of levity and joy.
The Rambam (Mishneh Torah, Mourning 5:1–5) enumerates the eleven categories of activity forbidden to a mourner without explicitly listing music among them, an omission that is itself relevant to assessing whether the music prohibition during aveilus derives from the general mourning framework or from the separate post-Churban decree.