Mechanical
Mechanical instruments could be considered an early type of digital instrument, in which a binary determines whether a note sounds or does not at a particular moment in time. Mechanical musical instruments are those in which the notes played are automated in some way, such that the operator may simply start the performance of a pre-encoded piece of music. Mechanical instruments can have their music encoded on barrels with raised pins or staples, paper rolls with pierced holes, or metal disks with raised piercings. Such instruments include barrel organs, player pianos, and music boxes. Automatic musical instruments of various kinds have existed since the Middle Ages and increased in popularity from the 18th to 20th centuries. Operators of mechanical instruments may or may not have any influence on the musical expressivity of the music being played. For some instruments, operators only apply tension to a spring that discharges mechanical energy or pump a bellows that fills an air reservoir, but others, such as some player pianos, allow the operator to change the tempo of the music performed.