Page 2 of 7 FirstFirst 12345 ... LastLast
Results 13 to 24 of 77

Thread: cnc Music!!

  1. #13
    Registered
    Join Date
    May 2006
    Location
    Australia
    Posts
    2,265
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by .xXACEXx. View Post
    to put it simple= thats pretty cool!! oh and my wife just looks at me funny when i have her watch the vid. lol she just dont get it...lol thanks for posting...
    Funny you mention the other half, mine didn't get it either... ah well.

    It is a little ironic, I have just built some nice microstepping drives for a little lathe I am doing, and was admiring how silent the motor's were on full microstepping, now I have to put them on full step to make any noise so I can try this out, and I don't have much travel on the lathe so it will be a quick tune

    I also have taken the steppers off my router and am in the process of putting servo's (that will be silent) in their place so no luck there either

    Russell.


  2. #14
    Registered kram242's Avatar
    Join Date
    Mar 2005
    Location
    USA
    Posts
    96
    Downloads
    0
    Uploads
    0
    Thats funny you guys, it really is ironic, My wife is the one that got this ball rolling. When I showed her the vid before I posted it here, she said thats cool! can your get you machine to sing happy birthday. So then the hunt was on and I started up the thread.
    It just goes to show
    Mark


  3. #15
    Registered kram242's Avatar
    Join Date
    Mar 2005
    Location
    USA
    Posts
    96
    Downloads
    0
    Uploads
    0
    Anyone got anything working yet?'
    Mark


  4. #16
    Registered
    Join Date
    Aug 2006
    Location
    USA
    Posts
    40
    Downloads
    0
    Uploads
    0

    You tube...

    The machine playing daisy is mine. I also have a video of the 4th axis playing too. (http://media.adamziegler.net/cnc/ << see bottom of page) One of the videos is not the version currently delivered by EMC, but had some modification done by Cradek. (Both versions still sound about the same.... they just move differently.)


  • #17
    Registered
    Join Date
    Apr 2007
    Location
    USA
    Posts
    49
    Downloads
    0
    Uploads
    0

    Convert Music to G-code & Play it on your CNC Machine

    I've been working on making music on my CNC machine for a couple days and managed to get a couple of Star Wars tunes working. I kept a lot of notes of the whole process, so I'll post my notes so everyone can see how I did it. My notes are quite long so I'll post them in segments. Sorry for any mistakes. Hope you enjoy.


  • #18
    Registered
    Join Date
    Apr 2007
    Location
    USA
    Posts
    49
    Downloads
    0
    Uploads
    0

    Convert Music to G-code & Play it on your CNC Machine 1 of 10

    *** Axis Details for each stepper motor ***

    I am using 200 steps per revolution motors with 1/10 micro step gecko 203V drives. A total of 2000 micro steps per revolution. Mach 2 is the control software.

    X & Y axis both have 20 tpi(threads per inch). 2000 x 20 = 40,000 steps per inch.

    Z axis has 16.9333 tpi. 2000 x 16.9333 = 33,866.67 steps per inch.

    X axis - 40,000 steps per inch. 1 IPM(inch per minute) = 40,000 /60 = 666.67 steps per second or Hertz.

    Y axis - 40,000 steps per inch. 1 IPM(inch per minute) = 40,000 /60 = 666.67 steps per second or Hertz.

    Z axis - 33,866.67 steps per inch. 1 IPM(inch per minute) = 33,866.67 /60 = 564.44 steps per second or Hertz.

    To convert X & Y numbers to Z numbers, just multiply by 666.67/564.44 or 1.18.

    Note: Using more than one axis together will alter the frequency of each motor since the feed rate is vectored and not parallel with each axis. This can probably be ignored if using the same note for each axis, but I'm not sure how it will work if you want to play different notes on each axis to make chords. It seems like it would take some complex math if you want to play 3 different notes on each axis. When using multiple axis the frequency will be lowered, the feed rate can be increased in Mach 2 to increase the frequency and also the speed. Adjusting the scale in Mach 2 has similar effects.


  • #19
    Registered
    Join Date
    Apr 2007
    Location
    USA
    Posts
    49
    Downloads
    0
    Uploads
    0

    Convert Music to G-code & Play it on your CNC Machine 2 of 10

    *** Music Notes & Frequencies in Hertz ***

    Each octave higher is twice the frequency of the previous octave.

    ----- -1- ----- -2- ----- -3- ---- -4- --- -5-
    A -- 55.00 -- 110.00 - 220.00 - 440.00 - 880.00

    A#- 58.27 -- 116.54 - 233.08 - 466.16 - 932.32

    B -- 61.74 -- 123.48 - 246.96 - 493.92 - 987.84

    C -- 65.41 -- 130.82 - 261.64 - 523.28 - 1046.56

    C#- 69.30 -- 138.60 - 277.20 - 554.40 - 1108.80

    D -- 73.42 -- 146.84 - 293.68 - 587.36 - 1174.72

    D#- 77.78 -- 155.56 - 311.12 - 622.24 - 1244.48

    E -- 82.41 -- 164.82 - 329.64 - 659.28 - 1318.56

    F -- 87.31 -- 174.62 - 349.24 - 698.48 - 1396.96

    F#- 92.50 -- 185.00 - 370.00 - 740.00 - 1480.00

    G -- 98.00 -- 196.00 - 392.00 - 784.00 - 1568.00

    G#- 103.83 - 207.66 - 415.32 - 830.64 - 1661.28


    http://www.techlib.com/reference/mus...requencies.htm


  • #20
    Registered
    Join Date
    Apr 2007
    Location
    USA
    Posts
    49
    Downloads
    0
    Uploads
    0

    Convert Music to G-code & Play it on your CNC Machine 3 of 10

    *** Formula to convert frequency to feed rate ***

    Divide the note frequency by 666.67 to get the equivalent IPM to achieve that frequency. Double the result for each octave.

    Inches per minute -

    ----------------------------------- -1- ---- -2- ---- -3- ---- -4- ---- -5-
    A -- 55.00 ----> 55.00/666.67 -- 0.0825 - 0.165 --- 0.33 --- 0.66 ---- 1.32

    A# - 58.27 ----> 58.27/666.67 -- 0.0874 - 0.1748 - 0.3496 - 0.6992 - 1.3984

    B -- 61.74 ----> 61.74/666.67 -- 0.0926 - 0.1852 - 0.3704 - 0.7408 - 1.4816

    C -- 65.41 ----> 65.41/666.67 -- 0.0981 - 0.1962 - 0.3924 - 0.7848 - 1.5696

    C# - 69.30 ----> 69.30/666.67 -- 0.1039 - 0.2078 - 0.4156 - 0.8312 - 1.6624

    D -- 73.42 ----> 73.42/666.67 -- 0.1101 - 0.2202 - 0.4404 - 0.8808 - 1.7616

    D# - 77.78 ----> 77.78/666.67 -- 0.1167 - 0.2334 - 0.4668 - 0.9336 - 1.8672

    E -- 82.41 ----> 82.41/666.67 -- 0.1236 -- 0.2472 - 0.4944 - 0.9888 - 1.9776

    F -- 87.31 ----> 87.31/666.67 -- 0.1310 -- 0.262 -- 0.524 -- 1.048 -- 2.096

    F# - 92.50 ----> 92.50/666.67 -- 0.1387 - 0.2774 - 0.5548 - 1.1096 - 2.2192

    G -- 98.00 ----> 98.00/666.67 -- 0.1470 - 0.294 -- 0.588 -- 1.176 -- 2.352

    G# - 103.83 --> 103.83/666.67 - 0.1557 - 0.3114 - 0.6228 - 1.2456 - 2.4912


  • #21
    Registered
    Join Date
    Apr 2007
    Location
    USA
    Posts
    49
    Downloads
    0
    Uploads
    0

    Convert Music to G-code & Play it on your CNC Machine 4 of 10

    *** Note Length ***

    Music note length will be controlled by giving a specific distance to move. That distance will depend on the length of the note desired and the IPM required for that note. Divide the IPM by 60 to get IPS(inches per second), then multiply by the number of seconds desired.

    For example, say we want the 3rd octave of C to play for 0.5 seconds.

    0.3924 IPM / 60 = 0.00654 IPS ----> 0.00654 IPS x 0.5 seconds = 0.00327 Inches

    Gcode example: G91 G01 X.00327 F.3924

    G91 turns on incremental move, G01 is a linear move, X.00327 is the distance to travel in the X axis, and F.3924 is the feed rate in inches per minute.

    Inches per Second -

    --------------------- -1- ------ -2- ------ -3- ------ -4- ------ -5-
    A -- 0.0825/60 --- 0.001375 - 0.00275 -- 0.0055 --- 0.011 ---- 0.022

    A# - 0.0874/60 -- 0.001457 - 0.002914 - 0.005828 - 0.011656 - 0.023312

    B -- 0.0926/60 -- 0.001543 - 0.003086 - 0.006172 - 0.012344 - 0.024688

    C -- 0.0981/60 -- 0.001635 - 0.00327 -- 0.00654 -- 0.01308 -- 0.02616

    C# - 0.1039/60 -- 0.001732 - 0.003464 - 0.006928 - 0.013856 - 0.027712

    D -- 0.1101/60 -- 0.001835 - 0.00367 -- 0.00734 -- 0.01468 -- 0.02936

    D# - 0.1167/60 -- 0.001945 - 0.00389 -- 0.00778 -- 0.01556 -- 0.03112

    E -- 0.1236/60 -- 0.00206 -- 0.00412 -- 0.00824 -- 0.01648 -- 0.03296

    F -- 0.1310/60 -- 0.002183 - 0.004366 - 0.008732 - 0.017464 - 0.034928

    F# - 0.1387/60 -- 0.002312 - 0.004624 - 0.009248 - 0.018496 - 0.036992

    G -- 0.1470/60 -- 0.00245 -- 0.0049 --- 0.0098 ---- 0.0196 ---- 0.0392

    G# - 0.1557/60 -- 0.002595 - 0.00519 -- 0.01038 -- 0.02076 -- 0.04152


  • #22
    Registered
    Join Date
    Apr 2007
    Location
    USA
    Posts
    49
    Downloads
    0
    Uploads
    0

    Convert Music to G-code & Play it on your CNC Machine 5 of 10

    *** Rests ***

    For rests, use the G04 dwell code along with the P code to specify a dwell time in seconds. A 0.25 second rest is represented in this example:

    G04 P.25

    Note: I found that Mach 2 doesn't go in and out of dwell fast enough, so I had to use P.0625 instead of P.25 for the rests in the Star Wars Imperial March. It still wasn't short enough in my opinion, but I think there might be a minimum dwell time you can do since lowering it more doesn't seam to do much.


  • #23
    Registered
    Join Date
    Apr 2007
    Location
    USA
    Posts
    49
    Downloads
    0
    Uploads
    0

    Convert Music to G-code & Play it on your CNC Machine 6 of 10

    *** Example 1 - Star Wars Theme ***

    Note: Using spreadsheet software, such as MS Excel could make this a lot easier.

    Converting Notes to numbers -

    D2 - 0.00367 x .25 = 0.0009175 F0.2202
    D2 - 0.00367 x .25 = 0.0009175 F0.2202
    D2 - 0.00367 x .25 = 0.0009175 F0.2202

    G2 - 0.0049 F0.294
    D3 - 0.00734 F0.4404

    C3 - 0.00654 x .25 = 0.001635 F0.3924
    B3 - 0.006172 x .25 = 0.001543 F0.3704
    A3 - 0.0055 x .25 = 0.001375 F0.33
    G3 - 0.0098 F0.588
    D3 - 0.00734 x .5 = 0.00367 F0.4404

    C3 - 0.00654 x .25 = 0.001635 F0.3924
    B3 - 0.006172 x .25 = 0.001543 F0.3704
    A3 - 0.0055 x .25 = 0.001375 F0.33
    G3 - 0.0098 F0.588
    D3 - 0.00734 x .5 = 0.00367 F0.4404

    C3 - 0.00654 x .25 = 0.001635 F0.3924
    B3 - 0.006172 x .25 = 0.001543 F0.3704
    C3 - 0.00654 x .25 = 0.001635 F0.3924
    A3 - 0.0055 F0.33

    Note: In Mach 2, the feed rate and the scale can both be adjusted to speed up or slow down the music and to change the pitch.

    Here is the final gcode. I tested it and it works on my machine.

    Single Axis gcode -

    %
    ( Star Wars Theme Song )
    G91 G01 X0.0009175 F0.2202
    X0.0009175
    X0.0009175

    X0.0049 F0.294
    X0.00734 F0.4404

    X0.001635 F0.3924
    X0.001543 F0.3704
    X0.001375 F0.33
    X0.0098 F0.588
    X0.00367 F0.4404

    X0.001635 F0.3924
    X0.001543 F0.3704
    X0.001375 F0.33
    X0.0098 F0.588
    X0.00367 F0.4404

    X0.001635 F0.3924
    X0.001543 F0.3704
    X0.001635 F0.3924
    X0.0055 F0.33
    %


  • #24
    Registered
    Join Date
    Apr 2007
    Location
    USA
    Posts
    49
    Downloads
    0
    Uploads
    0

    Convert Music to G-code & Play it on your CNC Machine 7 of 10

    Two Axis gcode -

    %
    ( Star Wars Theme Song )
    G91 G01 X0.0009175 Y0.0009175 F0.2202
    X0.0009175 Y0.0009175
    X0.0009175 Y0.0009175

    X0.0049 Y0.0049 F0.294
    X0.00734 Y0.00734 F0.4404

    X0.001635 Y0.001635 F0.3924
    X0.001543 Y0.001543 F0.3704
    X0.001375 Y0.001375 F0.33
    X0.0098 Y0.0098 F0.588
    X0.00367 Y0.00367 F0.4404

    X0.001635 Y0.001635 F0.3924
    X0.001543 Y0.001543 F0.3704
    X0.001375 Y0.001375 F0.33
    X0.0098 Y0.0098 F0.588
    X0.00367 Y0.00367 F0.4404

    X0.001635 Y0.001635 F0.3924
    X0.001543 Y0.001543 F0.3704
    X0.001635 Y0.001635 F0.3924
    X0.0055 Y0.0055 F0.33
    %


  • Page 2 of 7 FirstFirst 12345 ... LastLast

    Similar Threads

    1. Need a cylinder for a music box
      By AustinT in forum Employment Opportunity
      Replies: 6
      Last Post: 06-24-2007, 08:59 PM
    2. Making music with plasma
      By cut more in forum General Waterjet
      Replies: 2
      Last Post: 01-26-2007, 01:03 PM
    3. Music in the shop
      By dighsx in forum CNCzone Club House
      Replies: 12
      Last Post: 06-25-2006, 11:53 PM
    4. Scanner Music CNC
      By Sanghera in forum CNCzone Club House
      Replies: 4
      Last Post: 01-22-2006, 09:58 PM
    5. Reading music cd's a problem
      By thuffner3 in forum Computers and Networking
      Replies: 11
      Last Post: 02-11-2004, 05:47 PM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.