CNC Music Factory – MIDI to gcode
I’m making a note here – *huge success*
First output from ‘mid2cnc.py’, a program to convert MIDI to gcode linear moves, allowing one to play music on a CNC machine (will publish it when it’s done!). The music is Jonathan Coulton’s “Still Alive” from the ending credits of Portal.
Basically, it’s possible to compute a combination of (distance, feedrate) that will cause the stepper motor to spin at an exact frequency corresponding to a musical note. With a little vector magic, the same can be done for (x, y, z, feedrate) to produce chords as the machine follows a 3D line through space.
TODO:
Handle more than 3 notes played at a time (drop some if there are not as many axes…)
Lock notes to their initial axis for their duration (maybe only an issue on my ghetto machine where the axis motors sound very different)
(try to) Improve frequency accuracy where 2 or more notes are played simultaneously (may be a CNC software issue)
A description of how it works is on my blog at http://tim.cexx.org/?p=633
Duration : 0:2:55
November 4th, 2009 at 6:40 am
Dude that’s awesome!
Dude that’s awesome!
November 4th, 2009 at 6:40 am
five stars just …
five stars just because the song!…(if had been something else, they would have been 4) so, well done ^^
November 4th, 2009 at 6:40 am
LOL! Awesome!
LOL! Awesome!
November 4th, 2009 at 6:40 am
lamo
lamo
November 4th, 2009 at 6:40 am
blegh, how can you …
blegh, how can you be so skilled with cnc man?!
November 4th, 2009 at 6:40 am
lmao
lmao
November 4th, 2009 at 6:40 am
THIS WAS A TRIUMPH !
THIS WAS A TRIUMPH !
November 4th, 2009 at 6:40 am
Nice job this is …
Nice job this is too cool!
November 4th, 2009 at 6:40 am
God this is full of …
God this is full of win.
November 4th, 2009 at 6:40 am
Beautiful.
Beautiful.
November 4th, 2009 at 6:40 am
Watching this makes …
Watching this makes me wish I was female so that I could bear you children.
November 4th, 2009 at 6:40 am
And don’t forget …
And don’t forget the Z axis. There are actually 3 axis in total playing Still Alive. X, Y, Z
November 4th, 2009 at 6:40 am
OMG its got 2 bits …
OMG its got 2 bits of music coming from it! both axes playing 1 bass and 1 main … that’s soo freaking amazing!
November 4th, 2009 at 6:40 am
HUGE SUCCES!
HUGE SUCCES!
November 4th, 2009 at 6:40 am
wow, thats …
wow, thats impressive. i wish i knew how to program soemthing like that. i never thought u could make a cnc sing. awesome.
November 4th, 2009 at 6:40 am
Best thing I’ve …
Best thing I’ve seen one of these make yet!
November 4th, 2009 at 6:40 am
damn!! =o
damn!! =o
November 4th, 2009 at 6:40 am
WTF! Dude, that’s …
WTF! Dude, that’s insane.. in a good way.
November 4th, 2009 at 6:40 am
Dear sir,
I LOVE …
Dear sir,
I LOVE YOU!
YOU ARE A FRIKIN’ GENIUS!
Yours Faithfully
MemcwhoDave
November 4th, 2009 at 6:40 am
OK, nobody has …
OK, nobody has asked this yet, so…
What does it make if it actually has stock in the machine?
This is critical, because as long as it’s not some tiny pellet, it could *totally* be a collectors’ item!
November 4th, 2009 at 6:40 am
That is so lame …
That is so lame it’s almost cool again.
November 4th, 2009 at 6:40 am
this sounds better …
this sounds better than the original lol
November 4th, 2009 at 6:40 am
hahahh cnc wanted a …
hahahh cnc wanted a break and begun to sing
November 4th, 2009 at 6:40 am
Wow, and they say I …
Wow, and they say I have to much time on my hands!
November 4th, 2009 at 6:40 am
That is awesome.
. …
That is awesome.
… but does it CNC a cake if you turn the spindle on and put something underneath?