Today you can put a Rasperry Pi Zero or PocketBeagle in a project and have the resources of a whole computer to control your project.
When I was a lad, all we had were a few chips and transistors. One of my favourites was the 555 timer so I decided to use two for this little project which was origionally created for a tutorial in Hackspace Magazine.
A mechanical music box is controlled with 556 chip (dual 555), a transistor and a few discrete components. It is triggered by a capacitive touch module which has an active high output.
A simple transistor switch inverts the signal and triggers the first 555. This is configured as a monostable and runs for a few seconds. The second 555 is configured as an astable with a diode in the timing circuit to make it perform as a PWM generator. This allows speed control of the motor which is driven by a transistor.
The motor was a modified microservo, the mechanics were adjusted so that it could run continuously and the control circuit was removed and replaced with a simple capacitor, with the above circuit providing the control.
A simple wooden box was made for the housing and a tune from a popular Japanese animation was played on the hand cranked music mechanism.