The Nokia Ringtone format (also called RTTTL) was created to encode simple tunes as Nokia phone ringtones.
If you know the notes of a song, you can turn it into a ringtone that MicroBlocks can play.
A tune consists of a header (title + default values) followed by a sequence of notes and rests separated by commas. Each note specifies the note name, octave, and duration. For example, 2c4 represents a half-note middle C. See the Wikipedia article Ring Tone Text Transfer Language for further details.
It's easy to play ringtones! You can use a board with a built-in speaker or attach an external speaker or headphones to your board.
Open the Ringtone library and drag out the play ringtone block. Check your speaker with the default tune. Then copy and paste your own tune into the block.
Note: Copy-paste does not work in Chromebook app, but you can paste text into the block by selecting the text in another window and dragging and dropping it onto the MicroBlocks window.
This file contains over eleven thousand tunes in Nokring format. The tune quality varies, but often you can find something useful in this file. Open the file in a text editor and search for your tune (e.g. "pacman" or "starwars").