# RTTTL Obfuscation

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.

• Can the beats per second be a decimal? – Downgoat Oct 9 '15 at 1:37
• No. Also that was supposed to be beats per minute, I've fixed that. – a spaghetto Oct 9 '15 at 1:51
• Is there any way to convert a midi file to an RTTTL song? – The_Basset_Hound Oct 9 '15 at 2:10
• 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.) – a spaghetto Oct 9 '15 at 2:22
• Found one that works: midi.mathewvp.com/midi2RTTL.php – The_Basset_Hound Oct 9 '15 at 3:11

# 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,
8e3,
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,
1a2,\td3,
8f#3, 8a3, c3, 8e3, 8g3, d3,\t8f#3,
8a3,\tc3, 8e3, 8g3, d3,
8f#3, 8a3,
c3, 8e3, 8g3,\td3,
8f#3,
8a3, c3, 8e3, 8g3,\td3, 8f#3,
8a3,
c3,
8e3,
8g3,d3,8f#3,8a3,c3,8e3,8g3,d3,8f#3,8a3,c3,8e3,8g3,d3,8f#3,8a3,c3,8e3,8g3,8d3,274p,8f3,274p,8d3,8c#3,8c3,274p,8b2,274c3,8p,8c#3,8d3,274p,8f3,274p,8d3,8c#3,8c3,274p,8b2,274c3,8p,8c#3,8d3,274p,8f3,274p,8d3,8c#3,8c3,274p,8b2,274c3,8p,8c#3,8d3,274p,8f3,274p,8d3,8c#3,8c3,274p,8b2,274c3,8p,8c#3,8d3,274p,8f3,274p,8d3,8c#3,8c3,274p,8b2,274c3,8p,8c#3,8d3,274p,8f3,274p,8d3,8c#3,8c3,274p,8b2,274c3,8p,8c#3,8d3,274p,8f3,274p,8d3,8c#3,8c3,274p,8b2,274c3,8p,8c#3,8d3,274p,8f3,274p,8d3,8c#3,8c3,274p,8b2,274c3,8p,8c#3,8d3,274p,8f3,274p,8d3,8c#3,8c3,274p,8b2,274c3,8p,8c#3,8d3,274p,8f3,274p,8d3,8c#3,8c3,274p,8b2,274c3,8p,8c#3,8d3,274p,8f3,274p,8d3,8c#3,8c3,274p,8b2,274c3,8p,8c#3,8d3,274p,8f3,274p,8d3,8c#3,8c3,274p,8b2,274c3,8p,8c#3,8d3,274p,8f3,274p,8d3,8c#3,


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

• 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. – TessellatingHeckler Oct 9 '15 at 7:09
• 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. – a spaghetto Oct 9 '15 at 13:33

# H9+, 157,007 bytes

MIDI!!!!

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

• .MP3 => .MID
• .MID => .RTL

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:

ANTHEM:d=4,o=5,b=120:172c#,86f#,86a4,172p,16p,43a4,86p,43f#4,172a4,10p,57a4,...


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 .

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

# 123, 816 Bytes

H:d=4,o=4,b=400:2a,2b,2a,2b,1a,1b,2a,1b,1a,2b,1a,1b,1a,2b,1a,1b,2a,2b,2a,2b,2a,2b,2a,2b,1a,1b,2a,1b,1a,1b,1a,2b,1a,1b,1a,2b,1a,1b,2a,1b,1a,2b,2a,2b,2a,2b,2a,2b,2a,1b,1a,2b,1a,1b,2a,1b,1a,3b,3a,1b,2a,1b,1a,2b,1a,3b,1a,2b,1a,2b,1a,1b,2a,2b,2a,2b,2a,2b,2a,2b,1a,1b,1a,2b,1a,1b,2a,1b,3a,3b,1a,2b,1a,1b,2a,1b,3a,1b,2a,2b,2a,2b,2a,2b,2a,2b,1a,1b,1a,2b,1a,1b,3a,3b,2a,1b,1a,3b,3a,1b,2a,1b,1a,2b,2a,2b,2a,2b,2a,1b,1a,1b,2a,1b,1a,2b,3a,3b,1a,1b,2a,3b,3a,2b,2a,2b,2a,2b,2a,2b,1a,1b,1a,1b,2a,1b,1a,1b,1a,1b,2a,1b,1a,2b,2a,2b,2a,2b,1a,1b,1a,1b,2a,1b,1a,2b,1a,1b,2a,2b,2a,2b,2a,2b,2a,2b,1a,1b,2a,1b,1a,1b,1a,1b,2a,1b,1a,2b,1a,1b,2a,1b,1a,2b,2a,2b,2a,2b,2a,2b,1a,1b,1a,1b,1a,2b,1a,1b,2a,1b,1a,2b,1a,1b,2a,2b,2a,2b,2a,1b,3a,3b,1a,2b,1a,1b,2a,1b,3a,1b,2a,2b,2a,2b,2a,2b,2a,2b,1a,1b,2a,1b,1a,1b,3a,3b,2a,1b,1a,3b,3a,1b,2a,1b,1a,2b,1a


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.

• Wow, never seen this language before. Nice one! – a spaghetto Oct 11 '15 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.

print[':d=4,o=5,b=120:2p,8g,8f#,8e,8e,2f#,1p,8a4,8g,8f#,8e,e,f#.,d,8e,1a4,8p,8a4,e,8f#,g.,8e,c#,d.,e,8a4,a4,1f#,2p,8g,8f#,8e,8e,2f#,1p,8a4,8g,8f#,8e,e.,8f#,d.,8e,2a4,2p,e,8f#,g.,8e,c#.,8d,e,8a4,8d,8e,8f,8e,8d,8c,p,8a4,8a#4,c,f,8e,8d,8d,8c,8d,8c,c,c,8a4,8a#4,c,f,8g,8f,8e,8d,8d,8e,f,f,8g,8a,8a#,8a#,a,g,8f,8g,8a,8a,g,f,8d,8c,8d,8f,8f,e,8e,8f#,8f#,8a,8d6,8f#6,8d6,8b,8d6,8f#6,8d6,8a,8d6,8f#6,8d6,8b,8d6,8f#6,8d6,8a,8d6,8f#6,8d6,8b,8d6,8f#6,8d6,p.,8a4,8g,8f#,8e,8e.,2f#,1p,8a4,8g,8f#,8e,e.,8f#,d,e,2a4,2p,e,8f#,g.,e,c#,8d,e.,8a4,a4,2f#,2p,8a4,8p,8b,8p,8a,8p,8g,8p,8g,8p,a,1p,8a4,8p,8b,8p,8a,8p,8g,8p,g.,p.,8a,8p,f#.,p.,8g,8p,2d,2p,e,8f#,g.,e,c#,8d,e,8a4,8d,8e,8f,8e,8d,c.,8a4,8a#4,c,f,8e,8d,8d,8c,8d,8c,c,c,8a4,8a#4,c,f,8g,8f,8e,8d,8d,8e,f,f,8g,8a,8a#,8a#,8a,8a,g,8f,8g,8a,8a,8g,8f,f,8d,8c,8d,8f,8f,e,8e,8f#,2f#,1p,8a4,8g,8f#,8e,8e.,2f#,1p,8a4,8g,8f#,8e,e.,8f#,d,e,2a4,2p,e,8f#,g.,e,c#,8d,e.,8a4,a4,2f#,2p,8a4,8p,8b,8p,8a,8p,8g,8p,8g,8p,a,1p,8a4,8p,8b,8p,8a,8p,8g,8p,g.,p.,8a,8p,f#.,p.,8g,8p,2d,2p,e,8f#,g.,e,c#,8d,e,8a4,8d,8e,8f,8e,8d,c.,8a4,8a#4,c,f,8e,8d,8d,8c,8d,8c,c,c,8a4,8a#4,c,f,8g,8f,8e,8d,8d,8e,f,f,8g,8a,8a#,8a#,8a,8a,g,8f,8g,8a,8a,8g,8f,f,8d,8c,8d,8f,8f,e,8e,8f#,8f#,2a,8p,8a,8a,512p,8a,512p,8b,512p,8a,512p,8f#,512p,d,p,8g,8p,8a,8p,2a,8p,8a,8a,512p,8a,512p,8b,512p,8a,512p,8f#,512p,d,p,8g,8p,8a,8p,2a,8p,8a,8a,512p,8a,512p,8b,512p,8a,512p,8f#,512p,d,p,8g,8p,8a,8p,2a,8p,8a,8a,512p,8a,512p,8b,512p,8a,512p,8f#,512p,d,p,8g,8p,8a,8p,2a,8p,8a,8a,512p,8a,512p,8b,512p,8a,512p,8f#,512p,d,p,8g,8p,8a,8p,a.,p.,8g,8a,a.,p.,8g,8f#,2f#',''.join(map(chr,[72,101,108,108,111,44,32,87,111,114,108,100,33]))][1]

• 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. – cole Oct 17 '15 at 4:30
• Um.. your program doesn't seem to be a valid RTTTL song – aditsu Oct 17 '15 at 7:00
• @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. – Status Oct 18 '15 at 1:08
• Well, 2f#' doesn't seem to be a valid note, and neither is ''.join(map(chr, etc. – aditsu Oct 18 '15 at 22:02
• 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. – aditsu Oct 19 '15 at 0:24

# Lenguage

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)

• Lionel Richie - "Hello" ? – LukStorms Oct 18 '15 at 11:29
• @LukStorms yes! :) – aditsu Oct 18 '15 at 22:00