Rap
Middle English (originally in the senses ‘severe blow with a weapon’ and ‘deliver a heavy blow’): probably imitative and of Scandinavian origin; compare with Swedish rappa ‘beat, drub’, also with clap1 and flap.
wiktionary
From Middle English rap, rappe, of North Germanic origin, related to Norwegian rapp(“a blow, strike, lash”), Swedish rapp(“a blow, lash, crack”), Danish rap(“a tap, smart, blow”). Compare Old English hreppan(“to touch, treat”). More at rape.
From Middle English rappen, of North Germanic origin, related to Swedish rappa(“to strike, beat, rap”), German rappeln(“to rattle”).
Uncertain.
Perhaps contracted from rapparee.
(This etymology is missing or incomplete. Please add to it, or discuss it at the Etymology scriptorium. Particularly: “Scand., as Ice. hrapa, to rush headlong, cog. with Ger. raffen, to snatch.”)
From RAP(“record of arrest and prosecution”)
etymonline
rap (n.)
early 14c., rappe, "a quick, light blow; a resounding stroke," also "a fart" (late 15c.), native or borrowed from a Scandinavian source (compare Danish rap, Swedish rapp "light blow"); either way probably of imitative origin (compare slap, clap).
Slang meaning "a rebuke, the blame, responsibility" is from 1777; specific meaning "criminal indictment" (as in rap sheet, 1960) is from 1903; to beat the rap is from 1927. Meaning "music with improvised words" was in New York City slang by 1979 (see rap (v.2)).
rap (v.1)
mid-14c., rappen, "to strike, smite, knock," from rap (n.). Related: Rapped; rapping. To rap (someone's) knuckles "give sharp punishment" is from 1749 (to rap (someone's) fingers in the same sense is by 1670s.). Related: Rapped; rapping.
rap (v.2)
intransitive, "talk informally, chat in an easy way," 1929, according to OED, popularized c. 1965 in African-American vernacular, possibly first in Caribbean English and from British slang rap (v.) "to say, utter" (by 1879), originally "to utter sharply, speak out" (1540s), ultimately a sense-branch of rap (v.1).
As a noun in this sense from 1898. Meaning "to perform rap music" is recorded by 1979. Related: Rapped; rapping.