585,605 active members*
3,370 visitors online*
Register for free
Login

Thread: cnc Music!!

Page 4 of 5 2345
Results 61 to 80 of 82
  1. #61
    Join Date
    Apr 2006
    Posts
    225
    Man thats sick!!!

    If I run that file on my CNC I probably run out of working area lol...

  2. #62
    Join Date
    Dec 2010
    Posts
    0
    After we got all the steppers working and calibrated on the retrofit machine the Star Wars Imperial March sounds pretty good!
    Allen
    Louisville KY

  3. #63
    Join Date
    Apr 2007
    Posts
    49
    Awesome, it's good to hear you got it working BTS.

    I was working on a C++ program to automatically convert MIDI music to gcode, but it was a huge pain and the project kind of died out. I did get it working, but not as well as I wanted. I was using an open source program called mf2tXP to convert the MIDI file to a readable text file and then used that text file with my program to convert it to gcode. I don't think I will work on it anymore, but I could upload it if anyone wants the headache of sorting through my uncommented code. It would be nice to integrate code into mf2tXP to convert all the way to gcode. The mf2tXP makes it a lot easier since you don't have to understand MIDI code, but mf2tXP didn't always work depending on the MIDI file used. I guess not all MIDI files are created equal.

    It's probably not worth the trouble though since you can now get python code from this site to do the same thing.
    Fun with MIDI, CNC and vector maths (mid2cnc.py) « Outguessing the machine
    I don't know how to use python so I never got it working and there isn't much info on how to use the script (I think that's what it's called). This script is supposed to be able to directly create gcode from a MIDI file.
    There are also some sample gcode files included with the download: Mario, Still Alive, and Tetris.
    If anyone figures out how to use this script with python, please, please share a tutorial with us.

  4. #64
    Join Date
    Dec 2005
    Posts
    238
    About a year ago I had a play with the Python code and got it to work on my machine. Can't remember how to make it work now but I have kept the files I generated so if anyone comes to the workshop and asks what the CNC is for I can tell them it's for playing music and demonstrate.

    Here is a video I did playing some midi's I converted including the Mario one I downloaded.

    [ame=http://www.youtube.com/watch?v=9MaGq6zwhUo]CNC Music - YouTube[/ame]


    Edit:
    Music in video is Mission Impossible theme, Super Mario Brothers, American Pie and Theme from Alfred Hitchcock Presents

    Cheers
    The ingenuity of idiots is unlimited.
    http://www.youtube.com/user/cncnutz

  5. #65
    Join Date
    Apr 2007
    Posts
    49
    Great work P.Passuello, thanks for sharing!

  6. #66
    Join Date
    Apr 2007
    Posts
    49

  7. #67
    Join Date
    Apr 2007
    Posts
    49

    Xmas floppy music


  8. #68
    Join Date
    Apr 2007
    Posts
    49
    I finally figured out how to use the mid2cnc.py script. Come to find out, it doesn't work with Python 3.1 (at least not the windows version). It works great with Python 2.7. I wish I would have figured that out sooner, because all this time I've been trying to figure out how to use it with Python 3.1.

    For Windows users (I'm using Windows 7), all you have to do is install Python 2.7, then you have to add ";C:\Python27" to the "Path" system variable so that the "python" command will be recognized in the command prompt. The details on how to do that are in this thread: How do I run a python program in the Command Prompt in Windows 7? - Stack Overflow

    Once you have the MIDI file you want to convert to gcode you can edit it with a free program called Musescore to remove unwanted channels and figure out which channels you want to convert. Then you open the mid2cnc.py with a text editor. You might be able to just use WordPad, but when you install python, a program called IDLE should have also been installed as well. You can right click on mid2cnc.py and select "edit with IDLE". You will need to edit the file names, the channels you want imported, and your machine details, then save the changes. It's pretty strait forward.

    Place mid2cnc.py and your MIDI file in the same folder. I prefer a place that is easy to navigate to in the command prompt so I just copied them to the root of C:. Then open the command prompt and navigate to where they are. Then type "python mid2cnc.py". After you hit enter, it should throw up quite a few lines of text and when it's done your gcode file should appear in the same folder as mid2cnc.py.

  9. #69
    Join Date
    Apr 2007
    Posts
    49
    Does anyone know of any CNC control software that is accurate with the dwell timing? mid2cnc.py uses for example "G04 P0.1500" for rests and Mach2/3 doesn't seem to take dwell timing very serious and so the pauses are a lot longer than they are supposed to be. Is there a way to get Mach to do this more accurately?

    A possible solution I have thought of if it can't be solved with different control software is to just convert all the dwell code to incremented movement commands with such a low feedrate and such a small move increment that the motor never steps and so doesn't make any sound. It would just require a little math to get the pause time right and some trial and error to see if it could work.

  10. #70
    Join Date
    Dec 2005
    Posts
    238
    Quote Originally Posted by ryanhathy View Post
    Does anyone know of any CNC control software that is accurate with the dwell timing? mid2cnc.py uses for example "G04 P0.1500" for rests and Mach2/3 doesn't seem to take dwell timing very serious and so the pauses are a lot longer than they are supposed to be. Is there a way to get Mach to do this more accurately?

    A possible solution I have thought of if it can't be solved with different control software is to just convert all the dwell code to incremented movement commands with such a low feedrate and such a small move increment that the motor never steps and so doesn't make any sound. It would just require a little math to get the pause time right and some trial and error to see if it could work.
    TurboCNC works just fine and that is what I was using in the video clips above. I Changed to Mach3 last year and now find I cannot play music and the Dwell is the cause.
    I wonder what software people use to play their music or maybe the fact that I use a smoothstepper is the problem. I will have to investigate when I get the chance because I want to make some more music files.

    Cheers
    Peter
    The ingenuity of idiots is unlimited.
    http://www.youtube.com/user/cncnutz

  11. #71
    Join Date
    Jun 2007
    Posts
    3757
    Try increasing the lookahead to 300 or 400.

  12. #72
    Join Date
    Dec 2005
    Posts
    238
    Thanks Neil,
    Does that mean I should be using CV when playing music?

    Cheers
    Peter
    The ingenuity of idiots is unlimited.
    http://www.youtube.com/user/cncnutz

  13. #73
    Join Date
    Jun 2007
    Posts
    3757
    Try CV on and off.
    With it ON it will slide from note to note, if it was not a severe change of direction.

  14. #74
    Join Date
    Dec 2005
    Posts
    238
    For the life of me I still can't get MAch3 to play music as Dwell is causing issues. I found the setting to change dwell from seconds to milliseconds but it doesn't help. Nevermind, I went back to TurboCNC running on my backup PC and made some new GCode tonight.

    [ame=http://www.youtube.com/watch?v=wW9fYzcAVpk]Cnc Music.mp4 - YouTube[/ame]

    Cheers
    The ingenuity of idiots is unlimited.
    http://www.youtube.com/user/cncnutz

  15. #75
    Join Date
    Apr 2007
    Posts
    49
    Yeah, nothing seams to improve Mach2/3 for me either. I finally just installed FreeDOS on a 128 Meg Compact Flash card and connected it to my motherboard with a CF to IDE adapter. Now I can just change the boot priority in the BIOS when I want to boot into DOS and run TurboCNC from there. TurboCNC works really well. I was able to play a song that was completely unplayable in Mach.

  16. #76
    Hi,

    I saw that thread and so I decided to register (I'm new here) because I've programmed an online midi to g-code converter in php.

    Here is the link if you want to try it out:

    Homeconstructor - Converter: music → G-code

    I hope the converter works fine.

    Homeconstructor


    Edit:
    Here you can see an example (with my CNC milling machine and the online converter):


  17. #77
    Join Date
    Jun 2007
    Posts
    3757
    I've run my SX3, on an IBM 1.5GHz 4MB memory and it plays tunes ok.
    Worked on a 600MHz junker too.
    Some PCs are up to it, and some are not. The IBM is not perfect, probably because of DMA interrupts that can't be disabled.
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

  18. #78
    Join Date
    Nov 2016
    Posts
    4

    Re: cnc Music!!


  19. #79
    Join Date
    Apr 2007
    Posts
    8082

    Re: Rests

    Boy, time flies. I had forgotten this thread until I just happened to see a bookmark on my computer. At least five years ago I used the Homeconstructor website to finally create the Stairway to Heaven capability on my Green Monster 5' x 12' CNC machine and smaller 3' x 4' CNC machines. There are some buzzes and rattles in the hardware mechanics, but visitors are still amazed when they hear this and Carol of the Bells on a wood router machine, when they think I'm just going to demonstrate a typical cut file in air. Thank you very much Homeconstructor.


    CarveOne
    CarveOne
    http://www.carveonecncwoodcraft.com

  20. #80

    Re: Rests

    Thank you very much for your nice feedback!
    Meanwhile, my converter was already used more than 93.000 times :-)

Page 4 of 5 2345

Similar Threads

  1. put CNC,music and a cause you get!
    By joe kilo in forum Musical Instrument Design and Construction
    Replies: 6
    Last Post: 05-14-2020, 05:33 AM
  2. stepper music
    By cyclestart in forum Community Club House
    Replies: 0
    Last Post: 07-11-2010, 01:37 PM
  3. Need a cylinder for a music box
    By AustinT in forum Employment Opportunity
    Replies: 6
    Last Post: 06-25-2007, 01:59 AM
  4. Music in the shop
    By dighsx in forum Community Club House
    Replies: 12
    Last Post: 06-26-2006, 04:53 AM
  5. Scanner Music CNC
    By Sanghera in forum Community Club House
    Replies: 4
    Last Post: 01-23-2006, 03:58 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •