Sunday, February 28, 2016

Start/Stop your Rostock Max V2 with Mario Brothers Theme Music

About 3 months ago, I bought a Rostock Max v2 for use in the various projects I've been working on.    It's been a series of ups and downs learning how to use it, but it's been great overall.  Having gotten the printer calibration nearly locked down, I decided to give the printer a little pizzaz -- a short musical number to play before and after a print job completes.  Using what I learned from http://tim.cexx.org/?p=633, I was able to reliably generate single notes in any key I like.  Look for a more generic approach in a future post (i.e., more explanation on how to generate music on a Rostock and some proof of concept code to generate the needed G-code).  For this post, I've included videos my start-up and shut-down music (Super Mario Brothers World 1-1 level start and level completed music) as well as G-code after the jump.

Rostock Max v2 Startup - Super Mario Brothers World 1-1

Rostock Max v2 Shutdown - Super Mario Brothers Level Complete



Start-up G-code (World 1-1 Intro Music):

    After extruder/heated bed warm-up code (M190, M109 G-code lines) and before any other custom code you may have loaded, insert the following G-code:

G1 Z250 F15000
G4 P100
G1 Z250.69 F247.22
G1 Z251.37 F247.22
G4 P167
G1 Z252.06 F247.22
G4 P167
G1 Z252.61 F196.22
G1 Z253.29 F247.22
G1 Z254.11 F294
G4 P500
G1 Z254.52 F147
G4 P500
G1 Z255.06 F196.22
G4 P334
G1 Z255.47 F147
G4 P334
G1 Z255.81 F123.61
G4 P334
G1 Z256.27 F165
G4 P167
G1 Z256.79 F185.21
G4 P167
G1 Z257.27 F174.81
G1 Z257.73 F165
G4 P167
G1 Z258.24 F147
G1 Z259.10 F247.22
G1 Z260.12 F294
G1 Z261.04 F330
G4 P167
G1 Z261.76 F261.92
G1 Z262.58 F294
G4 P167
G1 Z263.27 F247.22
G4 P167
G1 Z263.81 F196.22
G1 Z264.42 F220.25
G1 Z264.94 F185.11

Shutdown G-code (Level complete music):

    Before the last home command (G28) and motor-disable(M84), insert the following G-code:

G1 Z300 F15000
G4 P100
G1 Z300.15 F73.50
G1 Z300.36 F98.11
G1 Z300.62 F123.61
G1 Z300.92 F147
G1 Z301.33 F196.22
G1 Z301.85 F247.22
G1 Z303.48 F294
G1 Z304.85 F247.22
G1 Z305.01 F77.87
G1 Z305.22 F98.11
G1 Z305.46 F116.67
G1 Z305.79 F155.74
G1 Z306.19 F196.22
G1 Z306.68 F233.35
G1 Z308.41 F311.48
G1 Z309.71 F233.35
G1 Z309.89 F87.41
G1 Z310.12 F110.12
G1 Z310.39 F130.96
G1 Z310.76 F174.81
G1 Z311.22 F220.25
G1 Z311.76 F261.92
G1 Z313.7 F349.62
G4 P010
G1 Z314.43 F349.62
G4 P010
G1 Z315.16 F349.62
G4 P010
G1 Z315.89 F349.62
G1 Z318.07 F392.44
G4 P500

As always, if you have any questions, please feel free to leave them in the comments below.  Thanks.

1 comment:

  1. Perfect :) I wanted to do this for a while. Thanks for sharing!

    ReplyDelete