"a long, rambling discourse; incoherent harangue," 1736, apparently from an altered, Kentish colloquial survival of ragman roll "long list, roster, or catalogue" (c. 1500). The origins of this are in Middle English rageman "document recording accusations or offenses," also "an accuser" (late 13c.). For this, Middle English Compendium compares Old Norse rogs-maðr "a slanderer," from older *vrogs-mannr. With folk-etymology alterations along the way.
By late 14c. rageman was the name of a game involving a long roll of verses, each descriptive of personal character or appearance. In Anglo-French c. 1300 Ragemon le bon, "Ragemon the good," is the heading on one set of verses, suggesting a characterization. The sense was transferred to "foolish activity or commotion" generally by 1939.
"official routine or formula," especially "excessive bureaucratic rigmarole," 1736, in reference to the red tape formerly used in Great Britain (and the American colonies) for binding up legal and other official documents, which is mentioned from 1690s.
Old English sang "voice, song, art of singing; metrical composition adapted for singing, psalm, poem," from Proto-Germanic *songwho- (source also of Old Norse söngr, Norwegian song, Swedish sång, Old Saxon, Danish, Old Frisian, Old High German, German sang, Middle Dutch sanc, Dutch zang, Gothic saggws), from PIE *songwh-o- "singing, song," from *sengwh- "to sing, make an incantation" (see sing (v.)).
Phrase for a song "for a trifle, for little or nothing" is from "All's Well" III.ii.9 (the identical image, por du son, is in Old French. With a song in (one's) heart "feeling joy" is first attested 1930 in Lorenz Hart's lyric. Song and dance as a form of vaudeville act is attested from 1872; figurative sense of "rigmarole" is from 1895.