I don't find "a loud rap at the door" to be confusing. There is no way it could refer to rap music.
Student or Learner
It's obvious for a lot of people learning or teaching English language for a long long time that many English words have multiple meanings or definitions. I found a word, on Dictionary.com, that has many definitions as well. The word is "rap". I went down the definitions from top, and when I found something that was not understandable for me, I, then, noted that down. here is what is confusing. The Dictionary.com describes it as noun:
(quoting) The sound produced by such a blow: They heard a loud rap at the door.
If the sentence was in this form (They heard a loud rap on the door) I could understand that rap was a blow applied to the door. Because, honestly if I haven't read the definition on Dictionary.com, and had heard this sentence from someone else I could surely and possibly take this sentence as (They heard a rap (music) at the door). It's not necessary to put "music" after "rap", but I have done it so it could clear the confusion.
Ok, what if "someone is standing at the door and playing a loud rap music", how would you say you heard it (without using the words"playing, music)"?
Someone is standing at the door playing rap loudly.
I think you didn't get me or perhaps my way of posting the question was not clear, anyways, let me put the question in a crystal clear way.
What did they hear?
They heard a loud rap (music) at the door.
What if music is left off in the above sentence? How's someone going to know wether it was a blow or a rap (music)? I hope the question is clear to be answered.
Nobody would think that it meant rap music.
"Invading armies have no rights." Noam Chomsky
Consider a similar snippet from Poe's "The Raven".
Once upon a midnight dreary, while I pondered, weak and weary,
Over many a quaint and curious volume of forgotten lore—
While I nodded, nearly napping, suddenly there came a tapping,
As of someone gently rapping, rapping at my chamber door.
“’Tis some visitor,” I muttered, “tapping at my chamber door—
Only this and nothing more.”
Of course, rap music didn't exist when Poe wrote this in 1845, but even today, context makes it clear that nobody is at the front door busting rhymes sotto voce.
Wear short sleeves! Support your right to bare arms!
What a coincidence! That's one of my favorite poems, and those lines had occured to me too.