An implementation of the WireWorld cellular automata with an added layer of midi Music.
I create this program over a decade ago (2014) and this repo is a revival of the project which I will continue visiting from time to time, and keep it in a state that compiles and is compatible with modern systems.
This project is an example of using my OpenGL GUI library Ogl UI for more complex interfaces, like this one.
If you want to know more about this automaton checkout the Wikipedia article: Wikpedia.
Draw the wires (light gray) over the canvas. Place a Head (light red) on top of the wire, it will propagate across the wire. If you want to give it a set direction, place a Tail (dark red) on the opposite direction.
Tip: Just mess around drawing and see how it plays out. You can always clear the canvas and start again. :)
Switch to the Music tab (both in the side and on the canvas), select the note using the slider and place it on the notes canvas.
Press Play button and see the automaton go. If you're a bit impatient move the "Automata speed" wheel to make it move faster (the music will also play faster).
Each time a Head goes over a note it will play it.
Tip: Press TAB key to quickly switch between "Automata" and "Music" layers.
Requirements:
- Microsoft Windows 10/11 (should work with older versions as well)
- A C++ compiler toolchain (like the MinGW-w64 toolchain)
- OpenGL
If you want to compile the project yourself clone the repo and run:
make buildto build the projects.make runrun the application.
Alternatively, you can download the pre-built binary from the repository Releases page.
The gui.h header and gui.cpp source files are the Ogl UI library.
The custom Plot control used to represent the canvas is defined in plot.h header and plot.cpp source files.
For this project I designed a custom file type that stores the state representation of the canvas. All this in wwmfile.h header and wwmfile.cpp source files.
And all this tied up in the usual main.h header and main.cpp source files.
The audio of the program is created sending short MIDI messages to the output device.
Yes and no. Although it's feature complete, as I intended it to be, my intention is to continue working on it, iterating and improving over time. Whenever I feel like it.
Some possible improvements I'm considering, but not limited to:
- Modernize the C++ version. WireWorld Music was created a while back, when C++11 was considered modern.
- Quality of life improvements. The interface could definitely get some improvements, like tab-switching, some better shortcuts...
- Performance; while the app itself is pretty lightweith for modern standards in terms of ram usage (no bloated Electron here hogging resources), the CPU utilization could be lower.
- Cleaning up the codebase. As it stands it's not the code with all the best practices. I wrote the code many years ago and many things can be improved here. The goal was to make stuff that worked.
