A computational medium for form, time, and their many possible manifestations

A number is not a sound. A sequence is not a melody. A field is not an image, and a collection of coordinates is not necessarily geometry.

These identities are not in the data. They arrive when something gives the data a reading, and they become unavoidable when it has to reach a speaker or a screen.

MayaFlux is free, open-source software for working with the material first. You build sounds, images, simulations, instruments and performances from the same numbers, and you decide at the last moment what each one becomes.

Download MayaFlux  ·  Start with the tutorials

A hand, a medium, five voices

Smoke and the Water

A hand disturbs a body of smoke and water. The medium swirls, thins and begins to come apart, and five voices gather around it, changing with its movement and adding new matter as it changes.

More about this piece

A pen tablet gives the piece its touch. Strokes push and curl the volume and leave trails that return later as a reversed gesture. The volume passes through four states of matter: shell, knot, combustion and liquid.

The five voices are recordings, looped and read in changing directions, pitches and stereo positions. Their sound feeds back into the volume, so image and sound share one living material and neither illustrates the other. It needs a pen tablet, and you supply your own recordings.

Files for this piece

A first program you can run

Four Voices, One Form

Four voices emerge from different kinds of randomness and orbit through a shared space. Each owns a body of a different shape in a form carved on the GPU, and a swarm of particles streams toward the voices along its surface.

More about this piece

The voices shape the form and the swarm, the form's changing size affects the voices, and the whole system develops its own irregular rhythms. Nothing needs to be recorded, downloaded or connected. It asks you to choose one image, which becomes the form's skin. Click to strike every voice, and hold and drag to play them.

The complete program is in the Getting Started guide, ready to copy into a new project.

The program in Getting Started

Matter without categories

Fugal Culture

A colony of filamented organisms changes shape as six voices move through a web of resonant strands.

More about this piece

Twenty-four organisms of six kinds, from spined spores to soft bells with trailing tendrils, are each drawn from one continuous tangle of fine lines. The sound is a web of thirty-two resonant strands. Six voices enter twelve seconds apart and play one melodic contour as an answer, a reversal, an inversion or a doubled figure, while the pace slowly quickens.

Each organism gives a strand its colour and decay. Each strand that sounds pushes its organism to change. The two stay distinct and keep influencing one another.

Files for this piece

Things that happen in time

A Hostile Topsoil

A rhythmic machine of pure tones, clicks and noise disturbs a cellular landscape. Life spreads, territories migrate and the ground accumulates the consequences, long after the sounds have passed.

More about this piece

The machine's score is itself written by cellular automata. Four parts play a forty second phrase whose pattern unfolds one automaton generation at a time, then runs backwards near the end. Under it, five click-driven voices ring as a drone on their own clock, and the drone is recorded and replayed by thirty-six taps at inharmonic ratios, a slow cloud of partials made of tape.

The picture is a grid of over eight million cells divided into drifting territories, each running one of twelve Life-like rules. Each hit of the score lands in the grid after its own wandering delay. Press Space and the picture rises into terrain shaped by the drone.

Files for this piece

An instrument is something you make

Tingling Time

A pen on a tablet strikes bells and drones, and every strike pulls a moment from the last seconds back into the picture. Here a camera looks half at the tablet and half at the screen, so the piece watches itself being played.

More about this piece

Eight voices share the piece: four sustained drones and four coupled bells. The pen strikes the bells and lifts the drones, a faster or harder hand lifts them more, and every fourth touch lets another voice in. The voices travel between the two ears, each on a journey of its own length.

A live camera is recorded into a ring of its most recent frames. Each bell owns a layer of the picture. A strike cuts that layer back, from about half a second for a light touch to five seconds for a hard one, and shows that moment in a region shaped by noise and by the live brightness. The region grows with the strike and recedes as it fades, and the speed of the pen changes how fast the past plays.

Four keys change how the piece answers the pen. At one end the hand strikes the bells alone. At the other, three slow signals strike bells by simple rules, a written drone that is never struck joins in, and every touch sets off a burst of strikes at falling pitch. It needs a pen tablet and a camera.

Files for this piece

Live coding

Live on a Steam Deck

A twenty minute live-coded set at TOPLAP Bengaluru, performed on a Steam Deck with an earlier version of MayaFlux.

More about this performance

The set was four pieces, written and changed while they played. MayaFlux 0.3 was developed in parallel with the performance, so the framework and the set grew together. It was written live with Lila.

Independent by design

MayaFlux is a substrate for complete software. Every part of it stands on its own. No window is the main window, and you open as many as you need. No clock is the master clock, and events are coroutines that run when something calls for them. Sound, graphics, simulation and input each run on their own schedule, and you decide how they relate.

Because nothing outranks anything else, the same project can be any of these:

  • A game, or the editor you make it in.
  • A digital audio workstation, or a non-linear video editor.
  • A single focused artwork, or an installation.
  • An instrument that keeps growing and evolving, or a data analysis engine running on the GPU.

Begin somewhere

You do not need to understand how it works before you make something.

Install

Weave installs MayaFlux with everything it needs and creates a ready-to-build project. Open the project in any editor, build it, and run it. It works on Linux, Windows and Apple Silicon Macs.

Play

Foundations has seven short exercises that begin with something you already have: a sound, a picture, a recording, a film, a camera or a model. Run one, change a single number, then listen or look at what changed.

If you are coming from another tool, there are guides for your background and for Max, Pure Data and openFrameworks.

Plain C++, live or compiled

MayaFlux is modern C++20 and C++23, with all the fluency and machinery the language now provides. It does not hold on to old habits, and it makes no identity out of embracing or avoiding any particular library. The premise is that C++ can be written live, or used through high-level operations, without a domain-specific language in between.

  • No C++ tax. Weave installs MayaFlux with every dependency, configures the compiler and build presets, and creates a project that builds with one command. You get a curated environment, and you can expand it: community modules are C++ source libraries that compile straight into your project, and the project's CMakeLists.txt is yours to edit.
  • Live. Lila, MayaFlux's live-coding environment, evaluates C++ inside the running program from VS Code or Neovim. The sound does not stop and the window does not close.
  • High level. One call can build a visible structure or set a simulation going. The same project can also work at the lowest level, whenever you choose.
  • No locks on the real-time paths. Audio, graphics and input coordinate without mutexes, so one never waits on another.
  • Real-time sound and GPU graphics. Audio runs on each platform's native backend. Pictures and heavy computation run on the GPU through Vulkan, including particles, fluids, cellular worlds and live image analysis.
  • The world outside. Cameras, video, 3D models, volumes, tables of data, MIDI, pen tablets and microphones come in and go out through the same system.

The code, the architecture guide and the reference documentation are on GitHub.

Open to investigation

MayaFlux is free software under the GNU General Public License v3.0. Read it, question it, take part, fork it and grow it elsewhere, or change it, in the spirit of free software and open knowledge. Version 0.5 is made to be used, so if something breaks or is unclear, say so.

Ranjith Hegde, an independent musician, researcher and software developer, wrote the first code in February 2025, after a decade of practice with dancers, writers, photographers and musicians, live coding, and production audio for Metro: Awakening. It has grown since then. It has been presented at TheISRO many times, at livecodeblr, as a poster at ADC, and as a talk (with slides) and a poster at C++Online, and it has been taught in many community workshops. The commit history is public.