RTTTL, or Ring Tone Text Transfer Language is a music format that was invented by Nokia in the dawn of time when dinosaurs roamed the land. It allows for fairly crude pieces of music (no chords or anything), and the format is pretty simple which is why I think it's pretty cool. Take a look at this one:

DejaVu: d=8,o=5,b=200: e, e, c, e, g, 2g4

Let's dissect the format. The "DejaVu" part at the beginning is the title -- this cannot be longer than ten characters. The d and o are the default values for duration and octave -- if a note doesn't specify duration or octave, it'll use these. Finally, the b is the beats per minute.

After that, the actual notes of the song are listed. The format of a note is DPO, where D is the duration of the note (1, 2, 4, 8, 16), P is the pitch (A,B,C,D,E,F,G,A#,B#,C#,D#,E#,F#,G#), and O is the octave (4-8 in the Nokia implementation, however it is different for other implementations. For the purposes of the challenge we'll say it is 1-8). If the duration or the octave is not specified, the defaults are used. Additionally, a note can have a dot after it -- this essentially multiplies the duration by 1.5.

In our example here, we have two E notes with no duration and octave, which mean that they have the default duration and octave (8, or eighth-note and octave 5), a C with no duration and octave, an E and a G. The final note is a G note with a duration of 2 (half-note) and an octave of 4.

Now that we've gone over the format, what's the challenge? The challenge actually doesn't have too much to do with RTTTL. Your task is to create an obfuscated program that outputs "Hello, World!" (exactly) that is also a valid RTTTL song that is at least five seconds long.

In order to test your RTTTL song, you can use this site to convert your song to a MIDI file, then listen to it in a MIDI player. This is . Good luck!

EDIT: Here's a website for converting MIDIs to RTTTLs if you so desire. Link

EDIT2: This shiny bounty will be awarded to the winner (most upvoted post) in 7 days.

  • \$\begingroup\$ Can the beats per second be a decimal? \$\endgroup\$
    – Downgoat
    Oct 9, 2015 at 1:37
  • \$\begingroup\$ No. Also that was supposed to be beats per minute, I've fixed that. \$\endgroup\$ Oct 9, 2015 at 1:51
  • 1
    \$\begingroup\$ Is there any way to convert a midi file to an RTTTL song? \$\endgroup\$ Oct 9, 2015 at 2:10
  • \$\begingroup\$ I'm sure there is. Maybe try googling it? (You'd have to make sure the MIDI file doesn't contain chords, which RTTTL doesn't support.) \$\endgroup\$ Oct 9, 2015 at 2:22
  • 1
    \$\begingroup\$ Found one that works: midi.mathewvp.com/midi2RTTL.php \$\endgroup\$ Oct 9, 2015 at 3:11

5 Answers 5


Whitespace, 2748 Bytes

(replace \t with actual tabs)

Hello:d=4, o=5, b=120:2p, 16a2,
16p, 16a2, 16p, 16a3,\t16p, 16a3, 16p,\t16g2, 16p, 16g2, 16p,
16g3,\t16p,\t16g3, 16p, 16a2, 16p, e3,\td3,
16b2, 16c3, 16b2, 16a2,\t8g2,\t16a2, 16p, 16a2,\t16p, 16a3,\t16p,
16a3,\t16p,\t16g2, 16p, 16g2, 16p, 16g3,\t16p, 16g3,
16p, 16a2, 16p, e3,\td3,\t16b2, 16c3,\t16b2,\t16a2, 8g2, 16a2,
16p,\t16a2,\t16p, 16a3, 16p, 16a3, 16p,\t16g2,\t16p,
16g2, 16p, 16g3, 16p,\t16g3,\t16p, 16a2,\t16p,\te3, d3, 16b2,
16c3,\t16b2,\t16a2, 8g2, 16a2, 16p, 16a2,\t16p, 16a3, 16p,
16a3, 16p, 16g2, 16p,\t16g2,\t16p, 16g3,\t16p,\t16g3,\t16p,\t16a2,
16p,\te3,\td3, 16b2, 16c3, 16b2, 16a2,\t8g2, 16a2,\t16p,
16a2, 16p, 16a3, 16p,\t16a3, 16p,\t16g2,\t16p, 16g2, 16p,
16g3,\t16p,\t16g3, 16p, 16a2, 16p, e3,\td3,\t16b2, 16c3,
16b2, 16a2, 8g2, 16a2,\t16p, 16a2, 16p, 16a3, 16p, 16a3,
16p,\t16g2,\t16p, 16g2, 16p, 16g3, 16p,\t16g3,\t16p,\t16a2,
16p, e3, d3, 16b2,\t16c3,\t16b2,\t16a2, 8g2,\ta2,\t8c#3,\t8e3,
g2,\t8b2,\t8d3, a2, 8c#3, 8e3, g2,\t8b2, 8d3, a2, 8c#3,
8e3, g2, 8b2, 8d3,\ta2,\t8c#3, 8e3,\tg2,\t8b2,\t8d3,\ta2,
8c#3,\t8e3,\tg2, 8b2, 8d3, a2, 8c#3,\t8e3, g2, 8b2,\t8d3,
a2, 8c#3, 8e3, g2,\t8b2,\t8d3,\ta2, 8c#3, 8e3,\tg2, 8b2,
8d3,\t16a2,\t16p, 16a2, 16p, 16a3, 16p,\t16a3, 16p,\t16g2, 16p,
16g2, 16p, 16g3, 16p,\t16g3,\t16p, 16a2,\t16p,\te3, d3, 16b2,
16c3,\t16b2,\t16a2, 8g2, 16a2, 16p, 16a2,\t16p, 16a3,\t16p,\t16a3,
16p, 16g2, 16p, 16g2,\t16p,\t16g3, 16p, 16g3,\t16p, 16a2, 16p,
e3,\td3,\t16b2, 16c3, 16b2, 16a2, 8g2,\t16a2,\t16p, 16a2, 16p,
16a3, 16p, 16a3, 16p,\t16g2, 16p, 16g2, 16p, 16g3,\t16p,
16g3,\t16p,\t16a2, 16p, e3, d3, 16b2,\t16c3,\t16b2, 16a2,\t8g2,
16a2, 16p, 16a2, 16p,\t16a3,\t16p, 16a3,\t16p,
16g2,\t16p,\t16g2, 16p, 16g3, 16p, 16g3,\t16p,\t16a2,\t16p, e3,
d3, 16b2, 16c3, 16b2,\t16a2, 8g2,\ta2, 8c#3,
8e3,\tg2,\t8b2, 8d3, a2, 8c#3, 8e3,\tg2,\t8b2,\t8d3,\ta2,
8c#3, 8e3, g2, 8b2, 8d3,
a2,\t8c#3,\t8e3, g2, 8b2, 8d3, a2, 8c#3,
g2, 8b2, 8d3, a2, 8c#3,\t8e3,
g2, 8b2,
8d3, a2,\t8c#3,\t8e3,\tg2, 8b2,
8d3, a2,
8c#3,\t8e3, g2, 8b2,\t8d3, 1a3,
8f#3, 8a3, c3, 8e3, 8g3, d3,\t8f#3,
8a3,\tc3, 8e3, 8g3, d3,
8f#3, 8a3,
c3, 8e3, 8g3,\td3,
8a3, c3, 8e3, 8g3,\td3, 8f#3,

It's a horrible ringtone version of The Doors with Hello, I love you.

Download converted MIDI

  • \$\begingroup\$ My player doesn't like it octave: 2, Cannot index into a null array.. The question said only octaves 4-8 are valid, so that's all I coded it for. Sounds good on the linked website, though. \$\endgroup\$ Oct 9, 2015 at 7:09
  • \$\begingroup\$ Ah yes I forgot about this. Some players will support more octaves and some won't. The standard Nokia one only supports 4-8 which is why I mentioned that. \$\endgroup\$ Oct 9, 2015 at 13:33

H9+, 157,007 bytes


Is too long for the post. So here, have a pastebin. (The pastebin doesn't have proper capitalization, FYI.) I used the following softwares:

The song is "Anthem of our Dying Day", by Story of the Year. It is the full, 3.5 minute song. ^-^.

It starts out with:


H, of course, prints Hello, World!. And there are no 9s nor +s in the code, I made sure. Good thing this isn't a .

  • \$\begingroup\$ Magnifique. +1 for you \$\endgroup\$ Oct 15, 2015 at 0:05
  • \$\begingroup\$ @quartata Merci! \$\endgroup\$ Oct 15, 2015 at 0:09
  • 1
    \$\begingroup\$ Hmm, it sounds like a herd of llamas are running around on 10 pianos, is that intended, or some playback problem on my side? \$\endgroup\$ Oct 16, 2015 at 21:10
  • \$\begingroup\$ @aditsu It sort of is; it's just a rather intense rock song. \$\endgroup\$ Oct 16, 2015 at 22:28
  • 4
    \$\begingroup\$ -1 doesn't implement spec ("that outputs "Hello, World!" (exactly)") and isn't written in a programming language. \$\endgroup\$ Oct 17, 2015 at 7:24

123, 816 Bytes


Download tune

This one is just rhythmic beeping, but the language surely has more potential for this challenge, since in 123, all characters except 1, 2 and 3 are ignored. Credits for the original 123 code go to Martin Büttner.

  • \$\begingroup\$ Wow, never seen this language before. Nice one! \$\endgroup\$ Oct 11, 2015 at 0:34

Python 2.7, 1606 bytes

Okay, so it's not amazingly obfuscated, but it does work. I've converted it to a midi file and it does play.

The tune is Still Alive from Portal. I got the tune as a midi file from here, which I then converted into a RTTL. The last few notes are off, but I think that's okay.

  • \$\begingroup\$ Looks like it switched around the melody and backing/counter-melody parts in various places. There might be a version with just the melody somewhere. \$\endgroup\$
    – cole
    Oct 17, 2015 at 4:30
  • \$\begingroup\$ Um.. your program doesn't seem to be a valid RTTTL song \$\endgroup\$ Oct 17, 2015 at 7:00
  • \$\begingroup\$ @aditsu The only way I can check if its valid is by converting it to a midi file, so uh... you'll have to tell me how it's invalid. \$\endgroup\$
    – Status
    Oct 18, 2015 at 1:08
  • 3
    \$\begingroup\$ Well, 2f#' doesn't seem to be a valid note, and neither is ''.join(map(chr, etc. \$\endgroup\$ Oct 18, 2015 at 22:02
  • 1
    \$\begingroup\$ It's right here in the challenge text: "The format of a note is DPO, where D is the duration of the note […]" - read the whole paragraph. \$\endgroup\$ Oct 19, 2015 at 0:24


Hello: d=8,o=4,b=130: a, b, 4e5, a, b, 4e5, g, b, 4e5, g, b, 4e5, f, a, 4e5, f, a, 4e5, g, b, 4e5, f, a, 4e5, a, b, 4e5, a, b, 4e5, g, b, 4e5, g, b, 4e5, f, a, 4e5, f, a, 4e5, g, b, 4e5, f, a, e5, e, 4e, a, 4a., b, 4b., c5, 4c.5, 4d.5, 4c5, 2d5, p, g, b, 4e5, f, a, e5, e, e, 4a, 4a, 4b, 4b, 4c5, 2c5, b, c5, 4b, 2a, p, g, b, 4e5, f, a, e5, e, 4e, a, 4a., b, 4b., c5, 4c.5, 4d.5, 4c5, 2d5, p, g, b, 4e5, f, a, e5, d5, 2e5, a, b, 4e5, g, b, 4e5, g, b, d5, c5, e5, 4d.5, d5, c5, 4e5, a, c#5, 4e5, a, c#5, d5, e5, f5, e5, e5, d5, 2d5, g, b, 4d5, g, b, c5, d5, e5, d5, d5, c5, c5, g, 4a, f, a, 4c5, f, a, a#, c5, 4d.5, 4c.5, c5, a#, 4a, 2g#, f#, g#, 4a, a, 4b, a, 4c5, a, c5, 4e5, a, c5, d5, e5, 4f5, f5, 4f5, e5, 4d5, g, b, 4d5, g, b, c5, d5, 4e5, f5, 4e5, d5, c5, g, 2a, f, a, a#, c5, 4d5, c5, 4c5, 4a#, 4a, 2g#., 2p., p, f#, g#, 2a, a, b, 4e5, g, b, 4e5, g, b, 4e5, f, a, 4e5, f, a, 4e5, g, b, 4e5, f, a, 4e5, 4a, 4c#5, 1e5

Followed by many gazillions of spaces so that the total length is 150306725405247424813082671095009555930972306375297366901721134222563463360025683976401363734706798738542991492

Convert and download (note: the code is truncated to save bandwidth, but the resulting midi should be the same)

  • 2
    \$\begingroup\$ Lionel Richie - "Hello" ? \$\endgroup\$
    – LukStorms
    Oct 18, 2015 at 11:29
  • \$\begingroup\$ @LukStorms yes! :) \$\endgroup\$ Oct 18, 2015 at 22:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.