This cylinder music box is a “mechanical musical instrument” and is around 150 years old!
This is how it works:
Hundreds of tiny metal pins stick out from what is called a “pinned barrel” – they look like little silver dots. When you turn the handle at the side, the metal comb brushes over the barrel and hits these metal pins. Depending on how the little metal pins are positioned, a melody is played. So you could say that a piece of music is mechanically coded and saved on this sort of pinned barrel. The dances by Johann Strauss Junior were very popular compositions for this sort of cylinder music box.