Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
199 changes: 64 additions & 135 deletions HANDOFF.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ SwayCommand is an independent project. It is not affiliated with or endorsed by
## Feature summary

- A single-page cockpit: the stage renders from boot to quit while the scene bank, transport, timeline, assignment panel, and drawers work on top of it — no screen switching, no interrupted frames.
- Fifteen procedural visual scenes, each driven by audio analysis and gesture input, rendered with three.js on WebGL2 — every shader GLSL3, no autonomous rotation anywhere.
- Projects as `.sway` files: one JSON document carrying palette, engine settings, effects snapshot, synth patch, linked media, kit, timeline, and every control assignment. Save, open, and recent files live in the project menu; nine bundled templates (three tuned to pair with Audima's official Ableton demo packs — Garage, DNB, Hip Hop) provide starting points.
- Seventeen procedural visual scenes, each driven by audio analysis and gesture input, rendered with three.js on WebGL2 — every shader GLSL3, no autonomous rotation anywhere.
- Projects as `.sway` files: one JSON document carrying palette, engine settings, effects snapshot, synth patch, linked media, kit, timeline, and every control assignment. Save, open, and recent files live in the project menu; ten bundled templates (three tuned to pair with Audima's official Ableton demo packs — Garage, DNB, Hip Hop) provide starting points.
- A timeline with an audio lane (waveform clips scheduled sample-accurately on the audio clock) and a visual lane (scene clips with per-clip cut or fade entry), plus loop region, locators, and scrubbing.
Comment on lines +10 to 12
- An on-screen Sway deck — a line-art schematic of the hardware. Click any pad, knob, button, or gesture chip to assign it: pads fire samples, scene switches, or momentary effect punches; knobs drive any engine, rack, synth, or kit parameter with range and curve; buttons learn a hardware CC and toggle anything; the five gesture dimensions hold modulation routes. Touching a control on the hardware selects it on screen.
- Automated scene cycling with palette-synchronized crossfades (Auto-VJ), after the pattern established by Keijiro Takahashi's Akvj.
Expand Down
2 changes: 1 addition & 1 deletion docs/ENGINE.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The composite pass is a fullscreen quad under an orthographic camera, drawn with

## Scene management

`scenes/index.js` imports the fifteen scene modules in registry order — `beams`, `swarm`, `ribbons`, `voxels`, `warp`, `nebula`, `mandelbulb`, `cymatic`, `spectra`, `vjshader`, `ferrofluid`, `chladni`, `valley`, `lattice`, `willidream` — and derives two exports: `sceneList`, the array of each module's `meta`, and `creators`, a map from scene id to its `createScene` function. The digit keys `1`–`9` index the **active project's pool**, not this registry, so the registry can grow past the digits; the SCENES bank in the left rail lists all fifteen and prints each pooled scene's digit.
`scenes/index.js` imports the seventeen scene modules in registry order — `beams`, `swarm`, `ribbons`, `voxels`, `warp`, `nebula`, `mandelbulb`, `cymatic`, `spectra`, `vjshader`, `ferrofluid`, `chladni`, `valley`, `lattice`, `willidream`, `naturestomb`, `miraclemile` — and derives two exports: `sceneList`, the array of each module's `meta`, and `creators`, a map from scene id to its `createScene` function. The digit keys `1`–`9` index the **active project's pool**, not this registry, so the registry can grow past the digits; the SCENES bank in the left rail lists all seventeen and prints each pooled scene's digit.

Scene instances are created on demand at first use and cached in a map for the rest of the session; the engine never disposes them. Creation receives the context `{ THREE, renderer, width, height, quality }` defined in [SCENE_CONTRACT.md](SCENE_CONTRACT.md). Requesting an unregistered id throws `Unknown scene: <id>`.

Expand Down
2 changes: 1 addition & 1 deletion docs/ENVIRONMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Both parameters are consumed once, in `main()` of `src/renderer/app.js`, from `l
| Parameter | Value | Behavior |
|---|---|---|
| `autoplay` | Template id, or a `.sway` file path | A value ending in `.sway` (case-insensitive) is opened as a project file; anything else is opened as a template id. On failure the startup falls through to the normal selection (most recent project, then the `first-flight` template) with a console warning. Any `autoplay` value also skips the SYSTEM modal: the blast door opens immediately and the Doctor still runs in the background, keeping its checks reachable from the CONTROLS modal. |
| `scene` | Scene id | Applied after the boot project loads: Auto-VJ is disabled and the engine switches to the named scene via `setScene(scene, 0.3)`. The value is one of the fifteen ids in the scene registry (`src/renderer/engine/scenes/index.js`): `beams`, `swarm`, `ribbons`, `voxels`, `warp`, `nebula`, `mandelbulb`, `cymatic`, `spectra`, `vjshader`, `ferrofluid`, `chladni`, `valley`, `lattice`, `willidream`. `setScene` ignores an id with no registered creator, so an unknown value leaves the project's opening scene on stage with Auto-VJ still disabled. |
| `scene` | Scene id | Applied after the boot project loads: Auto-VJ is disabled and the engine switches to the named scene via `setScene(scene, 0.3)`. The value is one of the seventeen ids in the scene registry (`src/renderer/engine/scenes/index.js`): `beams`, `swarm`, `ribbons`, `voxels`, `warp`, `nebula`, `mandelbulb`, `cymatic`, `spectra`, `vjshader`, `ferrofluid`, `chladni`, `valley`, `lattice`, `willidream`, `naturestomb`, `miraclemile`. `setScene` ignores an id with no registered creator, so an unknown value leaves the project's opening scene on stage with Auto-VJ still disabled. |

## The automation handle

Expand Down
2 changes: 1 addition & 1 deletion docs/OVERVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The application is one page — the cockpit — and it is always live. There is
| Region | Contents |
|---|---|
| Top bar | Wordmark; the project button (opens the project menu: New, Open, Save, Save as, recent files, templates); the transport (play/pause, stop, clock, LOOP); the current scene readout; status pills (`SWAY`/`MIDI`/`KEYS` link, `LOOPBACK`/`LINE`/`GROOVE`/`MUTE` input, fps); the deck buttons SYNTH, RACK, KIT, DOCS, HELP |
| Left rail | The SCENES bank — all fifteen registry scenes, with digit hints on the first nine of the active pool; a click switches the stage, a drag onto the timeline lays a clip. The AUTO group — RUN toggle, HOLD min–max seconds, FADE seconds |
| Left rail | The SCENES bank — all seventeen registry scenes, with digit hints on the first nine of the active pool; a click switches the stage, a drag onto the timeline lays a clip. The AUTO group — RUN toggle, HOLD min–max seconds, FADE seconds |
| Center | The stage canvas. The blast door covers it at boot and opens once |
| Right rail | The assignment panel for the selected control, and the INPUT box: the analysis-source button, a level meter, and an audio-reactive band display |
| Bottom band | The timeline: a ruler (scrub, loop region, locators), a VISUAL lane of scene clips, an AUDIO lane with waveforms, and the playhead |
Expand Down
4 changes: 3 additions & 1 deletion docs/PROJECTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,14 @@ Clips are kept sorted by start time; validation drops zero-length clips. Editing

## Templates

Nine templates are bundled as full `.sway` documents at `projects/templates/*.sway`: the eight factory presets of earlier builds, produced from the legacy JSON by `legacyToSway()` (everything the legacy shape did not cover sits at defaults, and `meta.template` is `true`), and `will-i-dream`, an authored project whose timeline carries a linked track — the only template with media, linked by the absolute path of the author's machine, so on any other machine the audio clip loads with a missing-file warning and the scene still plays. They appear at the bottom of the project menu; opening one loads a fresh untitled copy — templates are read-only and are addressed by id through a gated channel, never by path. `projects/templates/index.json` fixes the menu order.
Eleven templates are bundled as full `.sway` documents at `projects/templates/*.sway`: the eight factory presets of earlier builds, produced from the legacy JSON by `legacyToSway()` (everything the legacy shape did not cover sits at defaults, and `meta.template` is `true`), plus three authored projects: `will-i-dream`, whose timeline carries a linked track — the only template with media, linked by the absolute path of the author's machine, so on any other machine the audio clip loads with a missing-file warning and the scene still plays; `natures-tomb`, which opens on the Nature's Tomb scene with nothing assigned; and `miracle-mile`, which opens on Miracle Mile with nothing assigned. They appear at the bottom of the project menu; opening one loads a fresh untitled copy — templates are read-only and are addressed by id through a gated channel, never by path. `projects/templates/index.json` fixes the menu order.

| Id | Name | Vibe | Scene pool | Start | Auto-VJ | Hold (s) | Fade (s) | BPM hint | Pairs with |
|---|---|---|---|---|---|---|---|---|---|
| `first-flight` | First Flight | welcoming | beams, swarm, ribbons, voxels, warp, nebula, mandelbulb, cymatic, vjshader | beams | on | 20–45 | 5 | — | — |
| `will-i-dream` | Will I Dream | lucid | willidream | willidream | off | 60–120 | 4 | — | the track "Will I Dream" on the audio lane (0:00–3:49) with the scene on the visual lane |
| `natures-tomb` | Nature's Tomb | cellular | naturestomb | naturestomb | off | 60–120 | 4 | — | — |
| `miracle-mile` | Miracle Mile | critical | miraclemile | miraclemile | off | 60–120 | 4 | — | — |
| `hyperspace` | Hyperspace | transluminal | warp, vjshader, mandelbulb, lattice, valley, spectra, swarm | warp | on | 22–46 | 3 | — | — |
| `chrysanthemum` | Chrysanthemum | hyperreal | mandelbulb, vjshader, ferrofluid, chladni, lattice, nebula, warp, spectra | mandelbulb | on | 26–52 | 6 | — | — |
| `beam-sixteen` | Beam Sixteen | anthemic | beams, nebula | beams | off | 30–60 | 6 | — | — |
Expand Down
Loading