Taewoo Park

Arts

Sound Code Cube

One piece of music held in three forms at once — a score that types itself, sound in time, and a pressure field propagating inside a cube — with the listener's hands connecting all three.

An instrument for reading sound through space

Eight musical voices composed by Codex are mapped into three areas — code, sound and space. A TidalCycles score types itself across the bottom of the screen. A new voice enters every two cycles while waves from the cube's eight corners reflect and overlap inside it. Tapping a corner, or shaking and throwing the cube, puts the listener into the performance.

The three areas are not three views of one thing, and separating them was the first decision I made. Code is the symbolic score: the rules that produce the sound, appearing as each layer enters. Sound is those events unfolding in time, with eight repeating voices. Space is a relative pressure field that propagates, reflects and interferes. Code specifies what is to come; sound is its unfolding; space reveals how it spreads and overlaps.

Playback: the pressure field inside the cube, the score typing below
Playback: the pressure field inside the cube, the score typing below

A question that began with light

I started from a rendering paper. mitransient incorporates light's time of flight into rendering, so that propagation through a scene can be simulated over time and, in effect, seen.

That prompted the question the whole project runs on: if light travelling through space can be made visible, would mapping sound into three dimensions give it another kind of meaning? I extend the idea to sound. I do not port mitransient, and I reuse none of its light transport equations.

From a wavefront to a room with corners

Applying the question to sound led me to Huygens' principle: each point on a wavefront acts as a secondary source contributing to the next. From there the geometry had to be chosen, and I say in the repository that the choice is artistic rather than a physical necessity.

A cube has eight corners and I had eight voices, so each voice got a corner and the six faces became reflecting boundaries. The arithmetic is the whole reason for the shape — any other solid would have forced me to double up voices or invent a ninth. The interior becomes a space in which several sounds coexist, and the listener is looking at the coexistence rather than at any one voice.

Code, sound and space, with gestures feeding back into performance and composition
Code, sound and space, with gestures feeding back into performance and composition

What is actually being solved

Propagation. Finite differences on a thirty-three-cubed grid carry each disturbance to its neighbours, with the time step following the three-dimensional CFL stability condition. Reflection. Neumann conditions on all six faces set the pressure gradient normal to each boundary to zero.

Interference. All eight sources contribute to one pressure field, so waves pass through one another, reinforcing or cancelling — they do not bounce off each other as particles would. Input. Analysed waveforms and note onsets from each voice drive the disturbance at that voice's assigned corner.

I am explicit about what this is not. Space and propagation speed use visual units I chose to make motion perceptible; it is not an acoustic analysis tool calibrated to room dimensions, physical sound speed or decibels.

Turning a pressure grid into something you can see through

The pressure grid becomes a 3D texture, and the GPU integrates through the volume along the viewing direction to render a translucent heatmap. With the mean pressure subtracted, the sign and magnitude of the relative pressure set the colour while magnitude alone controls density and opacity.

Front-to-back alpha compositing is what gives the interior depth instead of a flat wash. Turbo, Plasma, Viridis, Icefire and Spectral are available, and the palette can be restricted to a chosen range, with the setting saved in the browser.

Two pieces overlapping during a genre transition
Two pieces overlapping during a genre transition
A paused cube with a chosen colour range
A paused cube with a chosen colour range
The field at a 390-pixel viewport
The field at a 390-pixel viewport

Eight voices, entering two cycles apart

One cycle holds four beats, a phrase spans two cycles, and a phrase has thirty-two sixteenth-note positions. The eight voices enter in a fixed order — kick, bass, snare, hats, percussion, chords, melody, texture — and once all eight are present they repeat together.

Completion, in this work, means arriving at that repeating state and being able to stay in it. It is not an ending. The next gesture opens another arrangement.

The entry schedule for the eight voices
The entry schedule for the eight voices

What Codex is and is not given

Codex generates all eight layers as one structured JSON score under the selected genre's constraints, and the server validates notes, timing and instruments before rendering Tidal code. The audio engine schedules the entries two cycles apart without waiting on a model response for every beat. While a piece plays, the current score becomes the context for preparing the next genre's.

What the model receives is symbolic: notes, rhythm, tonality, instruments. It does not listen to the audio and it does not analyse microphone input. The typing at the bottom of the screen reveals a generated score in performance time; it is not a stream of the model's reasoning. I never let a failed generation be silently swapped for a local score.

Eight genres cycle through a shuffled queue stored in the browser, and both the Refresh button and a page reload exclude whichever genre played immediately before.

Where the listener enters the piece

Dragging rotates the space. Clicking or tapping a corner during playback adds a note from that voice, and three rapid taps produce three sequential hits. A zigzag shake followed by a quick throw crossfades into the next genre over six to twelve seconds, while ordinary rotation and slow shaking deliberately do not trigger one.

Stop is absolute and says so: it cancels composition requests, preparation of the next piece, scheduled notes, queued taps and mixing, and a late response cannot restart playback on its own. Corner taps and throws while stopped start nothing. A tool that keeps making sound after you told it to stop is not an instrument.

The company the work puts itself in

I name the context rather than implying it. Lucier made a room's resonances audible through repeated playback and re-recording; the cube likewise makes space the thing through which sound is read. UPIC turned drawn lines into waveforms and control information, making visual form and gesture inputs to performance. Ikeda's datamatics made invisible data perceptible, which is the context for translating computed pressure into colour and transparency.

TOPLAP and TidalCycles are the live-coding culture that shows code alongside sound, which is what the score at the bottom of the screen is for. Lewis's Voyager combined independent machine behaviour with response to human performers; here a model proposes a score while a person chooses when to add hits and when to change direction.

An instrument that runs on your own login

I distribute this as a source release you clone and run on your own computer, against your own Codex CLI and your own ChatGPT sign-in. The app detects the local CLI, checks its login status and asks that CLI to compose. It sends no OAuth tokens to the browser, copies none into configuration files, and offers no field anywhere for an API key. Requests run under the signed-in account and count against that account's usage.

That is the sovereignty argument arriving in the one place where people usually surrender without noticing — creative software, where the model is almost always somebody else's hosted service and the work you make with it is made on their machine. Here the composition, the physics, the rendering and the credentials all stay on the desk.