ATMOSYNTH Groove: a desktop DAW whose instruments and effects are ATMOSYNTH patches, on ATproto.

A patch's frames and positions are kept and published from Groove #40

Closed opened by center.for.cybernetic.beauty

Blocked by: the engine and editor commits that add a patch's presentation, once pushed

What to build #

A patch's presentation, how it is drawn, now lives beside the patch rather than in it: the engine's new Lexicon at.atmosynth.patchPresentation, its ADR 0007 (A presentation is a record of its own) and its glossary's Presentation and Frame. Where each block stands and the patch's frames (named, coloured rectangles that move the blocks inside them) are in it, and moduleInstances[].position in the patch is deprecated: a writer leaves it out, a reader reads it only from a patch with no presentation. The patch editor keeps the presentation in its document beside the record (EditorDocument's presentation, in the editor README's Mounting it) and hands both back on commit. Read the ADR, the Lexicon and the README first; they say more than this.

Groove has to keep, play past and publish it, so that a patch edited in Groove keeps its frames:

  • The pins move to those engine and editor commits with scripts/bump-atmosynth.sh.
  • A patch document (src-tauri/src/open_patch.rs; CLAUDE.md: "A patch document is a Name.atmopatch folder … patch.json for its record") keeps its presentation beside patch.json, in every step of its history, and hands it to the editor with the document (frontend/src/patch-editor.js: mountPatchEditor(this.#box, { document, engine, … })). Undo puts a block's place back as it does today.
  • A track's patch. An instrument and an insert are held whole in the arrangement record (ADR 0001); the engine's defs.json now lets each hold its presentation whole beside it, optionally. A patch edited on a track keeps its frames there.
  • An old patch (positions in the record, no presentation), opened or found on a track, is drawn exactly where its positions put it; the first edit moves them into the presentation. Use the split the engine's atmosynth-records crate gives for this, as atmosynth.at does, rather than writing a second one (ADR 0020).
  • Publishing a patch (src-tauri/src/publish_patch.rs) writes the patch, with no position, and its presentation under the same record key, in one com.atproto.repo.applyWrites, so nobody reads a patch beside another version's presentation. Today it is a putRecord (src-tauri/src/publish.rs: `com.atproto.repo.putRecord` of `record` under `rkey` of `collection`). Publishing again updates both, under the rule that is there today: only if the record is still the version written from here.
  • A patch read from an account (Explorer, a patch dropped on a track) reads its presentation beside it where there is one; one that is missing or unreadable leaves the patch drawn by its own positions or the layout, and never refuses it.
  • Rooms joined from Groove (ADR 0019) need nothing of their own: the editor carries the presentation in the room's document.

Acceptance criteria #

Done in d368557, with the pins moved in 2787eb4, both on main. Publishing a patch writes the patch and its presentation in one applyWrites; the presentation is kept beside patch.json and beside a track's instrument.

A Groove asking for the presentation's scope signs in only once atmosynth.at serves the client metadata from the same engine.

Sign up or Sign in to add to the discussion.