Rap surfaced as a word imitating sound in the fourteenth century.
Among other things, it perfectly describes the noise made by someone knocking, or “rapping,” at the door.
In the criminal sense it’s the rap of a judge’s gavel sounding the end of a trial that gave us such phrases as “a bad rap” and “a bum rap.”
A rap sheet is a record of criminal charges wherein the suspect couldn’t prove his innocence before the rap of the gavel.