Technology

oakes/ansiwave: A mashup of ANSI art and MIDI music

 █████╗ ███╗   ██╗███████╗██╗██╗    ██╗ █████╗ ██╗   ██╗███████╗
██╔══██╗████╗  ██║██╔════╝██║██║    ██║██╔══██╗██║   ██║██╔════╝
███████║██╔██╗ ██║███████╗██║██║ █╗ ██║███████║██║   ██║█████╗  
██╔══██║██║╚██╗██║╚════██║██║██║███╗██║██╔══██║╚██╗ ██╔╝██╔══╝  
██║  ██║██║ ╚████║███████║██║╚███╔███╔╝██║  ██║ ╚████╔╝ ███████╗
╚═╝  ╚═╝╚═╝  ╚═══╝╚══════╝╚═╝ ╚══╝╚══╝ ╚═╝  ╚═╝  ╚═══╝  ╚══════╝

The haters told me ANSI art and MIDI music were dead so I combined them together.

ANSIWAVE is the glorious mashup that nobody asked for and everybody needs. To see it in action watch the screencast.

Run it in any modern terminal and start drawing with ANSI block characters like the almighty intended. Then use the built-in scripting language to generate music (or “sound” if you have no talent).

When you’re done, go to the Publish tab to get a shareable link. Click the images above to see examples. Yes, the URLs are stupidly long, because they contain the entire thing. ANSIWAVE.net is just a static website for viewing ansiwaves…it doesn’t store anything on the backend.

That means you can’t search/browse other people’s ansiwaves…so share them on /r/ANSIWAVE if you want. I’m not sure if reddit lets you share links this big though. I have a feeling we’re gonna break a lot of people’s software, so strap yourselves in kids.

How to fire this puppy up and get ‘er done

There are prebuilt binaries you can just run anywhere. If you want to build from source, install Nim and then do nimble install ansiwave (make sure ~/.nimble/bin is on your PATH).

To open a new/existing ansiwave:

ansiwave hello.ansiwave

You can also directly open an ANSIWAVE.net url:

ansiwave https://ansiwave.net/view/...

There are a couple other cool things you can do. You can synthesize the music in your ansiwave to a wav file:

ansiwave hello.ansiwave hello.wav

And if you have any old-school ANSI art encoded in CP437, you can convert it into an ansiwave:

ansiwave old.ans new.ansiwave --width=80

Oh, and if you just want to look at an ansiwave, there is already an ansiwave viewer built into every ‘nix machine on the planet:

cat hello.ansiwave

It’s just unicode, homies!

Related Articles

Back to top button