DEV Community

Yehan Wasura
Yehan Wasura

Posted on • Originally published at Medium on

I Turned an EXE Into Music (and it actually tells you something)


Executable Animator: sonify “machine-code-ish” byte patterns into a WAV, generate a visual fingerprint PNG, and watch it pulse in real time

I was staring at a binary file the way you stare at a wall of rain.

If you are into this kind of things, like reverse engineering and whatnot, you know the vibe:

Hex dump looks like… hex dump, disassembler is loud, and your brain is even louder. And you are thinking: “There has to be a more sensory way to feel the structure.

So I did what any reasonable person does when bored and curious. I made a tool that turns any binary (EXE / DLL / SO / OBJ / firmware dump / random blob) into:

  • a WAV you can literally listen to
  • a PNG “dashboard” that looks like a “fingerprint”
  • a live visualizer (oscilloscope / spectrum bars / radial pulse) while it plays

This project is Executable Animator (https://github.com/RezSat/executable-animator)

What this is (and what it isn’t)

This doesn’t “ understand assembly ”. It doesn’t emulate code or even decompile.

It does something simpler and surprisingly useful:

Treat the binary as a stream of bytes, slide a window over it, extract rolling “texture” features and map them into sound and visuals.

If you have ever looked at entropy graphs of packed malware vs normal code… yeah. Same energy.

But now you can hear it.

The core idea: “Byte Texture” in small windows

The worker (main.py) reads the file as raw bytes and summarizes it chunk by chunk.

Then it extracts a few features per window:

  • Shannon Entropy ( 0-8 bits for byte distribution): High entropy often correlates with compressed/encrypted/packed regions. Low entropy often correlates with padding/repeated/patterns/structured data
  • Mean Byte Value (0–255)
  • Standard Deviation (how “spread out” the bytes are)
  • Nibble Histogram (distribution of half-bytes 0–15, this is weirdly good at revealing “instruction/padding vibes”)

That’s it. No ML. No magic. Just “what does this region feel like statistically?”

Turning those features into sound (aka: I made bytes sing)

Each window becomes a short synthesized note. Then notes are concatenated into a full track.

Here’s the mapping (straight from the code logic):

  • Pitch  — mean byte value (then quantized to a pleasant scale)
  • Amplitude —  entropy (more complex region makes it louder)
  • Brightness  — standard deviation (more spread gives brighter tone)

To avoid a random mix of MIDI data, pitches are quantized into a major pentatonic-ish scale (I mean, our ears deserve rights).

And the synth itself is an FM-ish tone: brightness increases the modulation index, so high-variance regions literally get more harmonics.

# pitch from mean (0..255)
midi = midi_low + (midi_high - midi_low) * (mean / 255.0)
midi_q = quantize_to_scale(midi, scale)

# amp from entropy (0..8)
amp = 0.08 + 0.35 * (clip(entropy, 0..8) / 8.0)

# brightness from std
bright = clip(std / 90.0, 0..1)
Enter fullscreen mode Exit fullscreen mode

(You can tweak window size, stride, note duration, MIDI range… and completely change the “instrument.”)

The PNG “fingerprint” dashboard

Alongside the audio, this will also generate a PNG with multiple panels:

  1. Byte Image (grayscale hexdump as image)
  2. Entropy over time (and pitch overlay)
  3. Byte histogram
  4. Nibble distribution heatmap over time

PNG dashboard output for sample binary file
PNG dashboard output for sample binary file

This lets you visually correlate what you’re hearing.

Why did the song suddenly get loud and bright here? Look at the entropy spike and nibble chaos. That section is probably not boring padding anymore.

If you’re writing malware analysis notes or reversing firmware, this is a fun “first glance” artifact to attach.

The GUI: because CLI is cool, but watching and clicking is fun

Code is in the gui.py.

GUI of the Executable Animator program with visual preset set to Oscilloscope
GUI of the program with visual preset set to Oscilloscope

This wraps the worker and gives you:

  • File picker + Generate
  • Play/ Stop/ Loop
  • Visualizer presents: Oscilloscope, Spectrum Bars, Radial Pulse
  • Zoom + pan PNG preview (with smooth scaling)

Under the hood, the GUI literally runs the worker as a subprocess with arguments (so you can test configs without editing the code like a caveperson).

How to try it

Clone the repo: https://github.com/RezSat/executable-animator.git

(Recommended) Run the GUI: python gui.py

Pick a binary. Generate. Hit Play. Boom.

Or run the worker directly (CLI)

python main.py /path/to/file.exe -o out
#writes out.wave and out.png
Enter fullscreen mode Exit fullscreen mode

For big files, increase window/stride so you don’t accidentally compose a 47 minute symphony from a DLL.

More parameters are discussed in the README, visit the GitHub Repo and find them.

Fun experiments (try these if you want your brain to do the “Oh??” thing)

  • Compare a normal executable vs a packed one (entropy often screams)
  • Feed a PNG or ZIP and notice how the “texture” changes
  • Feed firmware dumps — you sometimes get very distinct rhythmic regions (padding, lookup tables, code blocks)
  • Try different strides and note durations, you’ll feel the “resolution vs speed” tradeoff immediately

Safety note: this reads bytes; it doesn’t execute the file. Still, don’t go downloading mystery malware just to make a sick beat. Be normal.

Why I built this (really?)

Because binaries aren’t just numbers. They have structure.

And sometimes structure is easier to spot when you’re not staring at it, when you’re hearing it, or watching it pulse (or so I think).

Also, building little tools like this is how I stay sharp. This is the kind of thing I end up making when I’m bored.

If you try it, tell me what weird things you found. Contributions are welcome — if you add or improve anything, feel free to open a PR.

https://github.com/RezSat/executable-animator


Top comments (0)