Congratulations to: * 2024/anders - Prize in sound coding - layered music generator * 2024/burton - Prize in pentagrammatology - wordle hard mode solver * 2024/cable1 - Prize in bot talk - LLM inference engine * 2024/cable2 - Prize in murky waters - salmon recipe * 2024/carlini - Prize in perfect timing - Intel 4004 emulation * 2024/codemeow - Prize in tray planting - bonsai generator * 2024/endoh1 - Prize in patient pointillism - slow ray tracer in CPP * 2024/endoh2 - Prize in solid body physics - rotating rigid body simulation * 2024/ferguson1 - Prize in diabolical logistics - Oregon trail pact with the devil * 2024/ferguson2 - Prize in yil-tas - Navajo code talker translator * 2024/howe - Nice accent eh-ward - mini vi * 2024/kramer - Prize in linguistic arithmetic - natural language numerical calculator * 2024/kurdyukov1 - Prize in phased periodicity - phase of the Moon * 2024/kurdyukov2 - Prize in art restoration - JPEG artifact removal * 2024/kurdyukov3 - Prize in virtual quietus - gaming VM and doom * 2024/kurdyukov4 - Prize in embiggening - encode without literals * 2024/maffiodo - Prize in creative interpretation - Jav\*script interpreter * 2024/mills - Prize in ℤ₃ - Infocom v3 story interpreter * 2024/stedolan - Best one liner - icon from MD5 * 2024/straadt - Prize in imitative rebooting - OpenRISC CPU and Linux * 2024/tmarrec - Prize in cyclonic coding - 3D tornado simulation * 2024/tompng - Prize in quasi bijection - vortex encryptor decryptor * 2024/weaver - Sur prize - rickroll Ran `make update` to perform the above. new file: 2024/burton/.entry.json
To build:
make all
To use:
./prog
Try:
./prog
and then play the resulting prog.wav using a sound player.
Judges' remarks:
When you run the program, after several moments, a prog.wav sound file is produced.
Using a sound player (you may find sox(1) is a good choice), you may enjoy the result.
Can you figure out how it produces the various layers of instruments?
Author's remarks:
Obfuscations
- "Helpful" formatting
- Character salad
- Loop exit trying to hide by a switch statement
- Strong string encryption. By that I mean "fmt"=>"gnu".
- A
/*{*/that throws off bracket matching in vim. Begun the editor wars have! (Wait, I'm on the vim-team!) cmandapstands for "allpass" and "comb", respectively.- One effect was created with deliberate "memory corruption".
To encourage tinkering I've obfuscated the song data and program (see Y()) less than the "library code". Sorry if you wanted to tinker with the library code!
Sound quality
The sample rate of prog.wav is 256kHz because creating aliasing-free waveforms
would require more code, but you can always oversample the audio and pass the
anti-aliasing problem on to the audio player :-) However, the downsampler in my
mplayer(1) is poor, but you can use the high-quality resampler in sox(1) to create a
48kHz version:
sox prog.wav -r 48000 prog.48kHz.wav
Tricks (the condescending part)
- Kick drum from sines, pitched up to create toms.
- Roland TR-808 style hi-hats (a bunch of high-pass filtered square waves).
- SID/C64-style snare drum (oscillates between noise and square wave).
- There's some FM synthesis in the bass.
- Schroeder reverberator a la Freeverb. The same building blocks are used for the echo effect.
- Waveshaping/overdrive using tanh(x), ohh yeaaah..
I used this Python snippet to generate q0[2] and q0[3]:
def X(s): print(hex(int(s.replace("x","1").replace(".","0")[::-1],2))) # not for iopcc-use
X(".x.x..xx.x.xx.xxx.xx.xxx..xx.xxx")
X("x.xx.x.x.x.xxxxxx.xx.xxx.xxxxxxx")