Describe the embedded take of a song (#355)

A recorded take now lives inside its song instead of the Assets
panel. Songs explains what that means for playing, editing and
deleting.

- Songs: new section Embedded assets, the item menu with Open,
  Make project asset and Embed a copy, and the take named Take 1.
- Development: 1885 checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adminandClaude Opus 5.5 committed 2026-10-08 10:36:34 +02:00
1 parent 663d1547fa
commit b2528a40a3
2 files changed
+29 -4

No files matched your search

+1 -1
@@ -19,7 +19,7 @@ php tests/php/accounts.test.php # the API's accoun
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
php tests/php/files.test.php # uploaded files in a folder per account (#344), the same way
node tools/seed-e2e.mjs && node tools/e2e.mjs # 1884 editor checks, screenshots in /tmp/gm-e2e-*.png
node tools/seed-e2e.mjs && node tools/e2e.mjs # 1885 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
+28 -3
@@ -88,7 +88,7 @@ right-click menu, not from the inspector.
| Click on nothing in the lanes | Picks the song itself. |
| Click a head | Picks its track. |
| `Shift`-click an item | Adds it to the pick or takes it out. Dragged on with `Shift`, it is added and moved or sized off the grid instead. |
| Right-click an item | Opens its menu: *Delete* deletes it, or every picked item where it is one of them. |
| Right-click an item | Opens its menu: *Open* opens what it plays (as a double-click does), *Make project asset* or *Embed a copy* (see [Embedded assets](#embedded-assets)), and *Delete* deletes it, or every picked item where it is one of them. |
| Double-click a pattern item | Opens the pattern in the Pattern tab, with what the song plays around the round clicked into as [ghost notes](Patterns#ghost-notes-from-the-song). |
| Double-click a sound item | Opens the sound in the Sound tab (#352). |
| Click **M** or **S** in a head | Mutes or solos the track. |
@@ -199,8 +199,10 @@ names of the inputs show once recording has been allowed, and the browser keeps
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.
rate of the sound device), becomes the sound *Take 1*, 2 … that the song keeps to itself (see
[Embedded assets](#embedded-assets), numbered per song) and lies on its track from where playing
started. Sound, track and item are one undo step. `Esc` throws it away, nothing goes up. Should the
song be deleted while the take goes up, the take becomes a project sound instead.
- 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;
@@ -209,6 +211,29 @@ names of the inputs show once recording has been allowed, and the browser keeps
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.
## Embedded assets
A sound, a pattern or a sound FX can belong to one song instead of the project (#355). A take is
one. It is edited like any other: a double-click on its item opens it in its tab, where *Reverse*,
the cut and the fades work as always, and the tab's title has the song's name in front of its own.
But it has no row in the Assets panel, no picker offers it (not the inspector, not a node), and
its name only has to be free within the song.
- **One user.** An embedded asset is used by exactly one place of its song: an item, a track or the
song itself. A split, `Ctrl+D` and a paste give every new item a copy of its own, so setting one
half of a split take to *Reverse* leaves the other half as it was. The audio file is not copied:
files are stored by their content.
- **It goes with its user.** Deleting the item, its track or the song deletes the embedded asset
in the same undo step. A copied item keeps it in the clipboard, so a paste after the delete brings
it back. *Duplicate* on the song copies everything it keeps to itself.
- A click on its name in the inspector lights up its song in the Assets panel.
- In the Sound tab of an embedded sound the rows *Loop* and *Bus* are left out: in a song an item
repeats its sound as long as it is, and the track decides where it goes.
- **Make project asset** (the item's menu) turns an embedded asset into an ordinary one; a name the
project has already gets a number. **Embed a copy** goes the other way: the item plays a copy of
its project asset that only the song has, to bend without touching the rest.
- A project file whose song is gone keeps such an asset as a project asset.
## Playing one in a game
**Play song** plays a song at its tempo, its tracks with the volume, pan, mute and solo they have