A musical automaton (or mechanical or automatic musical instrument) is a musical instrument operated by a mechanical device rather than by a human interpreter. It differs from recording media because it produces music and not just plays it. The music, however, is predetermined based on a repeatable schedule. The mechanisms that produce different and unpredictable melodies are therefore excluded from the definition of automaton. Some automata, once activated, proceed without human intervention; others require the action of a crank, pedal or breath to keep the mechanism in motion.
Mechanical musical instruments, or their prototypes, have been known since ancient times both in the East and in the West. An orchestra of various instruments, composed of twelve bronze statuettes, seems to have worked at the Chinese emperor Qín Shǐ Huángdì (3rd century BC) of players driven by a string and wind mechanism. At the same time, Ctesibius of Alexandria is attributed by Vitruvius the invention of water clocks capable of giving impetus to trumpets and other instruments; an epigram by Edilo also leads him back to the ideation of the rhytón, a representation of the dancing god Bes playing a golden trumpet operated by a hydraulic system. The creation of musical water automatons in the form of songbirds or human figures playing the flute is also attributed to Apollonius of Perga (3rd century BC). whether the automata described in ancient literature really have the ability to play a predefined theme, or are they not governed by chance, as happens in the Aeolian harp.
The first written testimony of a surely automatic musical instrument emerges in Islamic science of the early Middle Ages, when the Banū Mūsā invented in Baghdad a flute operated by a rotating cylinder composed of closely spaced discs with pegs which, through the activation of small levers, they open and close the holes of the instrument (9th century).
The history of musical automata has always intersected that of clocks and organs, which in late medieval and early modern Europe represent the only two forms of mechanical musical instrument, at least until the advent of the Renaissance automatic spinet. For example, automatic and sometimes spectacular bell chimes associated with the common or astronomical clocks of churches and civil public buildings are widespread.
It is above all in the flourishing Augusta of the 16th century, where arts and crafts thrive with the support of wealthy patrons, that the music automaton industry develops and paves the way for the golden age of such devices, the 18th century. The technical euphoria of the Renaissance masters thus produced the phonotactic cylinder, the basic element of most automata, applied for the first time in 1502. In the transition to the late modern age, the function of mechanical musical instruments changed, until then fashionable accessories that only nobles and wealthy people can afford and that kings exchange as gifts (we remember the homage of Elizabeth I Tudor to Mehmet III in 1599: a clock with various instruments and singing birds). At this point the automata instead acquire an authentic musical entertainment function.
Numerous composers, between the modern and contemporary ages, write for mechanical instruments, often attracted by the possibility of creating music that cannot be performed by the human interpreter: notes unreachable by the hands already engaged, chords of notes higher in number on the fingers, potentially unlimited choruses. Among the best known names are Händel, C. Ph. E. Bach, Haydn, Mozart, Beethoven (composing for musical clock or mechanical organ), Cherubini (for roller organ), and