Playing with interactive controls made it clear that it’s time to implement some custom control logic.
I set up a series of sequential states for the solenoid:
- Off - Mr. Solenoid is good to go.
- Attacking - A note was triggered; the solenoid is activated below full duty cycle.
- Holding - The solenoid is at full duty cycle.
- Cooling down - The solenoid is retracting or cooling down. (This final state isn’t essential but seems to make sense.)
This model primarily affects the way soft notes are played.
A soft note has a duty cycle under 50%. Based on empirical tests of solenoid performance, activating the solenoid below 50% doesn’t reliably extend the armature.
My solution is to ease the duty cycle from its starting point (below 50%) up to 50% over a short period of time. I call this the attack time.
The result is a nice smooth movement and a range of gentle armature touches.
Ah, gentle armature touches.