From 3def7ea96e2b0d8eee0a87fe5fa3a253f4c8ab0a Mon Sep 17 00:00:00 2001 From: MelekTaus Date: Tue, 6 Oct 2026 20:58:30 +0200 Subject: [PATCH] Describe recording a take in Songs (#342) - Songs: new section Recording, Esc and Space while recording in the key table. - Development: chromium's fake microphone in the e2e browser, 1833 checks. Co-Authored-By: Claude Opus 5.5 --- Development.md | 6 +++++- Songs.md | 33 +++++++++++++++++++++++++++++---- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/Development.md b/Development.md index 36d4694..b20adc5 100644 --- a/Development.md +++ b/Development.md @@ -18,7 +18,7 @@ php tests/php/accounts.test.php # the API's accoun # has and the web server's container has not (SKIP there) php tests/php/snapshots.test.php # the snapshot store (#231), the same way php tests/php/releases.test.php # the release store (#266), the same way -node tools/seed-e2e.mjs && node tools/e2e.mjs # 1829 editor checks, screenshots in /tmp/gm-e2e-*.png +node tools/seed-e2e.mjs && node tools/e2e.mjs # 1833 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 @@ -177,6 +177,10 @@ and loop flag) is the witness, for the reason `renderStats` is one. The seed's t **generated WAVs** (`tools/lib/audio.mjs`), not files: unlike the DejaVu typefaces there is no audio file the host and the CI image are guaranteed to share, and the bytes are a pure function of the arguments, so storage stays content-addressed and a check can name a file by its exact size. +Nothing is ever *spoken into* either: `--use-fake-device-for-media-stream` and +`--use-fake-ui-for-media-stream` give the page chromium's test tone as its microphone, without the +question whether it may, so e2e 65 can record a take (#342). Each run leaves its take of about +a second and a half in the sound store, as a WAV of its own. **The one step that must clean up after itself twice.** `35-load-scene` makes a second scene and plays *from* it, so it leaves behind both assets and a project field. Its own scene is where all of diff --git a/Songs.md b/Songs.md index 3d151fd..d74c2b5 100644 --- a/Songs.md +++ b/Songs.md @@ -60,8 +60,9 @@ round. An end of an item under the pointer lights up and the pointer turns into end can be dragged. A picked item has a white edge; a picked track a lit head and lane. Zoomed down to less than 46 px, a head shows only its name, **M** and **S**. -The header has **Play** (it turns into **Stop**), the **Grid**, **Fit** and on the right the number -of tracks and items. **Fit** shows the whole song across. +The header has **Play** (it turns into **Stop**), **Record** with the input to record from and its +level, the **Grid**, **Fit** and on the right the number of tracks and items. **Fit** shows the +whole song across. What is picked goes to the inspector: an item shows its pattern or sound, its volume and the rows of its kind, a track its name, volume, pan, mute and solo. A click on nothing in the lanes picks the @@ -92,7 +93,7 @@ Every drag is one undo step, and so is every key below that changes the song. | Key (the lanes focused) | | |---|---| -| `Space` | Play or stop. | +| `Space` | Play or stop; while recording, stop and keep the take. | | `Delete`, `Backspace` | Delete the picked items; with none picked, the picked track and what lies on it. Never the song itself. | | `Ctrl+C`, `Ctrl+V` | Copy the picked items; paste them under the pointer: the earliest on the grid line before it, the topmost on the track under it, the others as far below as there are tracks. With the pointer off the lanes (or left of bar 1) they land where playing starts, on the tracks they came from. The copy works for every song of the project. | | `Ctrl+D` | A copy of the picked items right behind them, moved by whole grid steps, picked in their place. | @@ -100,7 +101,7 @@ Every drag is one undo step, and so is every key below that changes the song. | `Ctrl+A` | Pick every item. | | `↑` / `↓` | The picked items a track up or down. | | `←` / `→` | The picked items a grid step earlier or later, with `Shift` a bar. | -| `Esc` | Pick nothing. | +| `Esc` | Pick nothing; while recording, throw the take away. | The ruler works as in the [Pattern tab](Patterns#the-ruler): a click or drag on the bars moves where playing starts, a drag on the loop strip along its top sets the loop, a right-click offers @@ -132,6 +133,30 @@ pattern at bar 3 on the third, at 120 BPM, were planned 4 s apart, the pattern's each on the bus of its track; a track turned down to -6 dB was set to 0.501 on its bus, and muting a track while the song played set its bus to 0. +## Recording + +**Record** records from a microphone or another input while the song plays (#342). The first time +the browser asks whether the page may use it; a refusal can be taken back with the lock in the +address bar. The input is picked in the dropdown next to it (*Default input* is the system's); the +names of the inputs show once recording has been allowed, and the browser keeps the choice. + +- The song plays from where playing starts, once through and on past its end: the loop is not used + while recording. Nothing of the input is played back, so use headphones, or the song ends up in + the take. +- Meanwhile the take grows red, with its waveform, on a new track **Recording** right under the + track clicked last (else under the last one); the lanes take no edits, only a middle-drag pans. + The meter next to the input shows its level, red near full scale. +- **Stop**, **Play** or `Space` keep it: it goes up as a WAV file (one channel, 16 bits, at the + rate of the sound device), becomes the sound *Song – Take 1*, 2 … and lies on its track from where + playing started. Sound, track and item are one undo step. `Esc` throws it away, nothing goes up. +- It is cut so that what was played along to the song lies where it was heard: the delay of the + output and of the input, as far as the browser tells them, are taken off. What is left over can be + moved with `Alt`-drag. The browser's echo cancelling, noise filter and automatic gain are off; + they bend music. +- A take may be as long as a sound may be (256 MB, about 46 minutes at 48 kHz); there it stops by + itself. If the upload fails, a box offers *Retry*, *Download WAV* and *Discard*. +- Opening another project throws a take away; showing another song or playing a pattern keeps it. + ## Playing one in a game **Play song** plays a song at its tempo, its tracks with the volume, pan, mute and solo they have,