“Found this while cleaning out my grandad’s garage, some sort of mechanism with moving metal parts inside.”
The answer: "It’s music-on-hold for a home telephone. The phone was put on top of it to keep the caller entertained if the speaker had to put the call on hold for a while during a conversation."