About 850 the Banu Musa brothers, three Persian scholars active in the library and translation institute called the House of Wisdom in Baghdad, published the Book of Ingenious Devices. This described and illustrated a number of automata, including some derived from Hero of Alexandria.
Among the original inventions by the Banu Musa brothers were a feedback controller, and "the earliest known mechanical musical instrument, in this case a hydropowered organ which played interchangeable cylinders automatically. According to Charles B. Fowler, this 'cylinder with raised pins on the surface remained the basic device to produce and reproduce music mechanically until the second half of the nineteenth century.' "
The Banu Musa brothers also invented an automatic flute player, which appears to have been the first programmable machine.