I'm very interested in the idea of electro-mechanical music. We've all heard machines playing human instruments and machines synthesizing sound, but very few machines built to be novel accoustic instruments in themselves.
During the build, we noticed the sound of the stepper motors was unusually melodic. The sound it made while tracing an arc was inescapably musical.
One night, I just hacked up a Ruby script to translate a simple ASCII music notation into movement commands. This is actually quite simple. Feed rate * DPI gives you pitch and distance / feed rate is note duration. All the axes are intersected to create a single list of movements. When multiple axes are moving, a bit of trig is used to calculate the right feed rate.
The acceleration limits also have to be disabled on the machine.
Here is the code. It should work with any G-code based CNC machine:
If you haven't seen this yet, this is probably the best example of a hack like this that I've seen. It was submitted for a contest that radiohead held, and I believe was the winner (it takes about a minute to get rolling):
I did something similiar by switching on and off (with BASIC code) the relay in a BBC B, which turns the tape machine on or off. It kind of goes clickety click very rapidly.
http://www.youtube.com/watch?v=Fq4VLwLFXaE
I'm very interested in the idea of electro-mechanical music. We've all heard machines playing human instruments and machines synthesizing sound, but very few machines built to be novel accoustic instruments in themselves.