15
1
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 popularity-contest. 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 – 2015-10-09T01:37:29.710
No. Also that was supposed to be beats per minute, I've fixed that. – a spaghetto – 2015-10-09T01:51:44.853
1Is there any way to convert a midi file to an RTTTL song? – The_Basset_Hound – 2015-10-09T02:10:33.667
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 – 2015-10-09T02:22:59.040
1
Found one that works: http://midi.mathewvp.com/midi2RTTL.php
– The_Basset_Hound – 2015-10-09T03:11:44.887Would the person who downvoted this challenge please explain why they downvoted it? It's really important that I get feedback so I can make better challenges in the future. – a spaghetto – 2015-10-09T13:36:13.867
The challenge itself looks pretty hard, so instead I wrote a script to play the tunes. (It's not golfed). PowerShell / Console Beep based
– TessellatingHeckler – 2015-10-09T17:36:43.897Play-RTTTL.ps1
, and found some example songs online.Updated the question to make octaves 1-8. If you guys are writing any RTTTL players I recommend you change them. The Nokia implementation does indeed use 4-8 but the format can handle 1-8. – a spaghetto – 2015-10-09T18:21:34.653