In 2009, Tokyo’s Waseda University built a fedora-sporting flautist robot powered by cranked air. But this is only the most recent attempt at a mechanical, flute-playing musician. In the 9th century, the Banū Mūsā brothers in Baghdad wrote a treatise describing their “instrument which plays by itself.”

Their innovative machine is described in Allah’s Automata: Artifacts of the Arabic-Islamic Renaissance (800-1200), recently published by Hatje Cantz. The book accompanies an exhibition of the same name, currently on view at the ZKM (Center for Art and Media Karlsruhe) in Germany, that includes a reconstruction of their instrument. While automata had their golden age in Europe from the 16th to 19th centuries — which saw the creation of such devices as the clock of Diana in her chariot that rolled across a table and shot an arrow — in the Islamic world their peak was from the 9th to 13th centuries. The most famous, also reconstructed for Allah’s Automata, is the 12th-century elephant water clock. The shapes of its various hydraulic elements could be interpreted as symbols of the international trade that facilitated its creation by Ismail al-Jazari, including an Indian elephant, Chinese dragons, and an Egyptian phoenix riding above a Muslim scholar who writes the time.

The Banū Mūsā were also inspired by technology from different regions, namely an automatic wind instrument by Archimedes and a hydraulic device by Apollonius. Their mechanical, hydraulic organ was made to play endlessly by itself and could be programmed much like the punched card looms of the 19th century. Scholar Mona Sanjakdar Chaarani describes the instrument’s mechanics in her essay:

The air pushed by the hydraulic pump is compressed in a sphere to power a flute with nine holes. The holes are opened and closed by eight levers, the ends of which make contact with the fixed raised pins arranged on the lateral surface of a revolving cylinder so as to produce a well-known melody.

As Chaarani adds, the brothers explained that if one wanted to build a “humanoid flutist,” it was only necessary to hide the device inside a statue.

As the title of Allah’s Automata suggests, these devices were both scientific and spiritual. Siegried Zielinski, chair for media theory at Berlin University of the Arts, writes in his essay:

When a religious institution wishes to articulate its faith to its believers, it needs to use a medium to illustrate and convey the meaning of what it wishes to communicate. For example, God uses the engineer who believes in him to construct an automaton that, in turn, is used as a medium for praising him.

Zielinski notes the Banū Mūsā’s concluding sentence in their 9th-century music automaton manual: “The instrument […] is finished with the power and strength of Allah.”

That’s not to say the devices had religious themes, just that their reflection of human ingenuity was seen as a symbol of God’s glory. (In fact, some were fairly scandalous, such as al-Jazari’s bird-on-a-goblet automaton, intended for festive drinking.) The original diagram of the Banū Mūsā’s instrument is now lost, as is the manuscript; their description survives through pre–20th century photographs. We can’t know what their curious device sounded like back in the 9th century, but as an incredibly early example of a programmable instrument, its significance endures in the player pianos and MIDI software that clang out tunes today.

Allah’s Automata: Artifacts of the Arab Islamic Renaissance (800–1200) continues at the ZKM (Center for Art and Media Karlsruhe) (Lorenzstraße 19, Karlsruhe, Germany) through August 21. The accompanying catalogue is available from Hatje Cantz.