Cockpit - #1
Merged
Merged
Conversation
New shared module src/shared/swayproject.js: document schema with defaults, non-throwing validation, legacy preset conversion, and the control-target grammar (engine:/fx:/synth:/sampler:/transport:). scripts/convert-projects.js converts the 8 legacy presets into committed projects/templates/*.sway. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
New src/main/projectfile.js: validated read/write at user-chosen paths (atomic write, app-dir refusal, 8 MB cap), id-gated template listing, recents pruning, streamed sha256 for media. Registers project:openDialog/saveDialog/read/write/recent/templates/readTemplate and files:statAudio; preload exposes them. HUD now names WASAPI loopback (SYSTEM AUDIO) instead of falling through to NO AUDIO. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
cutTo(id) swaps slots without the 0.1 s fade floor; crossfadeTo routes
sub-0.12 s requests through it. prewarm() compiles one cold scene per
frame after a project apply. A ResizeObserver on the canvas makes the
stage safe in a grid cell. Knobs 0-2 are no longer hardwired in the
frame loop — engine.params {hue, intensity} takes their place and
autoVJ.fadeTime stops being overwritten every frame (app.js carries a
change-driven shim until the assignment router lands). setFrameHook()
reserves the router/transport slot. applyProject() loads the .sway
shape, replaying fx params through the rack's clamping. fxrack now
exports DECKS beside RANGES (drops the three phantom keys, surfaces
audioReactive and asciiAccent).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
src/renderer/audio/transport.js plays the timeline's audio track through AudioBufferSourceNodes scheduled on the context clock (sample-accurate seek, clip fades, loop region) and reports visual-lane clip entries to a single subscriber. src/renderer/project/projectstore.js owns the .sway document lifecycle: open/apply hydration order, sequential media loading with decoded-size pre-flight, collect() reassembly, save/saveAs, and media registration for the kit. Both ride the existing analyser bus, so timeline audio drives the visuals like every other source. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
src/renderer/control/router.js owns the project's assignment table and dispatches pad strikes (sample / scene cut-or-fade / momentary fx punch), learned-CC button toggles, note routing (assigned pads stop double-firing the synth; Theory Engine pitches still reach it), change-driven knob targets, and per-frame gesture routes (gestures win on shared targets, held punches re-assert last). It runs inside the engine frame via setFrameHook, drives the transport's visual lane (autoVJ suspended while the timeline owns the stage), records the last-touched control for the surface UI, and is midi.learn's first caller. midi.js now emits cc events and carries pad indices on note/noteoff; keyboard pads route through the router, wiring sampler.release for gate mode. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
One always-live page replaces the five screens: top bar (project, transport, scene readout, pills, deck buttons), scene bank + auto group, center stage, assignment rail + input box, timeline band (ruler with loop region and locators, visual clip lane, audio waveform lane, playhead), and the Sway deck — a stroke line-art schematic of the hardware with live LED beam, sensor field, gesture chips, knob arcs, pads, and buttons, sharing one control-id grammar with the router so click-to-select and hardware touch land on the same node. Deep panels (synth, rack, kit) live in a drawer that never stops the render loop; docs and the system checks are modals; the blast door reveals the already-running stage on ENTER. Projects open and save as .sway files from the project menu; AKSWAYJ_AUTOPLAY takes a template id or a .sway path. Bundled Source Code Pro replaces remote fonts (CSP has no font-src). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The 8 legacy projects/*.json and the projects:list channel are gone — templates are the only bundled projects now, and each ships its pool on the right-cluster pads as instant cuts. AKSWAYJ_WINDOW=WxH forces an initial window size for narrow-layout screenshots; __akswayj gains renderTimeline. Assign-rail number inputs keep a readable minimum width. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Every bundled doc, the README, and the internal handoff now describe the single-page cockpit, the .sway format, the assignment model, and the current probe surface — claims verified against source, links and headings checked. Audio-lane clips gained pointer hit-testing (select, move, trailing-edge resize) closing the gap the review found. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Product name, wordmarks, window title, preload global (window.swaycommand), automation handle (__swaycommand), env hooks (SWAYCOMMAND_SHOT/_SHOT_DELAY/_PROBE/_AUTOPLAY/_SCENE/_WINDOW), appId, installer artifact, launcher scripts, and every doc. Note: the Electron userData directory follows the product name, so settings saved under the old name (learned MIDI overrides, legacy kit) are not carried over. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ironment The engine renders scenes into half-float targets, runs UnrealBloomPass per scene (meta.bloom or a live instance.bloom, strength crossfaded with the scene mix), and hands scenes a PMREM RoomEnvironment through ctx.environment so black-chrome ports finally have something to reflect. io gains strike (max pad energy) as the morph dimension scenes read. lattice.js is a full-fidelity rewrite of theDAW's engine: the complete 373-node body (strands + cuboctahedron core + reactor) and 756-beam topology (rings, inter-strand rungs, core edges, spokes), positions easing at upstream's rate so geometry changes pour, the morphEnergy shockwave, per-shape core scales / node factors / bloom multipliers, and upstream bloom numbers live-modulated. Strike advances the geometry and fires the shockwave; sway morphs the filament field; nothing merely rotates. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…alley fxrack gains anaglyph (depth-scaled red/cyan stereo separation with counter-rotation at high drive) and mosaic (grouted tile quantiser with per-cell brightness hash), both arm-gated and free at zero. Default knob assignments now put glitch / anaglyph / mosaic / echo trails on knobs 4-7 with the kit level on 8, and driving any rack target switches the rack on. valley.js is the faithful theDAW landscape: verbatim terrain maths, fbm plasma sun with halo and palette-tinted point light, starfield, fog-to-black, engine bloom — and sway morphs the terrain itself from liquid chrome to magnetic spike field, strike quakes the ridges, press dives between them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The black chrome finally has something to reflect: the engine's PMREM RoomEnvironment plus upstream's three-point rig and GLSL3 backdrop dome, under upstream's bloom (1.65/0.4/0.6). Rosensweig maths verbatim; the one documented deviation makes the declared-but-unread spikeDensity uniform actually scale the winding (identity at default). Strike cycles the spike density and surges amplitude, sway glides density/viscosity from oily swells to needle forests, press crushes the field into mirror chrome. Stage luminance ~11% versus the old ~1%. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Verbatim upstream plate maths (mode tables, getCymaticValue, central- difference normals) on the 160x160 chrome platform with RoomEnvironment reflections, the backdrop dome, upstream's light rig and bloom, the spectral-centroid mode index, and the cover camera. Strike hits the plate and jumps the nodal mode with a ring-down; sway bows the mode table continuously; press damps the plate; pulse drives it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sway no longer leans cameras: it spreads and cross-tilts the beam array into a crossing lattice, splits the swarm's murmuration into orbiting cells, winds the ribbons from silk sweeps into tight coils, and deepens the wormhole's flare/twist/fold topology. Strike re-patterns each generator: column phase and palette reseed, scatter shock with a reforming attractor, a whipcrack impulse traveling every ribbon, and a hyperjump that reseeds the tunnel's layers. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sway re-weights the nebula's fbm spectrum and rotates its flow field from laminar sheets into curl storm cells; glides the mandelbulb's power across 6..12 (the canonical morph) with press diving the camera; and lifts the cymatic orb's four resonance-mode numbers from sparse arcs to dense weaves. Strike ignites a traveling density front in the nebula, hops the mandelbulb into a new julia basin by the golden angle under a glow flash, and jump-seeds the orb's modes with a ring-down envelope. The orb's rotation-only sway response is gone. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sway sweeps the VJ shader through its preset parameter space (bulb power, julia constant arcs, box scale, KIFS fold angles, flythrough rush) with zero-at-rest morph vectors preserving the upstream idle; strike kicks the active preset's structural parameter, jumps the seed scrub, and pads 5-7 step presets. Spectra gains a staged layout morph — log/lin axis warp, mirrored-pair to multi-fold comb, planar terrain to radial burst — while strike slams a full-band impulse through the mel machinery and jumps the layout seed. The resting shear bias is gone. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The scene starts coasting in deep space — blackbody-tinted starfield, a limb-darkened G-type star with corona under bloom, faint palette nebulosity. A strike engages warp: stars streak along great circles toward the direction of travel with relativistic aberration crowding the sky forward and Doppler blue/red shift fore and aft; sway sets the velocity around center. Pressing down to the sensors opens the wormhole: thin-lens deflection bends the background around the mouth, an Einstein ring brightens at the photon radius, the throat shows another region of sky, and transit swaps the seed — you come out somewhere else. Bright stars carry a widened point spread with a clamped peak so bloom mips stay round. Auto rotation now stays off until a project decides, closing a boot race. Docs pick up the 38-param rack, the new knob defaults, ctx.environment, io.strike, per-scene bloom, and the morph contract. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…default PAD_CELLS follows the user's numbering: top rows first, left cluster 0-3, right cluster 4-7, then the bottom rows 8-11 / 12-15; the assignment panel shows PAD n 0-based. defaultKnobs() is empty, the factory templates lose their fx and intensity knobs (hue, fade length, kit level stay), and the router reconciles fx every frame: a key no assignment drives any more is reset to its rack default, and a rack that a control switched on switches off again when nothing drives it. fxrack exports DEFAULTS for that and holds the radial-spoke wheel still.
Autonomous rotation removed everywhere (coast yaw, kaleidoscope spin, solid spin, orb spin, camera drifts and auto-orbits, revolving cell ring, star-field roll, phyllotaxis spin, nodal-spoke drift, Voxels' slow orbit); hand-driven orbits, flow, scroll, breathing and path travel stay. Every custom ShaderMaterial now sets glslVersion THREE.GLSL3 with in/out, out vec4 fragColor and texture(); maths unchanged. onBeforeCompile injections into three's built-in materials keep three's conventions by necessity.
… into Forward motion only. The stars themselves are the hyperspace streaks (instanced screen-space capsules along each star's line of flight, random by construction; sway morphs the distribution toward a lattice). Warp rides X and Y and peaks at the highest X, lowest Y; a jump ends at a new celestial object - pulsar, spiral galaxy, solar system, nebula, ringed giant - ray-cast analytically on one quad. PAD 7 opens a raymarched Schwarzschild black hole with an edge-on accretion disk, Doppler beaming and a photon ring, and the ship falls in; PAD 8 / PAD 15 bank. Bundled template carries the track.
One instanced mesh of axial-billboard beam quads; the fragment shader crossfades the three styles on io.knobs[3] (0.5 = laser), smoothed so the knob's speed is the transition's speed. Floor with impact pools and reflection streaks, dust that catches the beams; sway fan/cross-tilt and strike re-seed kept; fixed eye.
Grips on the rails, timeline, deck and the assign/input split (double-click resets), a collapse chip per region, sizes and collapsed state persisted in settings.layout, composing with solo view.
There was a problem hiding this comment.
Pull request overview
This PR rebrands the application to SwayCommand and completes the “cockpit” pivot: a single always-live UI with resizable panels/drawers, .sway project files (templates/recents), a timeline transport, and an assignment router that unifies hardware MIDI, keyboard, and timeline-driven control.
Changes:
- Rebrand across scripts, docs, packaging metadata, and IPC surface (
window.swaycommand, newproject:*IPC). - Add cockpit UI infrastructure (layout resizing/collapse, drawer, popover, frames, analyser wave display) plus assignment routing and timeline transport.
- Upgrade render pipeline for HDR-ish composition + optional bloom, add new scene(s) and scene behavior updates, and migrate bundled presets to
.swaytemplates.
Reviewed changes
Copilot reviewed 89 out of 93 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/shared/constants.js | Rebrand constants (app name, UA string). |
| src/renderer/ui/wave.js | New analyser-driven layered wave display. |
| src/renderer/ui/popover.js | New shared anchored popover root + wiring. |
| src/renderer/ui/layout.js | New cockpit panel resizing/collapse + persistence. |
| src/renderer/ui/frame.js | New SVG frame rendering for .framed containers. |
| src/renderer/ui/drawer.js | New right-side drawer shell (synth/rack/kit). |
| src/renderer/project/projectstore.js | New .sway project lifecycle + media loading/hydration. |
| src/renderer/midi/midi.js | Emit richer MIDI events (CC/note/noteoff) for router. |
| src/renderer/markdown.js | Rebrand doc renderer comment. |
| src/renderer/engine/scenes/voxels.js | Remove auto-rotation behavior (fixed viewpoint). |
| src/renderer/engine/scenes/swarm.js | GLSL3 + new morph/strike behavior; fixed camera. |
| src/renderer/engine/scenes/index.js | Register additional scene module(s). |
| src/renderer/engine/engine.js | Add environment PMREM + bloom + prewarm queue + frame hook. |
| src/renderer/control/router.js | New assignment router (events + frame hook + timeline integration). |
| src/renderer/audio/wavetables.js | Rebrand comment. |
| src/renderer/audio/transport.js | New timeline transport (audio scheduling + visual clip events). |
| src/renderer/audio/synth.js | Rebrand comment. |
| src/preload/preload.js | Rename global bridge + new project and file stat IPC APIs. |
| src/main/projectfile.js | New .sway read/write/templates/recents + media hashing. |
| src/main/main.js | New project IPC handlers; env var rename; remove legacy project listing. |
| src/main/doctor.js | Rebrand messaging in Doctor results. |
| src/main/audima.js | Rebrand messaging in Audima download flow. |
| scripts/midi-session.ps1 | New MIDI capture automation for resolving hardware unknowns. |
| scripts/midi-session-probe.js | New probe payload to analyze captured MIDI monitor output. |
| scripts/install-launch.ps1 | Rebrand Windows bootstrap messaging and launcher names. |
| scripts/gen-icon.js | Rebrand icon generation comment. |
| scripts/convert-projects.js | One-shot legacy preset conversion to .sway templates. |
| scripts/build-renderer.js | Raise esbuild target + copy bundled fonts into dist. |
| README.md | Rewrite to describe cockpit UI, .sway projects, assignments, timeline, rack. |
| projects/templates/index.json | Add new template(s) to bundled template ordering. |
| projects/templates/will-i-dream.sway | Add a new bundled template project. |
| projects/templates/nebula-drift.sway | Converted legacy preset to .sway template. |
| projects/templates/hyperspace.sway | Converted legacy preset to .sway template. |
| projects/templates/hiphop-voxels.sway | Converted legacy preset to .sway template. |
| projects/templates/garage-neon.sway | Converted legacy preset to .sway template. |
| projects/templates/first-flight.sway | Converted legacy preset to .sway template. |
| projects/templates/dnb-tunnel.sway | Converted legacy preset to .sway template. |
| projects/templates/chrysanthemum.sway | Converted legacy preset to .sway template. |
| projects/templates/beam-sixteen.sway | Converted legacy preset to .sway template. |
| projects/nebula-drift.json | Remove legacy JSON preset (now template). |
| projects/hyperspace.json | Remove legacy JSON preset (now template). |
| projects/hiphop-voxels.json | Remove legacy JSON preset (now template). |
| projects/garage-neon.json | Remove legacy JSON preset (now template). |
| projects/first-flight.json | Remove legacy JSON preset (now template). |
| projects/dnb-tunnel.json | Remove legacy JSON preset (now template). |
| projects/chrysanthemum.json | Remove legacy JSON preset (now template). |
| projects/beam-sixteen.json | Remove legacy JSON preset (now template). |
| package.json | Rebrand productName + bump Electron/esbuild/three versions. |
| install-launch.sh | Rebrand macOS/Linux bootstrap messaging and launcher names. |
| Install & Launch SwayCommand.command | Rebrand macOS double-click launcher. |
| Install & Launch SwayCommand.bat | Rebrand Windows double-click launcher. |
| electron-builder.yml | Rebrand appId/productName/artifact naming. |
| docs/TROUBLESHOOTING.md | Update troubleshooting text to cockpit terminology + rebrand. |
| docs/SYNTH.md | Update synth documentation to drawer/assignment model + rebrand. |
| docs/SWAY_INTEGRATION.md | Rebrand + update references to new app name. |
| docs/STUDIO.md | Rewrite: studio → drawers + assignments + router + note routing. |
| docs/RESEARCH.md | Rebrand research record references. |
| docs/OVERVIEW.md | Rewrite to describe cockpit, router, transport, .sway projects. |
| docs/MIDI.md | Update to router-based event flow + new emitted event semantics. |
| docs/INSTALLATION.md | Rebrand + update first-run flow (SYSTEM modal/blast door). |
| docs/INDEX.md | Update reading order + docs modal terminology + rebrand. |
| docs/DOCTOR.md | Update Doctor doc to cockpit/SYSTEM modal flow + rebrand. |
| docs/BUILD.md | Update dependency versions + renderer target + rebrand packaging metadata. |
| docs/AUDIO.md | Update to include system audio + transport as consumer + cockpit INPUT box. |
Suppressed comments (1)
src/renderer/ui/wave.js:53
- Canvas backing store is capped at dpr<=2 in fit(), but lineWidth scales by the uncapped window.devicePixelRatio. On high-DPI displays (>2), strokes will render thicker than intended relative to the scaled canvas.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+51
to
+56
| { | ||
| "id": "will-i-dream", | ||
| "name": "New Will I Dream Master Style 2 - Live Punchy.mp3", | ||
| "path": "C:\\Users\\Cyboman\\Music\\New Will I Dream Master Style 2 - Live Punchy.mp3", | ||
| "sha256": "510de9de7fcb3b80edc85cacbef10ada685b0543b2e22dc9ec5a776f615a0e39", | ||
| "bytes": 9167722, |
Comment on lines
+34
to
+42
| // Half-float targets keep the scenes' additive HDR (values past 1.0) alive | ||
| // for the bloom pass, exactly like theDAW's EffectComposer buffers. | ||
| const rtOpts = { depthBuffer: true, stencilBuffer: false, type: THREE.HalfFloatType }; | ||
| let rtA = new THREE.WebGLRenderTarget(width, height, rtOpts); | ||
| let rtB = new THREE.WebGLRenderTarget(width, height, rtOpts); | ||
|
|
||
| // The crossfade composite lands here when the FX rack is active, so the rack | ||
| // has a texture to work from. Straight to the screen when the rack is idle. | ||
| let rtComp = new THREE.WebGLRenderTarget(width, height, { depthBuffer: false, stencilBuffer: false }); | ||
| // The crossfade composite lands here when bloom or the FX rack needs a | ||
| // texture to work from. Straight to the screen when both are idle. | ||
| let rtComp = new THREE.WebGLRenderTarget(width, height, { depthBuffer: false, stencilBuffer: false, type: THREE.HalfFloatType }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request performs a comprehensive rebranding of the application from "AKSWAYJ" to "SwayCommand" and updates the documentation to reflect new features, interface changes, and improved assignment and control mechanisms. The changes affect launch scripts, the README, and architecture documentation, clarifying both technical and user-facing aspects of the application.
Application and Documentation Rebranding:
Install & Launch SwayCommand.bat,Install & Launch SwayCommand.command), the README, and architecture documentation. [1] [2] [3] [4] [5]Feature and Interface Updates:
Control Mapping and Assignment Improvements:
Architecture and Technical Documentation Updates:
docs/ARCHITECTURE.mdto use new identifiers (e.g.,window.swaycommand), describe the cockpit layout, and clarify the startup sequence and module responsibilities in alignment with the new interface. [1] [2]Legal and Credits Section Updates:
These changes ensure the codebase and documentation are consistent with the new application identity and provide clearer, more accurate information for users and developers.