Repair a machine, and its part in the music changes.

I’m working on a cozy game called Pale Blue Dot, where the ship is the band. Its consoles have their own musical parts. Opening doors adds instruments, and moving between rooms changes the arrangement while a shared beat keeps going. The soundtrack is composed and synthesized with Submediant, my audio project.

Watch the full 4K showcase on YouTube.

The video follows the music through the cabin, engineering, and cockpit. It uses rendered game-room artwork alongside the individual instruments’ waveforms and note displays. It’s an offline presentation of the score, rather than a recording of someone playing the game.

The name Submediant goes back to the voices of my Little Robots. In that 2011 post, I was separating the notes into data files and adding attack and decay to simple waveforms. Here, the notes have another job: they need to leave room for the state of a game to change the arrangement.

Giving the machines a part

The cabin starts with a replicator and a matter recycler. They’re objects to repair, but they’re also instruments. The replicator has a soft keyboard part; the recycler has a wooden-mallet part. The doors add other voices as they open.

The cabin's opening dialogue artwork, with scattered debris, damaged floor panels, and exposed cables.
The cabin artwork used for the game's opening dialogue. This is a rendered game asset, not a gameplay capture. The ship art uses simple 3D forms and Qwen-generated material textures.

That makes repairing the room something you can hear. The machine keeps its musical role when its condition changes: the recycler is still the mallet voice, rather than being replaced by an unrelated instrument.

There are also two arrangements for each console. The A side sounds its chord notes together. The B side unfolds the same voicing as an arpeggio. Those are separate choices from whether the machine has been repaired.

In the film, listen to the recycler’s repair at 0:48, then the cabin’s B-side arrangement at 1:12. The first changes its harmonic role. The second changes how the notes are played.

Some machines are still broken

The music has to allow repaired and unrepaired machines to play together. The score used for this film puts the unrepaired console parts in A minor and the repaired parts in relative C major. They share a collection of notes, so bringing a machine online doesn’t introduce the C-sharp of A major against the C-natural of the unrepaired parts.

The shared foundation in this version is an unpitched drum groove. The room’s instruments supply the harmony.

The game keeps its part-selection rules in music.json. Here’s a shortened excerpt for the recycler, with its B-side entries omitted:

{
  "id": "recycler",
  "rooms": ["pod-cabin"],
  "parts": [
    {
      "file": "ship-band-recycler-live",
      "when": {"allOf": ["system.recycler.online"]}
    },
    {
      "file": "ship-band-recycler-broken"
    }
  ]
}

The game takes the first part whose condition is met. Once the recycler’s online flag is raised, it selects the repaired part. Otherwise it reaches the broken part at the end. The full score includes the B-side choices before those fallbacks, along with the player’s side and volume settings.

This data decides which recording is wanted. It doesn’t synthesize the instrument or keep the audio in time; those are other parts of the work.

Keeping the band together

Each part is a separate audio file, or stem. The ship score uses 32-bar loops at 80 beats per minute in 4/4. That’s 96 seconds, or 4,608,000 sample frames at 48 kHz. All the stems need to agree about where they are in that loop.

If a new part joins two minutes into the performance, it needs to join 24 seconds into its own loop. Starting it from the beginning would put the musicians in different places in the score.

The game’s conductor keeps a shared timeline and crossfades between parts. The film has its own offline timeline for the room changes and repairs. Both need that continuing musical position, even when a particular voice is silent.

A still at 1:14 showing the repaired cabin, separate instrument waveforms, and notes in the B-side arrangement.
The showcase at 1:14, just after the cabin begins changing to its B-side arrangement. The waveforms come from the stems' output after the timeline's gain changes; the note display shows held score notes. Open for a larger view.

The picture and the sound also change at different speeds. The film can show a repaired machine immediately while the outgoing musical part takes four seconds to fade away. During that transition, both parts still contribute to what you hear.

The projects meeting in the film

Pale Blue Dot supplies the rooms, machines, repair states, and game artwork. Submediant supplies the composition and synthesized audio. The film puts those together with a timeline and a view of the individual musical voices.

There’s a smaller shared project underneath that: pyiv, the dependency-injection library. Both the game’s Python content tools and the film renderer use it to assemble their services.

In the film’s configuration, the prepared options, timeline, artwork, and audio are supplied as instances. The painter and encoder are then registered for the injector to construct. These are the relevant bindings from FilmConfig, with the surrounding setup omitted:

self.register_instance(ShowcaseOptions, options)
self.register_instance(FilmTimeline, timeline)
self.register_instance(ShipRoomArtwork, ShipRoomArtwork(args.project))
self.register_instance(FilmAudio, FilmAudio(args.pack, timeline, stage, options))
self.register(ShowcasePainter, ShowcasePainter, singleton=True)
self.register(ShowcaseEncoder, ShowcaseEncoder, singleton=True)

The painter gets the room state and the audio information it needs without having to compose the score itself. The encoder turns the frames and soundtrack into a movie. In the retained render’s verification, the lossless movie’s decoded audio matched the soundtrack WAV exactly. The YouTube upload uses the compressed MP4 version.

The film uses a scripted sequence of room and repair states, so it lets me hear those combinations without playing through the game. It uses the relative-harmony version of the score; the game is still in development.

If you’d like to try it before release, message me on X or email me. I’ll add interested players to TestFlight when the game is ready for release testing.