CNC Music - Tetris
Top Comments
All Comments (24)
-
brought to you by the Soviet CnC Company.
-
It cuts Tetris blocks to this tune.
-
couldn't you put a record in it and attatch a needle?
-
@map250r Well, it just feels like it should be easy enough. Just make the real-time module enter a sleep mode or an idle loop if the buffer runs dry. I'd probably have a crack at it if I had the hardware nearby. Perhaps at uni? End-term exams are coming up, though. :P
-
@konayasai I assume this guy's using EMC2. If so, the file is interpreted into a buffer from which the real-time machine control module reads. The interpreter stops when it reaches the end of the file; changing this behavior would take a lot of work - for example, the real-time module would freak out if its buffer ran dry. EMC2 is open source, so you're certainly welcome to look into it. :)
-
@skaven2100 Oh, I see. Hm. Is this true for all machines? In theory, a stream is indistinguishable from a file when read sequentially, so provided that you create some kind of buffer you should be able to at least do it semi-live. It would however probably require some hardware modifications, so it'd be cheating :)
-
@konayasai theres nothing to stop you using stepper motors to generate the sound from the gameboy's midi files, but cnc machines run on a set of instructions, so the frequency of the steppers during each cut (or in this case each note) is predetermined not live.
-
@adrianm99 No, if you look closely it changes the speed a little bit when the tunes are getting higher or lower. The speeds are just relatively close, so you could think its always the same speed.
-
Hm. The gameboy games store sound in a midi-like way. I wonder if you could tap into the data being fed to the sound chip, run it through a customized script, and have actual live game music playing on a cnc.
-
@rfengr actually you use a midi file to generate g-code that changes the feed rates to make the music.
FALLING BLOCKS OF... wood?
linuxlove4004 2 years ago 17
the CNC machine gets a script from the computer that tells it when to rotate which motor how fast for how long. This can be used to make extremely accurate cuts... or to do this kind of stuff :P
sciencoking 2 years ago 11