Motor Music is a quick prototype I made to test operating the maximum number of stepper motor control shields from a single Particle Photon microcontroller.  Heavy duty stepper motors controlled by an Internet of Things platform to play Bach! 

The major work I did was verifying the Motion Shield hardware, writing the C++ library for the L6482 motor controller on the Motion Shield, and writing the music layer that used the L6482 motor controller library to create music through the sound of motors.  

Wait, but how does it actually work?  Frequency is defined as "the number of repetitions of a periodic process in a unit of time".  I'm simply driving the stepper motors at X steps per second where X equals the frequency of the pitch/note I want to sound: the motors are kind of acting like voice coils in a speaker.  Though, speakers seek to reproduce recorded sound while these motors seek to generate pitch on their own accord: more like an instrument with its own voice. 

Bach's Aria mainly has two voices but I used four motors because there are many resonances/sustained notes that create more than two voices at once: subtle harmony born from counterpoint.  I wrote the music part of the library to have the capability to play both Equal Temperament and Just Intonation but, given the inharmonicity of the motors, there didn't seem to be a poignant audible difference between the tuning systems.  The project boxes are added as an extremely hack method of making sound boxes in order to acoustically impedance match the motor vibrations to the air.  

Better than nothin'.     

Glenn Gould plays the Aria not on stepper motors, for reference.