From 0598e2d27d4d5bd2c2cd8b58fc3033885a8b9a68 Mon Sep 17 00:00:00 2001 From: MelekTaus Date: Mon, 12 Oct 2026 16:16:11 +0200 Subject: [PATCH] Sounds, Videos: a video's own node in the Master routing - Sounds, Videos, Compositions and Architecture describe the video node: links, its own bus, the rule for the links of a new video, and that the tabs play straight into the Master. - Videos: the recording badge is an HTML element over the canvas. - Development: 2043 e2e checks. Co-Authored-By: Claude Opus 5.5 --- Architecture.md | 7 ++++--- Compositions.md | 3 ++- Development.md | 2 +- Sounds.md | 22 +++++++++++++--------- Videos.md | 19 +++++++++++++------ 5 files changed, 33 insertions(+), 20 deletions(-) diff --git a/Architecture.md b/Architecture.md index f6863b1..ecb7f79 100644 --- a/Architecture.md +++ b/Architecture.md @@ -168,9 +168,10 @@ src/core/music/ time (ticks, 480 to the quarter, tempo and meter, a posit the sequence a song plays, the level of a track's bus, an item cut at a tick), routing + routingNodes (#350: a song's routing graph, a node per track and the output; `addLink` is the one rule for a link both routings keep), projectRouting (#351: the - Master routing, a node per sound, instrument, pattern, song and bus and the master; a - new asset takes the links most others of its type have), songBuses (the buses a song - plays on, mute and solo as gates), mixer (the master bus and `mix:`), needs (a + Master routing, a node per sound, instrument, pattern, song, video with sound and bus + and the master; a new asset takes the links most others of its type have), songBuses + (the buses a song plays on, mute and solo as gates), mixer (the master bus and + `mix:`, `videoBusesOf` the bus of each video file), needs (a sound FX with its parameters, or none), playbacks (what a sequence loads before it plays), embedded (#355: what a song keeps to itself), ghosts (#339: the notes around a pattern item), take (#342: a recorded take as 16-bit WAV, cut to where the song started), diff --git a/Compositions.md b/Compositions.md index dd789ad..91ec822 100644 --- a/Compositions.md +++ b/Compositions.md @@ -84,7 +84,8 @@ the clips as narrower bars above them. The header bar has **+ Track**, **Play** **The picture** is a scene view whose objects are the items alive at the playhead. A click picks an item or its child, dragging moves the real object. It takes nothing from the asset panel and nothing from `Ctrl+V`: an object put there would have no item. Driven videos follow the playhead -and are heard while it plays. +and are heard while it plays, straight into the master as in every tab. In a game they go along +the links of their video in the [Master routing](Sounds#master-routing). **The hierarchy** lists the items alive at the playhead; re-parenting is off there, because items stay at the top. **The inspector** of an item shows its object's rows and a block **TIMING**: diff --git a/Development.md b/Development.md index 4aaec44..7931878 100644 --- a/Development.md +++ b/Development.md @@ -21,7 +21,7 @@ php tests/php/releases.test.php # the release stor php tests/php/files.test.php # uploaded files in a folder per account (#344), the same way php tests/php/videos.test.php # the video store, its queue and the worker (#402), with the # real ffmpeg: the CI image and game-maker-video have it -node tools/seed-e2e.mjs && node tools/e2e.mjs # 2040 editor checks, screenshots in /tmp/gm-e2e-*.png +node tools/seed-e2e.mjs && node tools/e2e.mjs # 2043 editor checks, screenshots in /tmp/gm-e2e-*.png GM_STEPS=20 node tools/e2e.mjs # or 1-12, or 6,20 — a subset while working on one step ./e2e.sh start [GM_STEPS] # the same run detached, see below ./e2e.sh status # live progress, or the last run's result diff --git a/Sounds.md b/Sounds.md index 952c7b5..5e49bcb 100644 --- a/Sounds.md +++ b/Sounds.md @@ -335,16 +335,18 @@ master goes straight out. **Menu → Master routing** opens a tab with one graph per project (#351). It works like the [routing of a song](Songs#routing), one level up: -- **A node per asset.** Every sound, instrument, pattern, song and bus of the project has one, - named after it, and there is one **Master**. The nodes come and go with the assets: a new asset +- **A node per asset.** Every sound, instrument, pattern, song, [video](Videos) with sound and + bus of the project has one, named after it, and there is one **Master**. The nodes come and go with the assets: a new asset gets its node in a column for its type, and a deleted one takes its node and its links along. They cannot be added or deleted by hand. What a song keeps to itself (an embedded sound or pattern) has no node: its song routes it. -- **A new or duplicated asset goes where the others go** (#365). A sound, instrument, pattern or - song gets the links most others of its type have, at their volume: with two sounds in *SFX* and - *Reverb* and one on the master, the next one goes into *SFX* and *Reverb*. On a tie the latest - of them decides, so if there is only one song, the next one follows it. Where nothing of its - type is linked yet, it goes as most of all that plays, and where nothing is, to the master. +- **A new or duplicated asset goes where the others go** (#365). A sound, instrument, pattern, + song or video gets the links most others of its type have, at their volume: with two sounds + in *SFX* and *Reverb* and one on the master, the next one goes into *SFX* and *Reverb*. On a + tie the latest of them decides, so if there is only one song, the next one follows it. Where + nothing of its type is linked yet, it goes as most of all that plays, and where nothing is, to + the master. Videos and the music go by each other apart: a video where no other video is + linked goes to the master, not where the sounds go, and a song does not follow the videos. A new bus is always linked to the master. - **Links are sends.** A drag from the out of a node into the in of a bus or of the master links them. A node may have several links, the same sound then goes everywhere it is linked at once: @@ -353,7 +355,8 @@ master goes straight out. - **Volume and Mode of a link** are in the inspector when it is picked: its level from -60 to +12 dB, 0 by default. A link out of a bus or a song also has a **Mode**, as on a track: after the volume (the default), after the sound FX but before the volume, or before the sound FX. A link - out of a sound, an instrument or a pattern always takes it after the volume and the sound FX. + out of a sound, an instrument, a pattern or a video always takes it after the volume and the + sound FX. - **No loops.** A link that would lead round to where it started is refused. - **A node without a link is never heard.** It says *Goes nowhere*, and the header counts how many do. A deleted bus leaves what went only into it on the master, so deleting a bus silences @@ -393,7 +396,8 @@ in its pause menu sets a bus volume itself, for instance *SFX* to 0 while *Music **In the editor** the tabs leave the Master routing out (#368). The Sound, Sound FX, Instrument, Pattern and Song tab play through the sound FX of their asset and then straight into the master, -whatever its links say. So a bus with a reverb on it is not heard in a tab, but a compressor on +whatever its links say. The Video tab, the Composition tab and the preview of the Animations tab +play a video's sound straight into the master too. So a bus with a reverb on it is not heard in a tab, but a compressor on the master is. Inside a song its own [routing](Songs#routing) still counts. The Sound FX tab plays the sound it tries out through the FX in the tab instead of the sound's own. diff --git a/Videos.md b/Videos.md index 09119ad..f301226 100644 --- a/Videos.md +++ b/Videos.md @@ -54,7 +54,9 @@ The clip gestures are the same as in the [Sound tab](Sounds), with the track in - **A click in the ruler** shows that moment, and stops a play. - **Play** (or **Space**) plays the picked clip, else the whole video, with its sound and its Loop. It starts at the playhead when that stands inside, else at the start, so Stop and Play - go on where it stopped. The playhead runs along the ruler. + go on where it stopped. The playhead runs along the ruler. The sound goes straight into the + master, past the video's links, as in every tab (see + [Sounds](Sounds#master-routing)). So a recording of the editor has it. - The wheel zooms the time, the middle button pans, **Fit** shows the whole video. A wheel step and Fit are shown as the short zoom transition of the other tabs (see [Concepts](Concepts)). - **Download** saves the MP4 the server made, under the asset's name. @@ -72,9 +74,13 @@ take pictures only. - **In the editor** a placed video plays in the scene view without sound, round and round, as a preview. The sprite's PREVIEW in the inspector plays it too, placed or not. A video nothing shows for 2 s is let go and starts over the next time it is shown. -- **Play** starts every video over at its clip's start and lets it be heard through the master - bus at the video's Volume. A pause holds it, Esc makes it a quiet preview again. A - [released game](Concepts) does the same. +- **Play** starts every video over at its clip's start and lets it be heard at the video's + Volume, along its links in the [Master routing](Sounds#master-routing). A pause holds it, Esc + makes it a quiet preview again. A [released game](Concepts) does the same. +- **A video with sound has a node in the Master routing**, like a sound: a new one goes where + most other videos go, or to the master where none is linked yet, never by where the sounds + go. A link sends it into a bus or the master. A video without sound has none. + Where two video assets use the same file, the links of the first one count for both. - **Two sprites wearing the same clip share one player** and show the same picture at the same moment. A video plays in real time; the game's time scale does not slow it down. @@ -213,8 +219,9 @@ beside the menu button. - **The mouse pointer is drawn in.** The system draws it over the page, so it is not in the canvas; the recording draws its own in the shape the editor shows (arrow, hand, resize arrows, I-beam, crosshair). -- **The red dot is not in it.** It is drawn onto the screen after the frame is taken, and the room - it needs beside the menu stays empty in the recording. +- **The red dot is not in it.** It is an HTML element over the canvas, the one thing on the page + outside it, so the copy of the canvas never holds it; the room it needs beside the menu stays + empty in the recording. Clicks go through it. - **Everything else is**, the menu that stops it included: cut the end off afterwards if it is in the way. - **It costs no second drawing.** The frame is copied from the canvas right after the editor drew