Last weekend at Dam square in Amsterdam was a barrel organ festival. From all over the country roller organ players had come to Amsterdam to show their mechanical musical instruments.
The instrument consists bellows and one or more ranks of pipes housed in a case, usually of wood and often higly decorated.
The basic principle is the same as a traditional pipe organ, but rather than being played by an organist
the barrel organ is activated either by a person turning a cranck, or by clockwork driven by weights or springs.
The pieces of music (or tunes) are encoded onto the barrel using metal pins ans staples. Pins are used for short notes and staples of varying lengths for longer notes. Each barrel usually carried several different tunes. Pinning such barrels was something of an art form, and the quality of the music produced by a barrel organ is lagely a function of the quality of its pinning. This complex encoding of music was an early form of programming.
To hear the sound of the organs watch this video.