Add preview of 1984-2019
The 2020 winners are hinted it, but the source code is not there,
nor are the hints. Someone could look into the HTML and
see what was commented out, but that is not a problem because
WHO won is known and the name of their AWARD is known already.
Moreover a number of the winners have talked about what their
entirs do, so the commented out spoiler text is not a bit problem.
One will find HTML commented out with:
<!-- XXX remove when 2020 is ready
2020 links here
XXX remove when 2020 is ready -->
The "XXX remove when 2020 is ready" string is found at the
start and end comment blocks. Again, soneone could read
what was commented out, but that is OK since most of that
information is known or can be known. The following files
have such HTML comment blocks in them.
./winners.html
./years-spoiler.html
./years.html
In addition, ./all/summary.txt was modified to not
include the 2020 entries for the momemt.
The 2020 winner code AND write-ups are NOT part of this set.
p.s. The all/all.tar.bz2 does not contain the 2020 source code (yet?).
This commit is contained in:
1 parent
28efc67f5d
commit
c0663537cb
1683 files changed
+220064
No files matched your search
@@ -0,0 +1,202 @@
|
||||
#!/usr/bin/env make
|
||||
#
|
||||
# 2013 makefile
|
||||
#
|
||||
# This work by Landon Curt Noll, Simon Cooper, and Leonid A. Broukhis
|
||||
# is licensed under:
|
||||
#
|
||||
# Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
#
|
||||
# See: http://creativecommons.org/licenses/by-sa/3.0/
|
||||
|
||||
|
||||
################
|
||||
# tool locations
|
||||
################
|
||||
#
|
||||
SHELL= /bin/bash
|
||||
CP= cp
|
||||
CPP= cpp
|
||||
GUNZIP= gunzip
|
||||
LD= ld
|
||||
MAKE= make
|
||||
RM= rm
|
||||
SED= sed
|
||||
TAR= tar
|
||||
TRUE= true
|
||||
|
||||
# Set X11_LIBDIR to the directory where the X11 library resides
|
||||
#
|
||||
X11_LIBDIR= /usr/X11R6/lib
|
||||
|
||||
# Set X11_INCLUDEDIR to the directory where the X11 include files reside
|
||||
#
|
||||
X11_INCDIR= /usr/X11R6/include
|
||||
|
||||
# Compiler warnings
|
||||
#
|
||||
#CWARN=
|
||||
CWARN= -Wall -Wno-implicit-int -Wno-main -Wno-implicit-function-declaration
|
||||
#CWARN= -Wall -pedantic
|
||||
|
||||
# compiler standard
|
||||
#
|
||||
#CSTD=
|
||||
#CSTD= -ansi
|
||||
CSTD= -std=c99
|
||||
|
||||
# compiler bit architecture
|
||||
#
|
||||
# Some entries require 32-bitness:
|
||||
# ARCH= -m32
|
||||
#
|
||||
# Some entries require 64-bitess:
|
||||
# ARCH= -m64
|
||||
#
|
||||
# By default we assume nothing:
|
||||
#
|
||||
ARCH=
|
||||
|
||||
# optimization
|
||||
#
|
||||
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
||||
# A few compilers have broken optimizers or this entry make break
|
||||
# under those buggy optimizers and thus you may not want anything.
|
||||
#
|
||||
#OPT=
|
||||
#OPT= -O
|
||||
#OPT= -O1
|
||||
OPT= -O2
|
||||
#OPT= -O3
|
||||
|
||||
# Libraries needed to build
|
||||
#
|
||||
LIBS=
|
||||
|
||||
# default flags for ANSI C compilation
|
||||
#
|
||||
CFLAGS= ${CWARN} -include stdio.h ${CSTD} ${ARCH} ${OPT}
|
||||
|
||||
# ANSI compiler
|
||||
#
|
||||
# Set CC to the name of your ANSI compiler.
|
||||
#
|
||||
# Some entries seem to need gcc. If you have gcc, set
|
||||
# both CC and MAY_NEED_GCC to gcc.
|
||||
#
|
||||
# If you do not have gcc, set CC to the name of your ANSI compiler, and
|
||||
# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just :
|
||||
# to disable such programs.
|
||||
#
|
||||
CC= cc
|
||||
#CC=clang
|
||||
MAY_NEED_GCC= gcc
|
||||
|
||||
|
||||
##############################
|
||||
# Special flags for this entry
|
||||
##############################
|
||||
#
|
||||
ENTRY= endoh3
|
||||
DATA=
|
||||
ALT_OBJ=
|
||||
ALT_ENTRY=
|
||||
|
||||
|
||||
#################
|
||||
# build the entry
|
||||
#################
|
||||
#
|
||||
all: ${ENTRY} ${DATA}
|
||||
@${TRUE}
|
||||
|
||||
${ENTRY}: ${ENTRY}.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||
|
||||
# alternative executable
|
||||
#
|
||||
alt: ${ALT_ENTRY}
|
||||
@${TRUE}
|
||||
|
||||
# data files
|
||||
#
|
||||
data: ${DATA}
|
||||
@${TRUE}
|
||||
|
||||
|
||||
###############
|
||||
# utility rules
|
||||
###############
|
||||
#
|
||||
everything: all alt
|
||||
|
||||
clean:
|
||||
${RM} -f ${ENTRY}.o ${ALT_OBJ}
|
||||
|
||||
clobber: clean
|
||||
${RM} -f ${ENTRY} ${ALT_ENTRY}
|
||||
|
||||
nuke: clobber
|
||||
@${TRUE}
|
||||
|
||||
dist_clean: nuke
|
||||
@${TRUE}
|
||||
|
||||
install:
|
||||
@echo "Surely we are joking Dr. Lehmer!"
|
||||
@${TRUE}
|
||||
|
||||
# backwards compatibility
|
||||
#
|
||||
build: all
|
||||
@${TRUE}
|
||||
|
||||
|
||||
##################
|
||||
# 133t hacker rulz
|
||||
##################
|
||||
#
|
||||
love:
|
||||
@echo 'not war?'
|
||||
@${TRUE}
|
||||
|
||||
haste:
|
||||
$(MAKE) waste
|
||||
@${TRUE}
|
||||
|
||||
waste:
|
||||
@echo 'haste'
|
||||
@${TRUE}
|
||||
|
||||
easter_egg:
|
||||
@echo you expected to mis-understand this $${RANDOM} magic
|
||||
@echo chongo '<was here>' "/\\oo/\\"
|
||||
@echo Readers shall not be disallowed from being unable to not partly misunderstand this partocular final echo.
|
||||
|
||||
# Understand the history of the Homebrew Computer Club
|
||||
# as well as the West Coast Computer Faire and
|
||||
# you might be confused different. :-)
|
||||
#
|
||||
supernova: nuke
|
||||
@-if [ -r .code_anal ]; then \
|
||||
${RM} -f .code_anal_v4; \
|
||||
else \
|
||||
echo "We are not expected to understand that"; \
|
||||
fi
|
||||
@${TRUE}
|
||||
|
||||
deep_magic:
|
||||
@-if [ -r .code_anal ]; then \
|
||||
ccode_analysis --deep_magic 2ed3582ec5c094a093fea2a6bcb9f19439892873c9cc45ed1ceaafe08b7d52e1b2c7cd524be3b0b2 --FNV1a_hash 512-bit "${ENTRY}"; \
|
||||
else \
|
||||
echo "Park different"; \
|
||||
fi
|
||||
@${TRUE}
|
||||
|
||||
magic: deep_magic
|
||||
@-if [ -r .code_anal ]; then \
|
||||
ccode_analysis --mode 391581 --level 216193 --FNV1a_hash 512-bit "${ENTRY}"; \
|
||||
else \
|
||||
echo "These aren't the primes you're looking for Paul Erdos!"; \
|
||||
fi
|
||||
@${TRUE}
|
||||
@@ -0,0 +1 @@
|
||||
char a;float b,c;main(d){for(;d>2e3*c?c=1,scanf(" %c%f",&a,&c),d=55-a%32*9/5,b=d>9,d=d%13-a/32*12:1;a=2)++d<24?b*=89/84.:putchar(a=b*d);}
|
||||
@@ -0,0 +1,2 @@
|
||||
dc Fzfzfzdc Fzfzfzdc FzfzDzfz Czezez
|
||||
dc Czezezdc Czezezdc CzezDzez Fzfzfz
|
||||
@@ -0,0 +1,242 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="GENERATOR" content="mkd2html 2.1.5a DL=DISCOUNT">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||
<link rel="stylesheet"
|
||||
type="text/css"
|
||||
href="../hint.css">
|
||||
<title>Most tweetable 1-liner</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Most tweetable 1-liner</h1>
|
||||
|
||||
<p>Yusuke Endoh<br>
|
||||
<a href="mailto:mame@ruby-lang.org">mame@ruby-lang.org</a><br>
|
||||
<a href="https://github.com/mame/">https://github.com/mame/</a></p>
|
||||
|
||||
<h2>Judges' comments:</h2>
|
||||
|
||||
<h3>To build:</h3>
|
||||
|
||||
<pre><code>make endoh3
|
||||
</code></pre>
|
||||
|
||||
<h3>To run:</h3>
|
||||
|
||||
<pre><code>./endoh3
|
||||
</code></pre>
|
||||
|
||||
<h3>Try:</h3>
|
||||
|
||||
<p>Trying this out will depend on how your system can play sounds. The author’s
|
||||
remarks include some options for different operating systems.</p>
|
||||
|
||||
<p>The simplest way is to create a .wav file and have your system play that.</p>
|
||||
|
||||
<pre><code>echo 'CDEFGABc' | ./endoh3 | ruby wavify.rb > cde.wav
|
||||
</code></pre>
|
||||
|
||||
<p>There are also some other musical samples, twinkle.abc and menuet.abc.</p>
|
||||
|
||||
<h3>Selected Judges Remarks:</h3>
|
||||
|
||||
<p>This program can tweet out a tune and is small enough to tweet.</p>
|
||||
|
||||
<h2>Author’s comments:</h2>
|
||||
|
||||
<h3>Remarks</h3>
|
||||
|
||||
<p>This is a sound synthesizer for a subset of <a href="http://en.wikipedia.org/wiki/ABC_notation">ABC music notation</a>.</p>
|
||||
|
||||
<p>Try:</p>
|
||||
|
||||
<pre><code>gcc -o prog prog.c
|
||||
echo "CDEFGABc" | ./prog > /dev/dsp
|
||||
</code></pre>
|
||||
|
||||
<p>If <code>/dev/dsp</code> is not available on your system, use an OSS sound wrapper such
|
||||
as <code>padsp</code> or <code>aoss</code>:</p>
|
||||
|
||||
<pre><code>echo "CDEFGABc" | ./prog | padsp tee /dev/dsp > /dev/null
|
||||
</code></pre>
|
||||
|
||||
<p>If you are using Mac OS X, try <a href="http://sox.sourceforge.net/">sox</a>:</p>
|
||||
|
||||
<pre><code>echo "CDEFGABc" | ./prog | sox -q -traw -r8000 -b8 -e unsigned-integer - -tcoreaudio
|
||||
</code></pre>
|
||||
|
||||
<p>If they do not work, use the attached script to convert the output
|
||||
into a wave file format:</p>
|
||||
|
||||
<pre><code>echo "CDEFGABc" | ./prog | ruby wavify.rb > cde.wav
|
||||
</code></pre>
|
||||
|
||||
<p>and play <code>cde.wav</code>.</p>
|
||||
|
||||
<p>You can enjoy some music scores that I attached:</p>
|
||||
|
||||
<pre><code>cat twinkle.abc | ./prog > /dev/dsp
|
||||
cat menuet.abc | ./prog > /dev/dsp
|
||||
</code></pre>
|
||||
|
||||
<h3>Obfuscation</h3>
|
||||
|
||||
<p>The following sequence of questions may be helpful to understand the program.</p>
|
||||
|
||||
<ul>
|
||||
<li>How does it convert ABC notes into the frequency?</li>
|
||||
<li>What is <code>89/84.</code>? I found it by using Stern-Brocot tree.</li>
|
||||
<li>How does it generate a wave? Hint: it generates a saw wave.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3>Limitation</h3>
|
||||
|
||||
<p>The following features are supported:</p>
|
||||
|
||||
<ul>
|
||||
<li>Notes:
|
||||
|
||||
<ul>
|
||||
<li><code>C</code> <code>D</code> <code>E</code> <code>F</code> <code>G</code> <code>A</code> <code>B</code> (in low octave)</li>
|
||||
<li><code>c</code> <code>d</code> <code>e</code> <code>f</code> <code>g</code> <code>a</code> <code>b</code> (in high octave)</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Rests: <code>z</code></li>
|
||||
<li>Note lengths:
|
||||
|
||||
<ul>
|
||||
<li><code>A</code> (an eighth note)</li>
|
||||
<li><code>A2</code> (a quarter note)</li>
|
||||
<li><code>A3</code> (a dotted quarter note)</li>
|
||||
<li><code>A4</code> (a half note)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p>The following features are <em>not</em> supported:</p>
|
||||
|
||||
<ul>
|
||||
<li>Sharp and flat: <code>^C</code> <code>_C</code>
|
||||
|
||||
<ul>
|
||||
<li>But it is possible to emit the half tones. Do you see how?</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Shorter note lengths than 1: <code>C1/2</code>
|
||||
|
||||
<ul>
|
||||
<li>But you can use <code>C0.5</code> instead.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Higher and lower notes: <code>c'</code> <code>C,</code></li>
|
||||
<li>Any meta fields: <code>T:title</code> <code>L:1/4</code></li>
|
||||
<li>Bar line, repeat, ties and slurs, and everything else.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3>Known Bugs</h3>
|
||||
|
||||
<p>You can <em>not</em> write a note length immediately followed by a note <code>E</code>,
|
||||
such as <code>C2E2</code>.
|
||||
Can you know why?
|
||||
You can work it around by inserting a whitespace: <code>C2 E2</code>.</p>
|
||||
|
||||
<h3>Portability</h3>
|
||||
|
||||
<p>I tested it on:</p>
|
||||
|
||||
<ul>
|
||||
<li>Ubuntu 13.10 with gcc 4.7.3, clang 3.2, and tcc 0.9.25.</li>
|
||||
<li>Mac OS X 10.6 with gcc 4.2.1 and clang 1.7.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3>Legal</h3>
|
||||
|
||||
<p>I believe that all the scores that I attached are out-of-copyright.</p>
|
||||
|
||||
<p>I did write a score of the Happy Birthday song too.
|
||||
(It does not matter because the song is out-of-copyright in my country.)
|
||||
But I do not attach it to protect you from W****r.</p>
|
||||
|
||||
<p>For the same reason, do not play a score that contains only <code>z1092</code>.
|
||||
You know, it is <a href="http://en.wikipedia.org/wiki/4%E2%80%B233%E2%80%B3">“the famous song”</a>.</p>
|
||||
|
||||
<h3>Spoiler (rot13)</h3>
|
||||
|
||||
<p>Urer vf n zntvpny rkcerffvba juvpu V sbhaq ol oehgr-sbepr:</p>
|
||||
|
||||
<pre><code>(p % 32 + 5) * 9 / 5 % 13 + a / 32 * 12 - 22
|
||||
</code></pre>
|
||||
|
||||
<p>Vagrerfgvatyl, vg pbairegf na NFPVV ahzore bs NOP abgrf
|
||||
gb gur pbeerfcbaqvat gbar ahzore.</p>
|
||||
|
||||
<pre><code>'P' (NFPVV 67) => 3
|
||||
'Q' (NFPVV 68) => 5
|
||||
'R' (NFPVV 69) => 7
|
||||
'S' (NFPVV 70) => 9
|
||||
'T' (NFPVV 71) => 10
|
||||
'N' (NFPVV 65) => 12
|
||||
'O' (NFPVV 66) => 14
|
||||
'p' (NFPVV 99) => 15
|
||||
'q' (NFPVV 100) => 17
|
||||
'r' (NFPVV 101) => 19
|
||||
's' (NFPVV 102) => 20
|
||||
't' (NFPVV 103) => 22
|
||||
'n' (NFPVV 97) => 24
|
||||
'o' (NFPVV 98) => 26
|
||||
</code></pre>
|
||||
|
||||
<p>Ol gur jnl, lbh pna jevgr n unys-gbar ol gur sbyybjvat punenpgref.</p>
|
||||
|
||||
<pre><code>'X' => 4 (= P#)
|
||||
'Y' => 6 (= Q#)
|
||||
'H' => 8 (= S#)
|
||||
'I' => 11 (= T#)
|
||||
'C' => 13 (= N#)
|
||||
</code></pre>
|
||||
|
||||
<p>Abgr gung gur gbar ahzoref fvzcyl rahzrengr gur frzv-gbar fgrcf.
|
||||
Fb jr pna pnyphyngr gur serdhrapl rnfvyl: <code>cbj(2, a / 12.0)</code>.
|
||||
Gura, ubj pna jr pnyphyngr <code>cbj</code> jvgubhg <code>zngu.u</code>?
|
||||
<code>cbj(2, 1.0 / 12.0)</code> vf nccebkvzngrq ol <code>89/84.</code>.
|
||||
(V sbhaq guvf nccebkvzngvba ol hfvat <a href="uggc://ra.jvxvcrqvn.bet/jvxv/Fgrea%R2%80%93Oebpbg_gerr">Fgrea-Oebpbg gerr</a>.)
|
||||
Jr pna tnva gur serdhrapl ol zhygvcylvat gur inyhr <code>a</code> gvzrf.</p>
|
||||
|
||||
<p>Svanyyl, gur sbyybjvat pbqr trarengrf n fnj jnir:</p>
|
||||
|
||||
<pre><code>sbe(p = 0; p < yra; p++) chgpune(n = a * Q);
|
||||
</code></pre>
|
||||
|
||||
<p>jurer <code>Q</code> vf n serdhrapl naq <code>n</code> vf n inevnoyr jubfr glcr vf pune.
|
||||
Ol nffvtavat sybng gb pune inevnoyr, gur vzcyvpvg glcr pbairegvba vf cresbezrq sebz sybng gb pune (zbqhyb 256).
|
||||
(Fgevpgyl fcrnxvat, guvf orunivbe vf haqrsvarq nppbeqvat gb 6.3.1.4 va P99;
|
||||
lbh pna ercynpr vg jvgu <code>(ybat)(a*Q)</code> vs lbh ner crqnagvp.)</p>
|
||||
|
||||
<p>Nyy gung jnf yrsg jnf gb pbzovar naq pbaqrafr gur pbzcbaragf.
|
||||
Gur xrl vf fdhnfuvat gurz vagb whfg bar sbe-ybbc.</p>
|
||||
|
||||
<hr />
|
||||
|
||||
<!--
|
||||
(c) Copyright 1984-2015, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
|
||||
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
|
||||
|
||||
[judges]: http://www.ioccc.org/judges.html
|
||||
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
|
||||
-->
|
||||
|
||||
<TABLE><TR>
|
||||
<TD><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a></TD>
|
||||
<TD><P>© Copyright 1984-2015,
|
||||
<A HREF="/judges.html">Leo Broukhis, Simon Cooper, Landon Curt Noll</A>
|
||||
- All rights reserved<BR>
|
||||
This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</P></TD>
|
||||
<TD> <!--<a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Transitional" height="31" width="88"></a>--></TD>
|
||||
</TR></TABLE>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,180 @@
|
||||
# Most tweetable 1-liner
|
||||
|
||||
Yusuke Endoh
|
||||
<mame@ruby-lang.org>
|
||||
<https://github.com/mame/>
|
||||
|
||||
|
||||
## Judges' comments:
|
||||
### To build:
|
||||
|
||||
make endoh3
|
||||
|
||||
### To run:
|
||||
|
||||
./endoh3
|
||||
|
||||
### Try:
|
||||
|
||||
Trying this out will depend on how your system can play sounds. The author's
|
||||
remarks include some options for different operating systems.
|
||||
|
||||
The simplest way is to create a .wav file and have your system play that.
|
||||
|
||||
echo 'CDEFGABc' | ./endoh3 | ruby wavify.rb > cde.wav
|
||||
|
||||
There are also some other musical samples, twinkle.abc and menuet.abc.
|
||||
|
||||
### Selected Judges Remarks:
|
||||
|
||||
This program can tweet out a tune and is small enough to tweet.
|
||||
|
||||
|
||||
## Author's comments:
|
||||
### Remarks
|
||||
|
||||
This is a sound synthesizer for a subset of [ABC music notation](http://en.wikipedia.org/wiki/ABC_notation).
|
||||
|
||||
Try:
|
||||
|
||||
gcc -o prog prog.c
|
||||
echo "CDEFGABc" | ./prog > /dev/dsp
|
||||
|
||||
If `/dev/dsp` is not available on your system, use an OSS sound wrapper such
|
||||
as `padsp` or `aoss`:
|
||||
|
||||
echo "CDEFGABc" | ./prog | padsp tee /dev/dsp > /dev/null
|
||||
|
||||
If you are using Mac OS X, try [sox](http://sox.sourceforge.net/):
|
||||
|
||||
echo "CDEFGABc" | ./prog | sox -q -traw -r8000 -b8 -e unsigned-integer - -tcoreaudio
|
||||
|
||||
If they do not work, use the attached script to convert the output
|
||||
into a wave file format:
|
||||
|
||||
echo "CDEFGABc" | ./prog | ruby wavify.rb > cde.wav
|
||||
|
||||
and play `cde.wav`.
|
||||
|
||||
You can enjoy some music scores that I attached:
|
||||
|
||||
cat twinkle.abc | ./prog > /dev/dsp
|
||||
cat menuet.abc | ./prog > /dev/dsp
|
||||
|
||||
### Obfuscation
|
||||
|
||||
The following sequence of questions may be helpful to understand the program.
|
||||
|
||||
- How does it convert ABC notes into the frequency?
|
||||
- What is `89/84.`? I found it by using Stern-Brocot tree.
|
||||
- How does it generate a wave? Hint: it generates a saw wave.
|
||||
|
||||
### Limitation
|
||||
|
||||
The following features are supported:
|
||||
|
||||
- Notes:
|
||||
- `C` `D` `E` `F` `G` `A` `B` (in low octave)
|
||||
- `c` `d` `e` `f` `g` `a` `b` (in high octave)
|
||||
- Rests: `z`
|
||||
- Note lengths:
|
||||
- `A` (an eighth note)
|
||||
- `A2` (a quarter note)
|
||||
- `A3` (a dotted quarter note)
|
||||
- `A4` (a half note)
|
||||
|
||||
The following features are *not* supported:
|
||||
|
||||
- Sharp and flat: `^C` `_C`
|
||||
- But it is possible to emit the half tones. Do you see how?
|
||||
- Shorter note lengths than 1: `C1/2`
|
||||
- But you can use `C0.5` instead.
|
||||
- Higher and lower notes: `c'` `C,`
|
||||
- Any meta fields: `T:title` `L:1/4`
|
||||
- Bar line, repeat, ties and slurs, and everything else.
|
||||
|
||||
### Known Bugs
|
||||
|
||||
You can *not* write a note length immediately followed by a note `E`,
|
||||
such as `C2E2`.
|
||||
Can you know why?
|
||||
You can work it around by inserting a whitespace: `C2 E2`.
|
||||
|
||||
### Portability
|
||||
|
||||
I tested it on:
|
||||
|
||||
* Ubuntu 13.10 with gcc 4.7.3, clang 3.2, and tcc 0.9.25.
|
||||
* Mac OS X 10.6 with gcc 4.2.1 and clang 1.7.
|
||||
|
||||
### Legal
|
||||
|
||||
I believe that all the scores that I attached are out-of-copyright.
|
||||
|
||||
I did write a score of the Happy Birthday song too.
|
||||
(It does not matter because the song is out-of-copyright in my country.)
|
||||
But I do not attach it to protect you from W\*\*\*\*r.
|
||||
|
||||
For the same reason, do not play a score that contains only `z1092`.
|
||||
You know, it is ["the famous song"](http://en.wikipedia.org/wiki/4%E2%80%B233%E2%80%B3).
|
||||
|
||||
|
||||
### Spoiler (rot13)
|
||||
|
||||
Urer vf n zntvpny rkcerffvba juvpu V sbhaq ol oehgr-sbepr:
|
||||
|
||||
(p % 32 + 5) * 9 / 5 % 13 + a / 32 * 12 - 22
|
||||
|
||||
Vagrerfgvatyl, vg pbairegf na NFPVV ahzore bs NOP abgrf
|
||||
gb gur pbeerfcbaqvat gbar ahzore.
|
||||
|
||||
'P' (NFPVV 67) => 3
|
||||
'Q' (NFPVV 68) => 5
|
||||
'R' (NFPVV 69) => 7
|
||||
'S' (NFPVV 70) => 9
|
||||
'T' (NFPVV 71) => 10
|
||||
'N' (NFPVV 65) => 12
|
||||
'O' (NFPVV 66) => 14
|
||||
'p' (NFPVV 99) => 15
|
||||
'q' (NFPVV 100) => 17
|
||||
'r' (NFPVV 101) => 19
|
||||
's' (NFPVV 102) => 20
|
||||
't' (NFPVV 103) => 22
|
||||
'n' (NFPVV 97) => 24
|
||||
'o' (NFPVV 98) => 26
|
||||
|
||||
Ol gur jnl, lbh pna jevgr n unys-gbar ol gur sbyybjvat punenpgref.
|
||||
|
||||
'X' => 4 (= P#)
|
||||
'Y' => 6 (= Q#)
|
||||
'H' => 8 (= S#)
|
||||
'I' => 11 (= T#)
|
||||
'C' => 13 (= N#)
|
||||
|
||||
Abgr gung gur gbar ahzoref fvzcyl rahzrengr gur frzv-gbar fgrcf.
|
||||
Fb jr pna pnyphyngr gur serdhrapl rnfvyl: `cbj(2, a / 12.0)`.
|
||||
Gura, ubj pna jr pnyphyngr `cbj` jvgubhg `zngu.u`?
|
||||
`cbj(2, 1.0 / 12.0)` vf nccebkvzngrq ol `89/84.`.
|
||||
(V sbhaq guvf nccebkvzngvba ol hfvat [Fgrea-Oebpbg gerr](uggc://ra.jvxvcrqvn.bet/jvxv/Fgrea%R2%80%93Oebpbg_gerr).)
|
||||
Jr pna tnva gur serdhrapl ol zhygvcylvat gur inyhr `a` gvzrf.
|
||||
|
||||
Svanyyl, gur sbyybjvat pbqr trarengrf n fnj jnir:
|
||||
|
||||
sbe(p = 0; p < yra; p++) chgpune(n = a * Q);
|
||||
|
||||
jurer `Q` vf n serdhrapl naq `n` vf n inevnoyr jubfr glcr vf pune.
|
||||
Ol nffvtavat sybng gb pune inevnoyr, gur vzcyvpvg glcr pbairegvba vf cresbezrq sebz sybng gb pune (zbqhyb 256).
|
||||
(Fgevpgyl fcrnxvat, guvf orunivbe vf haqrsvarq nppbeqvat gb 6.3.1.4 va P99;
|
||||
lbh pna ercynpr vg jvgu `(ybat)(a*Q)` vs lbh ner crqnagvp.)
|
||||
|
||||
Nyy gung jnf yrsg jnf gb pbzovar naq pbaqrafr gur pbzcbaragf.
|
||||
Gur xrl vf fdhnfuvat gurz vagb whfg bar sbe-ybbc.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
<!--
|
||||
(c) Copyright 1984-2015, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
|
||||
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
|
||||
|
||||
[judges]: http://www.ioccc.org/judges.html
|
||||
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
|
||||
-->
|
||||
@@ -0,0 +1,29 @@
|
||||
d2GABc d2GzGz
|
||||
e2cdeu g2GzGz
|
||||
c2dcBA B2cBAG
|
||||
U2GABG B2A4
|
||||
|
||||
d2GABc d2GzGz
|
||||
e2cdeu g2GzGz
|
||||
c2dcBA B2cBAG
|
||||
A2BAGU G6
|
||||
|
||||
b2gabg a2deud
|
||||
g2 eugd k2BkA2
|
||||
ABkdeu g2u2 e2
|
||||
u2A2k2 d6
|
||||
|
||||
d2GUG2 e2GUG2
|
||||
d2ccB2 AGUGA2
|
||||
DEUGAB c2B2A2
|
||||
BdG2U2 G6
|
||||
|
||||
b2gabg a2deud
|
||||
g2 eugd k2BkA2
|
||||
ABkdeu g2u2 e2
|
||||
u2A2k2 d6
|
||||
|
||||
d2GUG2 e2GUG2
|
||||
d2ccB2 AGUGA2
|
||||
DEUGAB ccBBA2
|
||||
BdG2U2 G6
|
||||
@@ -0,0 +1,2 @@
|
||||
CzDzEzFzGzAzBzcz
|
||||
CKDLEFUGVAPBckdlefugvapb
|
||||
@@ -0,0 +1,6 @@
|
||||
CzCzGzGzAzAzG3z
|
||||
FzFzEzEzDzDzC3z
|
||||
GzGzFzFzEzEzD3z
|
||||
GzGzFzFzEzEzD3z
|
||||
CzCzGzGzAzAzG3z
|
||||
FzFzEzEzDzDzC3z
|
||||
@@ -0,0 +1,3 @@
|
||||
$<.binmode
|
||||
s=$<.read+"\0"*8000
|
||||
$><<["RIFF",s.size+36,"WAVEfmt ",16,1,1,8000,8000,1,8,"data",s.size,s].pack("A4VA8VvvVVvvA4VA*")
|
||||
@@ -0,0 +1,4 @@
|
||||
czczdzezczezdzGzczczdzezc4BzGz
|
||||
czczdzezfzezdzczBzGzAzBzc3zcz3
|
||||
A3BAzGzAzBzc4G3AGzFzEzFzG4
|
||||
A3BAzGzAzBzczAzGzczBzdzc3zc
|
||||
Reference in new issue
Block a user