Inspiration

Two file formats outlived the software that read them. There are folders of .wsz skins and .milk presets on hard drives all over the world that nothing opens any more.

Neither format was ever specified. What exists is the set of files people actually made between 1998 and 2005, with every accident of the authoring tools of that era baked in. That makes "just read the format" a genuinely hard problem, and a much more interesting one than drawing something that looks like the old software.

So Nullwave is not a tribute skin over a modern player. It is the formats, implemented.

What it does

Loads real Winamp 2.x skins. Drop a .wsz on the window. Underneath it is a ZIP of BMPs at fixed sprite coordinates, and it is a mess: mixed-case filenames within one archive, bottom-up rows, four-byte row padding, BGRA palettes, 12-byte BITMAPCOREHEADERs, and 32-bit sheets whose fourth byte is zero and is not alpha — honour it and the entire skin goes invisible. All of that is handled, and a missing sheet falls back per sheet, so a skin that only ever shipped four files out of thirteen still works.

Runs real MilkDrop presets. Drop a .milk file on the page. Its ns-eel equations are lexed, parsed and compiled to closures over a Float64Array, then run per frame and per vertex across a 48×36 warp mesh with frame feedback.

Generates its own default skin. npm run make:skin writes a genuine 12.8 kB .wsz from 582.8 kB of procedurally painted bitmaps, then reads it back through the same loader a downloaded skin goes through and asserts 13 sheets, 24 colours, zero warnings.

Composes presets from a phrase. "Slow underwater drift" becomes a preset that runs. Claude if a key is bound, Workers AI if that binding exists, and a seeded deterministic generator if neither — so it works with no key, no account and no network.

Contains no borrowed assets at all. No image and no audio file is an input. The skin is generated, the 67-glyph font is hand-cut as '#'/'.' strings, the music is synthesised, the eight presets were written here. The repository's only images are the screenshots npm run make:shots renders from the generated skin, and no audio file ships at all.

How I built it

TypeScript in strict mode, Vite, Vitest, fast-check, Cloudflare Workers. Zero runtime dependencies — the BMP codec, the ZIP reader and writer, the PNG writer, the ns-eel compiler and the synthesiser are all written in this repository. A project whose claim is that it reads the real format cannot outsource reading the real format.

The architectural decision everything else follows from: the sprite atlas is data, used in both directions — to cut sprites out of a downloaded skin, and to place them when generating the built-in one. The built-in skin is therefore not a privileged internal path. It is an ordinary .wsz that goes through Skin.fromArchive exactly as a stranger's does, so the format reader is exercised on every page load instead of only when somebody drops a file in.

Challenges

Every failure in this project is silent. Nothing crashes. The bugs are a frame that renders black, a skin that loads upside down, a control that looks right and is clickable two pixels to the left, a preset that renders as a still image. Three of those four produce a picture that looks deliberate.

Two things follow.

Layout is verified by rendering and looking. src/ui/render.ts is pure — state in, blits out, no clock and no DOM — specifically so a Node process can render the real interface to PNG with no browser. That is how every layout bug here was found, and none would have been caught by a unit test: a ghost digit from a previous frame; STEREO rendering as STEREC, because six glyphs at five pixels is thirty and the cell was twenty-nine; equaliser labels merging into 170310600; 1411 truncating to 141.

Semantics are verified by properties, not examples. Four sources of untrusted text reach the expression compiler. The key property — a compiled program returns a finite double for any register contents — is tested by poisoning the register file with NaN and infinities before every run. That immediately showed that guarding every variable write was not enough, because the register file is shared mutable state. Every read is guarded too. Written as "handle NaN properly", that would have been a passing test and a false claim.

And the one that decided whether anything moved at all: bass, mid, treb and vol are divided by a twelve-second running average, so typical music sits near 1.0, not in 0..1. Every preset ever written assumes it — it is why they are full of max(0, bass - 1), reacting to the delta from normal rather than to the volume knob. The entire bundled corpus had to be rewritten once I understood this, because presets written for a 0..1 range render as a still image, with no error anywhere.

What I learned

That a format with no specification has no invalid files — only files some readers rejected. And that when a subsystem has no visible failures, the test strategy has to be chosen before the code, not after.

What's next

Reading the .wal and modern skin variants; a playlist editor window; and an honest attempt at MilkDrop 2 HLSL, which Nullwave currently parses, reports, and deliberately does not execute.

Built With

Share this project:

Updates

Submission history