WriteUp: 16 Bytes of x86 that turn Matrix rain into sound

TL;DR

A demo at the 2026 Outline Demoparty revealed a 16-byte x86 assembly code that converts matrix rain visuals into sound. It uses video memory and speaker port toggling to produce fractal-based audio patterns, demonstrating extreme code density and algorithmic creativity.

At the 2026 Outline Demoparty, a 16-byte x86 assembly routine was showcased that converts visual matrix rain patterns into sound by directly manipulating video memory and the PC speaker port, highlighting a technical achievement in code density and algorithmic design.

The code, developed within the constraints of extreme brevity, initializes video mode 0, setting the VGA text buffer as a calculation canvas. It then performs a loop that updates memory cells using a prefix sum algorithm based on binomial coefficients, creating a fractal pattern reminiscent of the Sierpinski triangle. The routine uses XOR operations to isolate specific bits, mapping the pattern to rule 60 cellular automata, and toggles the PC speaker port’s bit 1 to generate audio signals corresponding to the fractal’s structure. This process results in audible square waves whose frequency and rhythm reflect the visual fractal pattern.

The code’s core manipulates 16 bytes per iteration, but the actual routine steps back 56 bytes, altering both the visual layout and sound frequency. The combined visual and auditory output demonstrates a novel intersection of minimal code, mathematical patterns, and real-time audio synthesis, all achieved within a 16-byte limit.

Why It Matters

This development exemplifies the potential of extreme code compression and algorithmic artistry in the demoscene, pushing the boundaries of what can be achieved with minimal instructions. It also offers insights into how visual fractals can be directly translated into sound, opening avenues for creative coding, digital art, and educational demonstrations of mathematical patterns in computing.

For the broader tech community, it underscores the ongoing relevance of low-level programming and hardware manipulation techniques, even as higher-level abstractions dominate modern development. The project showcases how constrained environments can inspire innovative solutions and artistic expression.

[Upgraded] USB Computer /Laptop Speaker with Stereo Sound & Enhanced Bass, Portable Mini Sound Bar for Windows PCs, Desktop Computer and Laptops

[Upgraded] USB Computer /Laptop Speaker with Stereo Sound & Enhanced Bass, Portable Mini Sound Bar for Windows PCs, Desktop Computer and Laptops

🔊High Quality Sound — Built-in Dual 3W High-Excursion Drivers and Passive Radiator that allow for louder sound, greater…

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background

The demonstration builds on longstanding demoscene traditions of pushing hardware and code limits to produce impressive audiovisual effects within tiny code footprints. The 2026 event marked a notable milestone with this 16-byte routine, which leverages the properties of cellular automata, fractal geometry, and direct hardware control. Previous works have explored similar themes, but this particular routine emphasizes the synthesis of visual and audio patterns through minimal assembly code, reflecting a broader trend of technical experimentation in digital arts communities.

“This code is a stunning example of how extreme brevity can still produce complex, meaningful output—both visually and sonically.”

— Demoscene developer

“Mapping fractal geometry to sound through such a tiny code footprint demonstrates the incredible creativity possible within constraints.”

— Assembly coder from the event

Evanlak VGA edid Emulator passthrough,(Monitor Without Having Desktop rearrange) Display Emulator use with KVM Switches/Video splittersand Extenders -1920X1080@60Hz

Evanlak VGA edid Emulator passthrough,(Monitor Without Having Desktop rearrange) Display Emulator use with KVM Switches/Video splittersand Extenders -1920X1080@60Hz

Evanlak VGA edid emulator passthrough ,(monitor without having my desktop rearrange) display emulator use with KVM Switches /Video…

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What Remains Unclear

It is not yet clear how this routine performs on different hardware configurations or whether it can be adapted for modern systems beyond the original VGA and PC speaker environment. The full technical details of the code’s implementation and potential variations remain under analysis.

The C Programming Language

The C Programming Language

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What’s Next

Further exploration is expected to determine how this technique can be expanded or integrated into larger projects. Developers may attempt to replicate or extend the routine in different hardware or software environments, and the demoscene community might develop new minimal code routines inspired by this achievement. Additionally, academic interest may grow around the mathematical and acoustic implications of such minimalistic audiovisual mappings.

The Hardware Hacker: Adventures in Making and Breaking Hardware

The Hardware Hacker: Adventures in Making and Breaking Hardware

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

How does the 16-byte code produce sound from visuals?

The code manipulates video memory to generate fractal patterns and toggles the PC speaker port based on these patterns, creating square wave sounds that reflect the visual structure.

Is this routine compatible with modern computers?

It relies on legacy hardware features like VGA text mode and the PC speaker port, which are generally unavailable on contemporary systems, limiting direct compatibility.

Can this technique be used for other visual-to-audio conversions?

In principle, yes—by modifying the memory manipulation and port control routines, similar minimalistic code could generate different patterns and sounds, though practical implementation on current hardware is challenging.

What does this achievement tell us about the demoscene?

It demonstrates how extreme code density can produce complex audiovisual effects, showcasing creativity and technical mastery within strict constraints.

Are there applications beyond artistic demonstrations?

While primarily artistic and experimental, such techniques could inform low-level hardware programming, embedded system design, and educational tools illustrating mathematical and digital concepts.

You May Also Like

Beginner Mirrorless Cameras: Lens Choices That Matter More Than the Body

Lens choices significantly impact your beginner mirrorless photography—learn which options will elevate your images and why the right lens matters more than the body.

Tripod Buyer’s Guide: Load Ratings, Head Types, and Wind Stability

Keen to select the perfect tripod? Discover essential tips on load ratings, head types, and wind stability to elevate your photography.

Action Camera Buying Guide: Stabilization, Low‑Light, and Mount Ecosystems

Find out how to choose the perfect action camera with essential tips on stabilization, low-light performance, and mount options to enhance your adventures.

Vlogging Camera Setup: Audio, Autofocus, and Lighting in Real Rooms

For optimal vlogging camera setup in real rooms, focus on audio clarity, autofocus features, and lighting techniques that will elevate your content—learn how to master each element.