You've seen 64kb demoscene productions. Hell, even 4kb is enough to generate a stunning seemingly-impossible variety of scenes. But Linus Akesson's entry in the Oldskool 4K Intro competition at Revision 2017 is generated by a program only 256 bytes long. There's an in-depth technical explanation to read, and a 2,202,009-btye MP3 version to download. [via Metafilter]
The demo is driven by its soundtrack, so in order to understand what the program needs to do, it helps to have a schematic overview of the various parts of the song.
The three voices of the SID chip are used as follows: Voice 1 is responsible for the kick drum and bass, Voice 2 plays the melody and Voice 3 plays a drone that ducks on all beats, mimicking the genre-typical side-chain compression effect.
The artistry of it struck me:
When bar $40 is reached, the program turns off the display and jumps through the system reset vector. In this way, the final few moments of the demo are actually managed by the system boot sequence: First, the SID is silenced. Then, there is a delay while the system is setting up data structures. Finally, the display goes back on, and the C64 home screen is rendered. A mind is born.