Electric trimmers allow you to shed unwanted hair, with the side effect of a constant buzzing sound. This noise is related to the motor’s speed, which as shown in Device Orchestra’s video below, doesn’t necessarily have to be continuous. It could instead be tuned to play music.
After removing the stock circuit board on a trimmer and attaching new leads, the concept was first proved out on a benchtop power supply, varying the motor speed and notes via the voltage level. This behavior was then duplicated by an Arduino Due and motor driver module, using PWM output to produce a rousing rendition of “When the Saints Go Marching In.”