EDGEDIRECTOR / DOCS

D6 Audio, camera, weather

Status: agreed by the owner on 2026-11-18, all seven questions as recommended. D6a Weather is built (EDGEdirector 0.0.28, the game app 0.5.0): passed by script in VS Code, not run in the game. D6b Audio is built (EDGEdirector 0.0.33, the game app 0.7.0, 2026-11-26): passed by script in VS Code the same day (nobody listened), not run in the game. D6c Camera is not built. See What is built.

D6 is the sixth phase of the design. Audio, camera and weather tracks get real clips, show in the preview, and play in the game through the player D5 built. A mod a player installs is D7.

What D6 ends with

A scene with two actors, a line of sound, three shots and a change to rain plays in the preview and in the game, and the weather comes back after.

What D6 rests on

Fact From Consequence
The player package plays a cue sheet on timers, and EDGEdirector sends it one with Play in Game D5, built; not run in the game yet D6 adds kinds of cue to the same sheet and the same player
world.setWeather(state, { blend, priority }) holds a weather state until it is given back; the game’s own cycle leaves it alone meanwhile. A state is a name from the world’s own list (19 in the tested world) or a WeatherPresets record REDnode, passed in the game on 2026-11-18 (0.67.0) The weather clip is one cue to set and one to give back
The change came over a couple of seconds, though a blend of 10 s was asked for The same test The clip’s blend may not be the time the game takes. A note says so, and the in-game test looks at it
world.resetWeather() blends back over 10 s to the weather from before REDnode’s first hold, then lets the game’s cycle go on. A package that stops, or is ended, has its weather given back the same way by REDnode itself REDnode 0.67.2, passed in the game on 2026-11-18 “The weather comes back after” is REDnode’s own doing, also when the player is ended with no notice. The weather part needs REDnode 0.67.2 or later
audio.play(file, { delay, start, end, volume, fadeIn, category }) plays a WAV, OGG, MP3 or FLAC from the package’s folder or its data folder. stop({ fadeOut }) stops it REDnode A sound file plays flat: not placed in the world
audio.event(name, { on }) posts one of the game’s sound events, on V or on nothing. A name the game does not know plays nothing, and nothing says so. Marked experimental REDnode A game sound is a name. It cannot be checked by the game
EDGEwave’s API finds the game’s sound events (soundEvents) and plays one recording of an event in VS Code (playEvent) EDGEwave’s docs/api.md The picker for game sounds is EDGEwave’s list, when EDGEwave is installed
There is no camera call. The known way: spawn an entity with a gameCameraComponent, Activate it, move it with world.move; to end, Deactivate, remove it, and Activate V’s own camera REDnode’s World objects test, and EDGEbuilder’s Edit, which takes the camera and gives it back Cuts are possible today. Unverified: what V’s view does when the package is ended while its camera is on
SetFOV eases over about 1 s The design’s research A cut with a new field of view may drift for a second (to see in the game)
A package is ended with no notice REDnode #48 Whatever D6 holds in the game (the weather, the camera) must come back by REDnode’s own clean-up, not by the player’s

The parts

Part Builds Needs the game
D6a Weather The weather clip, its picker, a label and a tint in the preview, the cue in the game For the test
D6b Audio Sound files as clips with a waveform, heard in the preview and in the game; then game sounds by name For the test
D6c Camera Shots as clips, the preview seen through them, cuts in the game For the test, and for a spike first

Each part is a document rule, a piece of the editor, a kind of cue, and a step in the player. They are built in this order: the weather is the smallest and its call exists; the camera has the most unknowns.

Weather (D6a)

Thing Plan
The clip On a weather track: "weather": { "state": "<name>", "blend": 5 }. The clip’s length is how long the state is held
One track A scene has at most one weather track (the design). A second is refused
The picker The game’s weather states, read from the game’s files through REDbridge (the WeatherPresets records), with their plain names. No list is kept in the repo
In the preview The clip’s name on the lane; while the playhead is in it, the viewport’s line names the weather and the background takes a tint (grey for rain and fog, warm for sun). No rain or fog is drawn
In the game A cue at the clip’s start: world.setWeather(state, { blend }). Where a weather clip ends with no other after it, and at Stop: world.resetWeather(), which blends back over 10 s to the weather from before the scene
Notes “The blend is the game’s: it starts at the clip’s start”, and a note when two weather clips touch with a blend longer than the first clip

Audio (D6b)

Thing Plan
A file clip "sound": { "file": "audio/<name>.wav" } with in, volume, fadeIn, fadeOut and category (effects, dialogue or music: the game’s volume slider it follows). The file is copied into the scene’s own folder on the Desk when it is added, so the scene still plays when the first file moves
On the lane The file’s waveform, read once in the page. The clip’s length is the sound’s; dragging an edge trims it, and stops at the file’s ends
In the preview The page plays the file with the playhead, in time with the actors, through the browser’s audio. Scrubbing is silent
In the game EDGEdirector puts the scene’s files beside the request, in %LOCALAPPDATA%\EDGEdirector\play\audio\. The player copies each into its own data folder (REDnode plays only from there or the package’s folder) and plays it at its cue with audio.play. Stop fades every sound out
A game sound "sound": { "event": "<name>" }. Picked from EDGEwave’s list when EDGEwave is installed, else typed. It has no length EDGEdirector can know, so the clip’s length is the modder’s; at its end the event is stopped
A game sound in the preview Not in time: the clip has a Hear button that plays one recording through EDGEwave. During preview play it is silent, and the lane says so
In the world Flat: every sound is heard as if at V. Sound on an actor or at a place waits for REDnode (the design’s requests)
EDGEwave’s mixes Left for later (question A3): a mix has to be rendered to a file first, and EDGEwave has no call for that yet
Notes A game sound: “not heard in the preview’s play”, and “the game does not say when it does not know this name”

Camera (D6c)

Thing Plan
The clip A shot: "shot": { "at": { x, y, z }, "aim": { yaw, pitch } or { "track": "<id>", "height": 1.6 }, "fov": 50 }. Places are metres from the scene’s origin, as actors’ marks are. The clip’s length is how long the shot is held
Making a shot Shot from View takes the preview’s own camera as it stands: move the view, press the button. The inspector has the numbers
In the preview Through the Camera in the viewport: while it is on, the view is the shot under the playhead, and cuts with it. Off, each shot is drawn as a small camera shape, and the view is free
A gap With no shot under the playhead, the game shows V’s own view, and the preview says so
In the game One camera entity for the scene, spawned with the cast. At a shot’s start it is moved and turned (world.move), its field of view set, and it is switched on; where a shot ends with none after it, V’s camera comes back. Stop and the scene’s end give V’s camera back
Looking at an actor The aim is worked out at the shot’s start, from the actor’s mark. Actors play in place (root motion is not applied), so it holds
Moves Not in D6: a shot is still. A move between two shots needs a tick on the game’s thread (the design’s route 2)
The spike first Before D6c is built, a short in-game spike with the player: does the camera cut cleanly, what does the field of view do at a cut, what does V see and do during a shot (V can still walk), and what is V’s view when the package is ended with its camera on. If the last leaves V without a view, a REDnode request for the camera to be the host’s to give back

The cue sheet and the player

Thing Plan
The sheet Stays cues: 1, with new lists beside cast and timeline: weather, sounds, shots. A player that does not know a list leaves it out
The player EDGEdir Player 0.2.0 with the weather, 0.3.0 with sounds, 0.4.0 with shots. EDGEdirector asks to replace an older player in the game, as D5 built it
A scene with no actors Plays in the game when it has any weather, sound or shot. D5 refused it
The stand-in tools/player-standin.mjs prints the new calls, so each part’s hand test in VS Code needs no game
In the game inspector The In the game section says the notes above for a selected weather, audio or camera clip

What is built

D6a Weather, EDGEdirector 0.0.28 with the game app 0.5.0 (2026-11-18). Not run in VS Code or in the game; its hand test (Tests, “D6a Weather”) has not run, and the owner’s is Test H.

Part Where What it does
The clip src/weather.ts (weatherOf, setWeather, MaxBlend) "weather": { "state", "blend" } on a clip of the weather track. The state is a WeatherPresets record’s path (the list offers these) or a state’s own name; the blend is 0 to 60 s, 5 when not said
One track addTrack in src/doc.ts A second weather track is refused
The cues weatherCues in src/weather.ts; sheet.weather and playable in src/cues.ts A state at each clip’s start, and the weather given back where a clip ends with no other starting there (W1). Notes of kind weather on each clip: the blend is the game’s, the weather goes back at the end, a blend longer than its clip, a clip with no weather. A scene with weather and no actors has something to play
The list The WeatherHost in src/editor.ts, built in src/extension.ts The game’s presets, read once through REDbridge (tweakdb.records, type WeatherPreset: 15 in game 2.5) when a scene with a weather track opens. Nothing is kept in the repo. Without the game’s files the inspector takes a typed name
The inspector and the lane webview/editor.ts Weather (a list, plain names such as Heavy clouds) and Blend (s) for a weather clip; the lane shows the weather’s name on the clip
The preview webview/preview.ts, media/editor.css The viewport’s line starts with “Weather:” and the name while the playhead is in a weather clip, and the view is tinted: grey for rain, fog and cloud, warm for sun, sand for dust and toxic rain. edgedirectorPreview.state().weather has the name
The player director/play.mjs (weatherAt, in begin and clear) The state of the starting moment is set at once, the later cues on timers with the actors’ cues; Stop, a failure and a new play give a held weather back. A weather the game refuses is said in the play’s notes and the play goes on. A scene with nobody needs no V
In the Director director/floor.ts The strip shows the weather’s name on its clips, lit as played

How it differs from the plan:

Plan Built
“Stays cues: 1, with new lists; a player that does not know a list leaves it out” As planned for weather. A player before 0.5.0 refuses a scene with weather and no actors as having nobody to play
The game app 0.2.0 with the weather The Director’s numbers moved on with DR1 to DR3: the weather is in 0.5.0, which also asks for REDnode 0.67.2
A note when two weather clips touch with a blend longer than the first clip The note is on any clip whose blend is longer than the clip itself

Unverified until the game: everything in the game, as for all of the Director. That a WeatherPresets record’s path is taken as REDnode’s docs say; what the game does when a second state is set while the first is still blending.

D6b Audio, EDGEdirector 0.0.33 with the game app 0.7.0 (2026-11-26). Not run in VS Code or in the game; its hand test (Tests, “D6b Audio”) has not run, and the owner’s is Test I. The page’s side was looked at in a plain browser with tools/page-harness.mjs and a made-up tone (the file read and measured, its waveform drawn, the inspector, play from a moment), and the player’s side against the stand-in.

Part Where What it does
The clip src/sound.ts (soundOf, addSoundClip, addEventClip, setSound) "sound": { "file": "audio/<name>.wav", "seconds": 3.2, "in", "volume", "fadeIn", "fadeOut", "category" } or "sound": { "event": "<name>" } on a clip of an audio track. seconds is the whole file’s length, copied in so the lane knows the file’s ends. Volume is 0 to 2; the category is sfx, dialogue or music (REDnode’s names for the game’s three sliders). What is as recorded is left out of the text
Trim and split fitSound in src/sound.ts, called by trimClip and splitClip in src/doc.ts A start edge dragged in moves the point the clip starts in the file; both edges stop at the file’s ends. A split cuts the file too, and each part keeps the fade at its own outer end. A game sound’s clip is as long as it is dragged
The scene’s files src/soundFiles.ts (keepSound, soundPath) A file added is copied into audio beside the scene’s file: on the Desk that is inside the scene’s own item folder, which Rename and Delete take whole (A1). The same file added again is used as it is; another file of the same name gets a number. A name that climbs out of the scene’s folder is not played
Adding The SoundHost in src/editor.ts, built in src/extension.ts; page messages sound and measured Add Sound File and Add Game Sound in the toolbar and the track’s inspector, and a double-click on an audio lane. The host copies the file and asks the page how long it is (measure); the page reads sound, the host does not. A game sound is picked from EDGEwave’s soundEvents as the modder types, with the list’s length for one that does not loop; without EDGEwave it is typed. Hear plays one recording through EDGEwave’s playEvent
The lane webview/sound.ts, webview/editor.ts A file’s clip shows the part of the file it plays as a waveform, read once in the page (window.edgedirectorSound.state() says what is read, for scripted rounds). A game sound’s clip is hatched and says it is silent here
The preview webview/sound.ts (play, stop) Play sounds every file’s clip with the playhead, through the browser’s audio, from the right point of the file, with the volume and the fades. Dragging the playhead is silent; a key that moves it, a loop and an edit during play start the sounds again from there
The cues soundCues in src/sound.ts; sheet.sounds and playable in src/cues.ts Each clip with a sound, on a track that is not muted, from t to end. Notes of kind sound: a file is heard flat and follows a slider, and falls behind after a game menu; a game sound is not heard in the preview’s play and the game does not say when it does not know the name; a clip with no sound. A scene with sounds and nobody has something to play
Where the files go soundsFor in src/play.ts; request.sounds; fetchSound in director/sounds.ts The request names each file by where it is on this PC. The Director copies it into its own data folder (pkg.dataDir\sounds), named for where it came from, and again only when the file changed
The player director/play.mjs (sound, hush, in begin, pause and clear) A file plays through audio.play at its cue, from its start point, to its end point, with its volume, fade in and category; its fade out is a stop({ fadeOut }) before the clip’s end. A game sound is audio.event at the clip’s start and stop() at its end. A play from a moment starts a sound part way in. Pause, Stop and a new moment stop the sounds; Resume and the new moment start them again. A file that is gone or a sound that fails is said in the play’s notes, and the play goes on
In the Director director/floor.ts, director/page/main.ts The strip shows an audio lane’s clips with the file’s or the sound’s name, lit as played; a file that is not in the scene’s folder is said in the notes
The stand-in director/standin.ts Prints sound with the file and its settings, sound-stop, game-sound and game-sound-stop; it copies a file into standin-data in the play folder

How D6b differs from the plan:

Plan Built
The category is effects, dialogue or music The same three, written sfx, dialogue, music as REDnode names them
EDGEdirector puts the scene’s files beside the request, in %LOCALAPPDATA%\EDGEdirector\play\audio\ No second copy: the request names each file where it is, in the scene’s folder, and the Director copies it from there into its data folder. The Director can then play a scene’s sounds with VS Code closed, from the Desk
A game sound “has no length EDGEdirector can know” EDGEwave’s list gives a length for a sound that does not loop: the clip gets it when the sound is picked there. It is still the modder’s to change
The game app 0.3.0 with sounds 0.7.0: the Director’s numbers moved on with DR1 to DR3
The lane says a game sound is not heard in the preview’s play The clip is hatched and its second line reads “game sound, silent here”; the inspector says it too

Not built in D6b: the start point as a number in the inspector (drag the start edge), a sound file dropped onto a lane, tidying files no clip uses any more out of the audio folder (Undo may want them back), and copying a scene’s sounds with it to a project or the Library (D7).

The round by script of 2026-11-26 showed that the page reads a WAV and an OGG from the scene’s audio folder inside VS Code, and EDGEwave’s picker. Still unverified: MP3 and FLAC there, that Hear plays a recording, and that sound comes out of the speakers in the preview (nobody listened). Unverified until the game: everything in the game; that a file’s fade out and its end land as asked; what audio.event does for a name that needs a place or a switch the game sets first.

Tests

Test Kind Covers
Unit Automated The document rules, the cues, the player’s new steps against the stand-in world
D6a, D6b, D6c in VS Code Hand, by script, with the stand-in The pickers, the lanes, the preview, the calls the player would make
D6 in the game In the game, on the owner’s PC Rain comes and goes back; a sound starts in time with a clip; three shots cut and V’s view returns. Run with D5’s in-game test if that has not run by then
Spot tests The owner One each for weather, sound and camera

Requests

To Need State
REDnode #46 The weather’s calls Done: passed in the game on 2026-11-18, with giving back in 0.67.2. Nothing more is needed for D6a
REDnode The camera given back by the host when a package is ended, if the spike shows V is left without a view To file after the spike, if needed
EDGEwave A mix rendered to a file through its API For a later phase (A3). A sound’s length came with soundEvents already
REDnode Sound on an entity or at a place Already in the design’s list, after D6

Left out of D6

Left out Goes to
Camera moves, and a camera that follows a moving actor With REDnode’s scene player (route 2)
Sound placed in the world After REDnode’s call for it
EDGEwave’s mixes as clips After question A3
Rain and fog drawn in the preview Not planned
Lip sync for a spoken line EDGEfab’s lip sync work, later
V as an actor REDnode #47

Questions and the owner’s answers

All agreed as recommended on 2026-11-18.

# Question Agreed
W1 The weather is given back when its clip ends with no other after it, and at Stop. Or should it stay as the scene left it until Stop? Given back at the clip’s end: the lane then shows what the game does
A1 A sound file is copied into the scene’s own folder when added, so a scene carries its sounds? Yes
A2 Game sounds by name are in D6, though the preview cannot play them in time (a Hear button only)? Yes: they are the game’s own sounds, and cost little
A3 EDGEwave’s mixes as clips: leave for a later phase, with a request to EDGEwave for a render call? Yes, later
C1 A shot is made by moving the preview’s view and pressing Shot from View, with the numbers in the inspector? Yes
C2 While a shot is on in the game, V can still walk and look (the view is the camera’s). Leave V free in D6? Yes, for D6; freezing V is a later choice
C3 The order: weather, then audio, then the camera with its spike first? Yes