All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
First of all, you should know that many musical instruments existed a long time ago, whether those are string instruments, such as the lute and the fiddle, or those made of leather and the like, such as drums.
Ibn ‘Abbaas, may Allah be pleased with him, narrated that the Prophet said, “Allah has forbidden me – or he said: has forbidden – wine, gambling, and Koobah, and every intoxicant is unlawful.” Sufyaan said, “I asked ‘Ali ibn Buthaymah what Koobah is, and he said, 'The drum.'” [Ahmad]
Secondly, many Islamic texts have proven the prohibition of all musical instruments except what the Sharia exempted, which is the Duff. For more benefit, please refer to fatwa 82320.
Thirdly, there are some scholars who gave some musical instruments, among which is the drum, the same ruling as that of the Duff. Some of them permitted the drum in a specific manner; from that is what is mentioned in Rawdhat At-Taalibeen – a book of Shaafi’i Fiqh – which reads, “And the drums that are prepared for the games of children, they are like the Duff, provided that they are not like big drums.”
Some scholars of Fiqh permitted the drum in wars, 'Eeds, and the like; Al-Insaaf – a book of Hanbali Fiqh – reads, “Imaam Ahmad disliked the drum for other than the times of war and the like; and Ibn ‘Aqeel held that it is recommended in war, and he said, 'To encourage the allies of Allah and constrain the enemy.'”
There is an opinion in some Schools of jurisprudence regarding the permissibility of some instruments such as the pipe and flute and the like.
However, as we have already mentioned, there are texts regarding the prohibition of all musical instruments with the exception of the Duff. Hence, if you like listening to melodies, then it is sufficient for you to listen to lawful songs that do not involve forbidden musical instruments. Indeed, what is lawful suffices a person from what is forbidden.
Allah knows best.