RTTTL混淆


15

RTTTL铃声文本传输语言是诺基亚在恐龙漫游土地的曙光中发明的一种音乐格式。它允许播放相当粗糙的音乐(没有和弦或任何东西),而且格式非常简单,这就是为什么我认为它很酷。看一下这个:

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

让我们剖析格式。开头的“ DejaVu”部分是标题-不能超过10个字符。d和o是持续时间和八度的默认值-如果音符未指定持续时间或八度,它将使用它们。最后,b是每分钟的拍数。

之后,将列出歌曲的实际音符。音符的格式为DPO,其中D为音符的持续时间(1、2、4、8、16),P为音高(A,B,C,D,E,F,G,A#,B# ,C#,D#,E#,F#,G#)和O是八度音阶(在诺基亚实现中为4-8,但是对于其他实现则有所不同。出于挑战的目的,我们将其称为1-8)。 。如果未指定持续时间或八度,则使用默认值。此外,音符后面可以有一个点-这实际上是将持续时间乘以1.5。

在此处的示例中,我们有两个没有持续时间和八度的E音符,这意味着它们具有默认的持续时间和八度(8,或者八分音符和八度5),一个没有持续时间和八度的C,一个E和一个G.最后的音符是持续时间为2(半音符)和八度为4的G音符。

既然我们已经了解了格式,那么挑战是什么?实际上,挑战与RTTTL无关。您的任务是创建一个混淆的程序,输出“ Hello,World!”。(恰好)这也是一首有效的RTTTL歌曲,长度至少为5秒

为了测试您的RTTTL歌曲,您可以使用此站点将您的歌曲转换为MIDI文件,然后在MIDI播放器中收听。这是。祝好运!

编辑:如果您愿意,这是一个将MIDI转换为RTTTL的网站。链接

编辑2:这项闪亮的赏金将在7天之内颁发给获胜者(获得最高评价的职位)。


每秒的节拍可以是小数吗?
Downgoat

不。同样应该每分钟跳动一次,我已经解决了。
意大利面条

1
有什么方法可以将Midi文件转换为RTTTL歌曲?
The_Basset_Hound 2015年

我确定有。也许尝试谷歌搜索?(您必须确保MIDI文件不包含RTTTL不支持的和弦。)
意大利面条(

1
找到了一个有效的方法:midi.mathewvp.com/midi2RTTL.php
The_Basset_Hound 2015年

Answers:


13

空格,2748字节

\t用实际的标签代替)

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,

这是《你好,我爱你》的可怕铃声。

下载转换的MIDI


我的播放器不喜欢它octave: 2, Cannot index into a null array.。这个问题说只有八度音阶4-8是有效的,所以这就是我编码的全部。不过,在链接的网站上听起来不错。
TessellatingHeckler,2015年

啊,是的,我忘记了这一点。有些播放器支持更多的八度音,有些则不支持。标准的诺基亚手机仅支持4-8,这就是我提到它的原因。
意大利面条

8

H9 +,157,007字节

MIDI !!!!

发布时间过长。所以在这里,有一个pastebin。(Pastebin没有正确的大小写,仅供参考)。我使用了以下软件:

这首歌是《年度故事》中的“我们垂死的国歌”。这首完整的3.5分钟歌曲。^-^

它开始于:

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

H,当然是印刷品Hello, World!。我确定代码中没有9s或+s。好东西,这不是


美化。为您+1
意大利面条

@quartata 谢谢!
Conor O'Brien

1
嗯,听起来像是一群美洲驼在10架钢琴上奔跑,这是有意的,还是我这边有一些播放问题?
aidtsu退出是因为SE为EVIL,2015年

@aditsu有点像;这只是一首相当激烈的摇滚歌曲。
Conor O'Brien 2015年

4
-1没有实现spec(“ 输出“ Hello,World!”(完全) ”),也不是用编程语言编写的
彼得·泰勒

7

123,816字节

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

下载曲调

这只是一种有节奏的提示音,但是这种语言无疑具有更大的潜力,因为在123中,除了1、2和3以外的所有字符都将被忽略。原始123代码的贡献MartinBüttner所有


哇,以前从未见过这种语言。好一个!
意大利面条

2

Python 2.7,1606字节

好的,它并没有令人惊讶地被混淆,但是它确实有效。我已经转换为midi文件,并且可以播放。

曲调是还活着门户网站。我从这里得到了一个midi文件,然后转换为RTTL。最后几条音符关闭了,但是我认为还可以。

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]

好像它在各个地方切换了旋律和背景音乐/反旋律部分。可能会有某个版本仅在某处有旋律。
2015年

嗯..您的程序似乎不是一首有效的RTTTL歌曲
因为SE在

@aditsu我可以检查其是否有效的唯一方法是将其转换为midi文件,所以...您必须告诉我它是如何无效的。
状态

3
好了,2f#'似乎没有一个有效的笔记,也不是''.join(map(chr
aditsu退出,因为SE是邪恶的

1
就在挑战文本中:“注释的格式为DPO,其中D为注释的持续时间[…]”-阅读全文。
aidtsu退出是因为SE为EVIL,2015年

1

语言

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

随后是数以万亿计的空格,因此总长度为150306725405247424813082671095009555930972306375297366901721134222563463360025683976401363734706798738542991492

转换并下载(请注意:代码被截断以节省带宽,但产生的midi应该相同)


2
莱昂内尔·里奇-“你好”?
LukStorms 2015年

@LukStorms是的!:)
aidtsu退出是因为SE是EVIL
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.