This is an adaptation of a sample scketch from tone library By Brett Hagman, it uses Rtttl which is a compact format por mono ringtones.
It's compact, it's just a string you can paste in your code, no array construction with frequencies and durations. You can change the octave and tempo fast and easy.
This uses TimerFreetone by Tim Eckel , so it can be used with LedControl, Servos and other libraries that requiere the use of timers.
Also it uses Flash library by Mikal Hart to store the strings in PROGMEM this helps reducing the RAM use, wich is essential when you use complex code or need to play several melodies.
Delays and while loop has been removed so it can plays asynchronously using the technique described in BlinkWithoutDelay so you can blink leds, move servo and check inputs while the music plays.