Looks and sounds beautiful! I've been fascinated by the concept of automated musical instruments ever since I saw the self-playing piano at the Valley Fair mall in San Jose.
I can't believe you soldered directly to the ESP though! Seeing that gave me anxiety, haha.
The electromagnets are used as a solenoid, it seems.
So, the electromagnet ‘pulls’ the piece of steel into its inner cavity.
The wooden stick and bead seems to be arranged and mounted in a way that gravity will ‘pull’ the piece of steel away from the solenoid.
I think the solenoids are only strong enough to ‘swing’ the stick and bead toward the tube, but not hold it in place for a sustained period.
[update]
Totally wrong. Seems to be the opposite. The solenoid sucks in the piece of steel, moving the stick and bead away from the tube, but normally, at rest, the bead rests against the tube, because of the hinge and gravity.
On the dowel there are 5 steel nuts which are pulled towards the electromagnet. Gravity makes them return, but TBH it's not reliable enough. I'm working on a new version with small return springs and a wider swing for the striker.
The electromagnet is pulsed to control how hard to strike.
I am really interested in what you are able to come up with.
I remember taking apart old telephones with bell ringing mechanisms.
That might be a source of further design inspiration for you.
Maybe ballpoint pen springs?
I purchased a child’s xylophone to try something similar with, but the cost of the solenoids was a dealbreaker for me at the time ($6+ per solenoid on eBay).
I’m not seeing them in stock with the sellers I usually buy from, but here is a 4 pack for $4.39 including shipping from China ($2.09 from US, but not free shipping):
I hadn't even thought of using small servos. Possibly that would have been a lot simpler! I went though a bunch of prototype EMs testing to get a working combo of voltage, windings, core size, etc. (Blew more than a few driver circuits too...)
First, it sounds to me like the ninth note is off - it's lower than it should be.
Second, that page ate a huge chunk of my monthly mobile data allocation.
Twice. Because I made the mistake of clicking the image for the video, instead of opening it in a new tab. The page reloaded in full on the back button.
I can't believe you soldered directly to the ESP though! Seeing that gave me anxiety, haha.