Can I listen to rap if it has Jewish words, but it’s based on a real goyish tune?
You are asking an important question. Music has a profound effect on people, and it has a unique way of effecting our soul. Children, even from the youngest of ages will be calmed by music, and music can awaken the deepest feeling inside our soul. Music also has an important place in Judaism, as it had the capability to bringing a person (under the right conditions) to ruach hakodesh and prophecy. Also the Leviim sang and played musical instruments as a heavenly service to Hashem. The Vilna Gaon (brought in the Introduction to Peas Hashulchan pg. 5) said that music has the power to help a person understand the secrets of the Torah and that Moshe Rabbeinu brought us some tunes from when he was on Mount Sinai! It is also brought that the same way speech is the expression of the mind, music is the expression of the soul!
Regarding your question, for generations there have been songs that Jews have sung with tunes that originated from the gentiles of the nations. This is why Sefardi music will be different than Ashkenazi one’s- because Ashkenazi tunes have a “ring” to them from the European gentiles and the Sefardi one’s from the Arab countries. The real issue here is how does the song affect you? Do the Jewish words change the overall message that you will get from the song, and now the song will stir your soul, and influence you to want to get close to Hashem? To have more feeling for the mitzvos? To make yourself better, and improve your middos? If it does, then it is alright. However, if the main part of the song is really the tune, and it stirs your soul to be wild, or it will arouse negative feelings and ideas inside of you, then the Jewish words will not matter, because it is the goyish tune that is affecting you here. As a side point rap does have the tendency to pull a person to wildness, a feeling of being unsettled and confused, which is the opposite of the effect that Yiddishkiet wants us to have. Our mesorah teaches us to be settled, thought out, and happy, not frivolous, wild and unhinged.
I hope you get the “ring” of what I am saying.
Talmud Yerushalmi Succoh 22b, Rambam Yisodei Hatorah 7-4, See Matnas Chaim (R’ Mattisyahu Solomon shlit”a) Purim pg. 152-160 who discusses this idea.Also see sefer Shir Binah, especially the introduction.