Revised MIDI to Gcode conversion script - much improved!

1,243 views
Skip to first unread message

Mike

unread,
Jan 4, 2011, 2:53:53 AM1/4/11
to MakerBot Operators
Hi folks
This may appear twice, but my previous attempt from last night hasn't
yet hit the list...

I've been working on the mid2cnc.py script to convert MIDI files to
playable gcode.
I've extended the script to work for arbitrary machines and predefined
a few more popular ones.
Also it has a beefed-up command line parser so most options don't
require script changes.

Please take a look at the GIthub repository here:
https://github.com/michthom/MIDI-to-CNC

It has sane defaults for use with a Makerbot Cupcake, so folks on this
list can mostly just run:
./mid2cnc.py

This assumes:
Input file: ./midi_files/input.mid
Output file: ./gcode_files/output.gcode
Machine type: Makerbot Cupcake CNC 3D Printer
MIDI channels: 0-15 inclusive
Play on: X, Y, Z axes

For the more adventurous, here is the new usage block:
usage: mid2cnc.py [-h] [-infile [INFILE]] [-channels N [N ...]]
[-outfile [OUTFILE]]
[-machine
{cupcake,custom,shapercube,thingomatic,ultimaker}]
[-units {imperial,metric}] [-ppu XXX.XX YYY.YY
ZZZ.ZZ]
[-safemin XXX.XX YYY.YY ZZZ.ZZ]
[-safemax XXX.XX YYY.YY ZZZ.ZZ] [-prefix [PRE_FILE]]
[-postfix [POST_FILE]] [-axes XYZ] [-verbose]

Cheers
Mike Thomson

Mike

unread,
Jan 4, 2011, 8:37:43 PM1/4/11
to MakerBot Operators
I just uploaded a couple of sample output files to the Makerbot music
Wiki page:
http://wiki.makerbot.com/makerbot-music

Imperial March on 3 axes
http://wiki.makerbot.com/makerbot-music:imperial-march-3axes

Wallace and Gromit theme on 3 axes
http://wiki.makerbot.com/makerbot-music:wallace-and-gromit

Hope you like 'em!
Mike
Reply all
Reply to author
Forward
0 new messages