Leonardo da Vinci designed a programmable drum that used pegs to create a repeating musical sequence.
The mechanism is associated with Leonardo’s studies of automation and mechanical music. A rotating drum carried projecting pegs arranged according to the desired pattern. As the drum turned, the pegs could operate levers or striking mechanisms, producing a sequence without a human performer controlling every note.
This principle resembles later pinned-cylinder music machines, including mechanical organs and music boxes. The important idea is not electronic programming but physical encoding: the position of each peg stores an instruction in the machine’s structure.
Leonardo’s surviving notebooks contain many mechanical concepts, and not every drawing has a confirmed construction history. Modern descriptions therefore distinguish between documented designs and fully tested inventions. The programmable drum is notable because it connects Renaissance craftsmanship with a basic idea later used in automated musical devices.