Working exhibit · Woodhouse

Your game.
Its own soundtrack.

This is not a picture of a demo. It is the demo, running here, with the parts separated so you can see what actually owns what.

Play the run, fire its effects, switch on a real LoftwahFM station, then pull the music link out and watch exactly what stops — and what does not.

02

Effects

The sound the game owns

Effects bus

Generated in the browser with oscillators, on a bus of the game’s own. Muting it never touches the soundtrack.

Owner
The game
Source
Local oscillators
Breaks with
The browser only

The game’s effects are its own. They are generated on the spot, they answer to the game’s mute, and they would keep working with the music service completely unreachable.

01

The run

A small game that routes signals

0 pointsstreak 0●●●

The run is a real game with a real score. It owns its scene, its rules and its effects. It never asks the music service for permission to exist.

03

Music

Streamed from LoftwahFM

No track yet

idle

Music bus

Preparing the station…

Owner
LoftwahFM
Transport
One media element
Breaks with
The network only

A real public LoftwahFM station, played through the supported client. Pull the link and the soundtrack stops while the run carries on.

Woodhouse working exhibit

The patch bench

A game, the sounds it owns, and a soundtrack streamed from somewhere else. Open the bench, then take it apart.

Pull to take it apart

Three layers, one working system

The run, its effects and the soundtrack are three separate owners. The bench shows what happens when you pull them apart: the game keeps its score, the effects keep their own sound, and the music stops and starts without either of them noticing.

Read the story behind it Get the integration recipe

Follow the mechanism

Seven moves, and the run keeps its own clock.

Each step is a real state of this bench, not an illustration of one. The run, its effects and the soundtrack are three owners; the point of the walkthrough is where each one stops.

These controls move the explanation only. The bench above is the working exhibit. Reviewed against source 27f2699.

Step 1 of 7

The run
Waiting for your first deliberate move
The music
Off. No audio context has been created.
  1. You arrive

    The bench is dark. The run has not started, and nothing is playing.

    A run that advances while nobody is playing has already ended before you have read the copy. The bench says it is waiting instead.

    The run: Waiting for your first deliberate moveThe music: Off. No audio context has been created.

    Source src/scripts/exhibits/patch-bench.ts — the waiting flag

  2. You make a move

    The run starts scoring and its sound effects fire from oscillators on the page.

    The game owns the world and the effects. Both come from one audio manager the game already had, so the effects cost nothing extra to hide or lose.

    The run: Playing, and keeping its own scoreThe music: Off. The music bus exists but carries nothing.

    Source src/scripts/exhibits/patch-bench.ts — the separate music bus

  3. You connect a station

    The page asks LoftwahFM's versioned client for a public station. The message changes to “Preparing the station…” and then “Starting the stream…”.

    Music arrives over a network from a different origin, so it is prepared by the owner that publishes it. The page never starts a second audio engine to do it.

    The run: Playing, unaffectedThe music: Preparing, then streaming from the station's origin

    Source src/scripts/exhibits/patch-bench.ts — the preparation message

  4. The stream starts

    The soundtrack plays under the run. Clipping a gate lowers the music for a moment.

    Ducking moves one gain on the music bus. It does not pause, restart or resume the stream, which is why a bass hit never restarts the song.

    The run: PlayingThe music: Playing, temporarily ducked by the run

    Source src/scripts/exhibits/patch-bench.ts — the start message

  5. You pull the music out

    “The link is open. The soundtrack is stopped; the run continues.” The score keeps moving and the effects keep firing.

    The link is one connection. Removing it stops the bus the page owns and leaves the game's bus alone, so nothing else has to compensate.

    The run: Playing, with its own effectsThe music: Stopped, with the link open

    Source src/scripts/exhibits/patch-bench.ts — the disconnect message

  6. You reconnect it

    “Music link restored. The link did not pause or reset the run; press Play to start the soundtrack.” The music is not playing yet.

    The page kept its transport; reconnecting restores the connection, not the playback. Disconnecting never paused or reset the run, so it is in whatever state its own play left it. Play is a separate, deliberate action.

    The run: Its own state: waiting, playing or over; the link did not change itThe music: Link restored; ready for a deliberate Play

    Source src/scripts/exhibits/patch-bench.ts — the reconnect message

  7. A station fails to prepare

    “That station could not be prepared. The run keeps working.” Choosing another station retries; nothing else on the bench stops.

    A failed stream is a failure of one optional owner. The exhibit reports it where the music control lives and leaves the game and its effects running.

    The run: PlayingThe music: Unavailable, and reported as unavailable

    Source src/scripts/exhibits/patch-bench.ts — the failure message

Why the parts are separate

A game that wants a soundtrack has three jobs to do, and they belong to three different owners. The game runs the world and decides when something happens. The effects belong to the game and are generated by it. The music belongs to a music service, arrives over a network, and can fail on its own schedule.

The temptation is to wire them into one audio system and let one thing carry the lot. It works right up until the music service is slow, the manifest is wrong, or the stream fails to open. Then the whole thing goes quiet together and nobody can tell which part broke.

On the bench, the three owners are kept apart on purpose. The effects run on a bus the game owns. The music runs on a bus the page owns, carrying a stream from LoftwahFM's versioned browser client. When the run clips a gate, it ducks the music by moving one gain — it never pauses it, never restarts it, and never resumes music the visitor paused.

What to take from it

If you are building a browser game, this is the shape worth copying:

  • One audio owner. Extend the audio manager your game already has. Effects, dialogue and local music stay where they are.
  • Music is optional. If the client, the station manifest or the media fail, the game reports it quietly and keeps running.
  • Off means off. Start muted, load the visitor's saved preference before you unlock audio, and treat an explicit Play as the only thing that starts sound.
  • Duck with gain. Lowering a bus is not the same as pausing a stream. The distinction is why a bass hit never restarts the music.
  • Release it. Suspend on a hidden tab, stay quiet on return, and tear the client down with the audio owner that created it.

LoftwahFM publishes the client, the public stations and a short recipe for this. The recipe is the part you will actually want.

Get the integration recipe Try the plain standalone version