recorder (n.)
"chief legal officer of a city," early 15c., from Anglo-French recordour (early 14c.), Old French recordeor "witness; storyteller; minstrel," from Medieval Latin recordator, from Latin recordari "remember" (see record (v.)).

Meaning "registering apparatus" is from 1873. The musical instrument is attested by this name from early 15c., from record (v.) in the obsolete sense of "practice a tune." Used by Shakespeare and Milton ("of flutes and soft recorders," "Paradise Lost"). The name, and the device, were rarely heard by mid-1800s, ousted by the flute, but enjoyed a revival after 1911 as an easy-to-play instrument for musical beginners.