9dc48e94d9393e0224d39d109d952726bb45f4ee
TelemetrySynth.gainNode was only ever created inside start(), which is only called from the main ENGAGE/FULL STOP flow. Every telemetry-driven soundboard one-shot (LCARS Single/Double Chirp, Ack Sequence, Sensor Sweep, the TOS/NX/Cardassian era sounds, Door Chime, and the Phase 3 who/bioship/belter era generators) guarded on `!this.gainNode` with no fallback, so clicking any of them before the ambient bed had been engaged once did nothing at all: no sound, no console error, and nothing for the spectrum analyzer to react to. ExpandedSciFiAudioSynth and WhoniverseAudioSynth already self-heal this way via their own init() (called at the top of every public synth method) - that's why buttons like Comm Badge work standalone. Add the same init() to TelemetrySynth and call it from every method reachable from the soundboard, so the whole class follows the same convention. start() is left untouched: it still unconditionally rebuilds the node on every engage so a newly-selected preset's volume takes effect immediately. Verified with a small headless harness driving TelemetrySynth directly (no prior start()): all 13 affected methods now create gainNode and fire real oscillators on first call, where they previously did nothing. Confirmed against the pre-fix code that the same harness reproduces the original silent failure. Regenerated dist/SciFiAmbientDisplay_v4.html to match (tools/package.ps1 requires PowerShell, unavailable in this shell, so the inlining was replicated in Python matching its exact output convention; diff against the previous build is exactly the 31 added lines, nothing else). Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01582UUCEBExzp3oK3Spz1Xx
SciFi-XZBT Modular Architecture & Repackaging
Directory Overview
SciFi-XZBT/
├── index.html # Clean entry point (368 lines)
├── css/
│ └── style.css # LCARS styling, CRT effects, theme colors (2,317 lines)
├── js/
│ ├── audio.js # Web Audio synthesis, oscillators, sound engines (2,258 lines)
│ ├── config.js # Starship presets, Universe registry & palettes (1,039 lines)
│ ├── visualizer.js # Audio spectrum & Warp Core canvas rendering (643 lines)
│ ├── observation-bezels.js # Procedural SVG Viewport bezels (TOS, Voyager, TNG, etc.) (271 lines)
│ ├── observation-engine.js # Full observation mode canvas and simulation engine (2,784 lines)
│ └── app.js # DOM bindings, hotkeys, UI controllers & loop (3,962 lines)
├── dist/
│ └── SciFiAmbientDisplay_v4.html # Standalone, single-file offline build
└── tools/
├── package.ps1 # 1-click script to build the standalone single-file HTML
└── extract.ps1 # Original extraction script for reference
Development Workflow
-
Developing Modularly:
- Edit the specific CSS or JS files directly.
- For audio or synthesizer logic, focus exclusively on
js/audio.js. - For viewscreen bezels and framing, edit
js/observation-bezels.js. - For observation celestial mechanics and canvases, edit
js/observation-engine.js. - For presets and sound matrix tables, edit
js/config.js.
-
Repackaging to Single-File: Run the packaging script from PowerShell:
powershell -ExecutionPolicy Bypass -File .\tools\package.ps1This immediately produces
dist\SciFiAmbientDisplay_v4.html, combining all CSS and JS back into a self-contained, double-clickable offline file.
Languages
HTML
51.4%
JavaScript
44.5%
CSS
3.7%
PowerShell
0.4%