Need Help! cnc Music!! - Page 6


Page 6 of 7 FirstFirst ... 34567 LastLast
Results 61 to 72 of 79

Thread: cnc Music!!

  1. #61
    Registered
    Join Date
    Apr 2006
    Location
    Brazil
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default

    Man thats sick!!!

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



  2. #62
    Registered BTS's Avatar
    Join Date
    Dec 2010
    Location
    USA
    Posts
    28
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Apr 2007
    Location
    USA
    Posts
    49
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered P.Passuello's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    238
    Downloads
    0
    Uploads
    0

    Default

    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.

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


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

    Cheers

    Last edited by P.Passuello; 09-25-2011 at 02:02 AM.
    The ingenuity of idiots is unlimited.
    http://www.youtube.com/user/cncnutz


  5. #65
    Registered
    Join Date
    Apr 2007
    Location
    USA
    Posts
    49
    Downloads
    0
    Uploads
    0

    Default

    Great work P.Passuello, thanks for sharing!



  6. #66
    Registered
    Join Date
    Apr 2007
    Location
    USA
    Posts
    49
    Downloads
    0
    Uploads
    0

    Default





  7. #67
    Registered
    Join Date
    Apr 2007
    Location
    USA
    Posts
    49
    Downloads
    0
    Uploads
    0

    Default Xmas floppy music





  8. #68
    Registered
    Join Date
    Apr 2007
    Location
    USA
    Posts
    49
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Apr 2007
    Location
    USA
    Posts
    49
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered P.Passuello's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    238
    Downloads
    0
    Uploads
    0

    Default

    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
    Member neilw20's Avatar
    Join Date
    Jun 2007
    Location
    Australia
    Posts
    3746
    Downloads
    0
    Uploads
    0

    Default

    Try increasing the lookahead to 300 or 400.



  12. #72
    Registered P.Passuello's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    238
    Downloads
    0
    Uploads
    0

    Default

    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


Page 6 of 7 FirstFirst ... 34567 LastLast

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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

cnc Music!!

cnc Music!!

cnc Music!!