In 1206, the Arab scholar Ibn Ismail ibn al-Razzaz al-Jazari invented four programmable musical automata: a harpist, a flautist, and two drummers. The humanoid robot musicians would, in practice, float around a lake in a boat entertaining royal drinking parties.
The mechanism al-Jazari developed is quite simple. Pegs stick out from a drum such that, as it rotates, the pegs knock on levers which produce different sounds. Rhythmic variations could be produced by changing the order of the pegs -- hence, the musicians were programmable humanoid robots.
Technological "progress" is not a line, but a circle -- a drum that keeps on spinning until the peg strikes the right note, at the right time.