Satie · InstallWorldsby Attractor Labs

Satie on the web

Load a sound scene beside your visuals, bind it to your objects, and keep the listener with the camera.

Browser runtime

Read as Markdown

1. Add the runtime

Ask your agent to use satie_setup for threejs, or web for a page without Three.js. The integration supplies scene.satie, samples.json and scene.contract.json. Keep them under public/satie in a typical Vite project.

Terminal · web project root

npm install https://www.satie.world/runtime/0.4.15/satie-runtime.tgz

2. Load and bind

In your existing Three.js app, load the scene before enabling its Start sound button. Give sound-relevant objects stable names matching the exported contract.

TypeScript · scene, camera and startButton belong to your app

import { SatieScene } from "satie-runtime/three";

const contract = await fetch("/satie/scene.contract.json")
  .then(response => response.json());
const audio = await SatieScene.load(
  "/satie/scene.satie", "/satie/samples.json", { contract }
);
audio.bindAll(scene);
audio.bindListener(camera);
startButton.disabled = false;
startButton.addEventListener("click", () => { void audio.start(); });

3. Follow the world

Add the audio update to your existing render loop, after moving objects and updating their world transforms. Forward gameplay events and controls through the ready audio instance.

Inside the existing frame loop

scene.updateMatrixWorld(true);
audio.update(camera);
renderer.render(scene, camera);
  • Use audio.bind(id, object) for explicit bindings, and audio.unbind(id) when an object is removed.
  • Use audio.event, audio.hostEvent, audio.signal and audio.state for the names in your contract. Call audio.dispose() when the scene is unloaded.
  • Audio must start in a click or another user gesture. Do not wait for a network request inside that gesture before starting it.

Mix and ship

The maintained development mixer lets you adjust the scene in the project. Run the integration’s scripts/satie-vendor.mjs before release to download and pin the recording bytes, and keep its lockfile. Playback then uses your project’s files; do not put Satie credentials into the shipped app.

Runtime reference · Three.js integration guide

Other browser engines

A plain page can import SatieEngine from the hosted ESM runtime. Babylon.js, PlayCanvas and A-Frame can drive that engine by updating listener and host poses themselves. They do not have the same maintained object-binding adapter as Three.js. Ask the agent for satie_setup with engine set to web.

JavaScript module · browser only

import { SatieEngine } from "https://www.satie.world/runtime/satie-runtime.js";
const engine = new SatieEngine();

Support and validation

Browser integration and playable Three.js field studies; automated Chromium checks.

Audio starts from a user gesture. Babylon.js, PlayCanvas and A-Frame use manual listener/host updates through the web engine; they have no maintained object-binding adapter.

Not yet validated: Browser and device performance must be checked on the shipping target.