# lotter-35/soundstage3d architecture

> Architecture diagram of the GitHub repository lotter-35/soundstage3d, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lotter-35/soundstage3d
- Repository: https://github.com/lotter-35/soundstage3d

## Overview

SoundStage3D is a browser-based festival sound-system simulator. A user loads music (or selects the sine test source), adjusts DSP controls, and explores the 3D venue; the application spatializes playback for the listener and presents live frequency analysis. The graph separates audio processing, scene/exploration, and controls, while retaining persistence and diagnostic capabilities. Edges follow the sampled main-module references and explicit source relationships; some DSP wiring and UI event routing are not shown in the excerpts, so those links are omitted rather than inferred.

Main entry points: [`src/main.js`](https://github.com/lotter-35/soundstage3d/blob/main/src/main.js) (App runtime), [`src/ui/controls.js`](https://github.com/lotter-35/soundstage3d/blob/main/src/ui/controls.js) (DSP controls), [`src/audio/speakers.js`](https://github.com/lotter-35/soundstage3d/blob/main/src/audio/speakers.js) (Speaker array), [`src/audio/audioEngine.js`](https://github.com/lotter-35/soundstage3d/blob/main/src/audio/audioEngine.js) (Audio engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application orchestration"]
  node_main["App runtime<br/>[main.js]"]
end

subgraph group_audio["Audio and DSP"]
  node_engine["Audio engine<br/>[audioEngine.js]"]
  node_input["Input processing<br/>[inputStage.js]"]
  node_crossover["Four-way crossover<br/>[crossover.js]"]
  node_effects["Bus effects<br/>[effects.js]"]
  node_speakers["Speaker array<br/>[speakers.js]"]
  node_master["Master output<br/>[masterStage.js]"]
  node_mic["Microphone input<br/>[microphone.js]"]
  node_sine["Sine test source<br/>[sineGenerator.js]"]
  node_probes["Audio diagnostics<br/>[debugProbes.js]"]
  node_defaults["DSP defaults<br/>[dsp-defaults.js]"]
end

subgraph group_scene["3D festival"]
  node_stage["Stage geometry<br/>[stage.js]"]
  node_listener["Listener movement<br/>[listener.js]"]
  node_character["Animated character<br/>[character3D.js]"]
  node_skybox["Skybox<br/>[skybox.js]"]
  node_vegetation["Vegetation<br/>[vegetation.js]"]
end

subgraph group_ui["Controls and analysis"]
  node_controls["DSP controls<br/>[controls.js]"]
  node_drag["Draggable panels<br/>[draggable.js]"]
  node_tooltips["DSP tooltips<br/>[dsp-tooltips.js]"]
end

subgraph group_state["Persistence"]
  node_storage[("Track persistence<br/>[audioStorage.js]")]
end

node_user(("Listener"))

node_user -->|"loads audio"| node_main
node_main -->|"controls playback"| node_engine
node_main -->|"initializes DSP"| node_input
node_main -->|"configures DSP"| node_crossover
node_main -->|"configures array"| node_speakers
node_main -->|"configures effects"| node_effects
node_main -->|"initializes input"| node_mic
node_main -->|"selects test source"| node_sine
node_main -->|"uses diagnostics"| node_probes
node_main -->|"creates scene"| node_stage
node_main -->|"creates listener"| node_listener
node_main -->|"creates and updates"| node_skybox
node_main -->|"creates and updates"| node_vegetation
node_main -->|"initializes controls"| node_controls
node_main -->|"loads and saves"| node_storage
node_engine -.->|"plays into"| node_input
node_speakers -->|"feeds output"| node_master
node_speakers -->|"creates reflections"| node_effects
node_listener -->|"manages"| node_character
node_controls -->|"makes panels draggable"| node_drag
node_controls -->|"displays guidance"| node_tooltips
node_controls -->|"uses parameter defaults"| node_defaults

click node_main "https://github.com/lotter-35/soundstage3d/blob/main/src/main.js"
click node_engine "https://github.com/lotter-35/soundstage3d/blob/main/src/audio/audioEngine.js"
click node_input "https://github.com/lotter-35/soundstage3d/blob/main/src/audio/inputStage.js"
click node_crossover "https://github.com/lotter-35/soundstage3d/blob/main/src/audio/crossover.js"
click node_effects "https://github.com/lotter-35/soundstage3d/blob/main/src/audio/effects.js"
click node_speakers "https://github.com/lotter-35/soundstage3d/blob/main/src/audio/speakers.js"
click node_master "https://github.com/lotter-35/soundstage3d/blob/main/src/audio/masterStage.js"
click node_mic "https://github.com/lotter-35/soundstage3d/blob/main/src/audio/microphone.js"
click node_sine "https://github.com/lotter-35/soundstage3d/blob/main/src/audio/sineGenerator.js"
click node_probes "https://github.com/lotter-35/soundstage3d/blob/main/src/audio/debugProbes.js"
click node_defaults "https://github.com/lotter-35/soundstage3d/blob/main/src/config/dsp-defaults.js"
click node_stage "https://github.com/lotter-35/soundstage3d/blob/main/src/scene/stage.js"
click node_listener "https://github.com/lotter-35/soundstage3d/blob/main/src/scene/listener.js"
click node_character "https://github.com/lotter-35/soundstage3d/blob/main/src/scene/character3D.js"
click node_skybox "https://github.com/lotter-35/soundstage3d/blob/main/src/scene/skybox.js"
click node_vegetation "https://github.com/lotter-35/soundstage3d/blob/main/src/scene/vegetation.js"
click node_controls "https://github.com/lotter-35/soundstage3d/blob/main/src/ui/controls.js"
click node_drag "https://github.com/lotter-35/soundstage3d/blob/main/src/ui/draggable.js"
click node_tooltips "https://github.com/lotter-35/soundstage3d/blob/main/src/config/dsp-tooltips.js"
click node_storage "https://github.com/lotter-35/soundstage3d/blob/main/src/audio/audioStorage.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main toneBlue
class node_engine,node_input,node_crossover,node_effects,node_speakers,node_master,node_mic,node_sine,node_probes,node_defaults toneAmber
class node_stage,node_listener,node_character,node_skybox,node_vegetation toneMint
class node_controls,node_drag,node_tooltips toneRose
class node_storage,node_user toneIndigo
```

## Components

### Application orchestration

- [App runtime](https://github.com/lotter-35/soundstage3d/blob/main/src/main.js): `src/main.js`

### Audio and DSP

- [Audio engine](https://github.com/lotter-35/soundstage3d/blob/main/src/audio/audioEngine.js): `src/audio/audioEngine.js`
- [Input processing](https://github.com/lotter-35/soundstage3d/blob/main/src/audio/inputStage.js): `src/audio/inputStage.js`
- [Four-way crossover](https://github.com/lotter-35/soundstage3d/blob/main/src/audio/crossover.js): `src/audio/crossover.js`
- [Bus effects](https://github.com/lotter-35/soundstage3d/blob/main/src/audio/effects.js): `src/audio/effects.js`
- [Speaker array](https://github.com/lotter-35/soundstage3d/blob/main/src/audio/speakers.js): `src/audio/speakers.js`
- [Master output](https://github.com/lotter-35/soundstage3d/blob/main/src/audio/masterStage.js): `src/audio/masterStage.js`
- [Microphone input](https://github.com/lotter-35/soundstage3d/blob/main/src/audio/microphone.js): `src/audio/microphone.js`
- [Sine test source](https://github.com/lotter-35/soundstage3d/blob/main/src/audio/sineGenerator.js): `src/audio/sineGenerator.js`
- [Audio diagnostics](https://github.com/lotter-35/soundstage3d/blob/main/src/audio/debugProbes.js): `src/audio/debugProbes.js`
- [DSP defaults](https://github.com/lotter-35/soundstage3d/blob/main/src/config/dsp-defaults.js): `src/config/dsp-defaults.js`

### 3D festival

- [Stage geometry](https://github.com/lotter-35/soundstage3d/blob/main/src/scene/stage.js): `src/scene/stage.js`
- [Listener movement](https://github.com/lotter-35/soundstage3d/blob/main/src/scene/listener.js): `src/scene/listener.js`
- [Animated character](https://github.com/lotter-35/soundstage3d/blob/main/src/scene/character3D.js): `src/scene/character3D.js`
- [Skybox](https://github.com/lotter-35/soundstage3d/blob/main/src/scene/skybox.js): `src/scene/skybox.js`
- [Vegetation](https://github.com/lotter-35/soundstage3d/blob/main/src/scene/vegetation.js): `src/scene/vegetation.js`

### Controls and analysis

- [DSP controls](https://github.com/lotter-35/soundstage3d/blob/main/src/ui/controls.js): `src/ui/controls.js`
- [Draggable panels](https://github.com/lotter-35/soundstage3d/blob/main/src/ui/draggable.js): `src/ui/draggable.js`
- [DSP tooltips](https://github.com/lotter-35/soundstage3d/blob/main/src/config/dsp-tooltips.js): `src/config/dsp-tooltips.js`

### Persistence

- [Track persistence](https://github.com/lotter-35/soundstage3d/blob/main/src/audio/audioStorage.js): `src/audio/audioStorage.js`

### Other components

- **Listener**

## Connections

- Listener → App runtime: loads audio (evidence: `README.md`)
- App runtime → Audio engine: controls playback (evidence: `src/main.js`)
- App runtime → Input processing: initializes DSP (evidence: `src/main.js`)
- App runtime → Four-way crossover: configures DSP (evidence: `src/main.js`)
- App runtime → Speaker array: configures array (evidence: `src/main.js`)
- App runtime → Bus effects: configures effects (evidence: `src/main.js`)
- App runtime → Microphone input: initializes input (evidence: `src/main.js`)
- App runtime → Sine test source: selects test source (evidence: `src/main.js`)
- App runtime → Audio diagnostics: uses diagnostics (evidence: `src/main.js`)
- App runtime → Stage geometry: creates scene (evidence: `src/main.js`)
- App runtime → Listener movement: creates listener (evidence: `src/main.js`)
- App runtime → Skybox: creates and updates (evidence: `src/main.js`)
- App runtime → Vegetation: creates and updates (evidence: `src/main.js`)
- App runtime → DSP controls: initializes controls (evidence: `src/main.js`)
- App runtime → Track persistence: loads and saves (evidence: `src/main.js`)
- Audio engine → Input processing: plays into
- Speaker array → Master output: feeds output (evidence: `src/audio/speakers.js`)
- Speaker array → Bus effects: creates reflections (evidence: `src/audio/speakers.js`)
- Listener movement → Animated character: manages (evidence: `src/scene/listener.js`)
- DSP controls → Draggable panels: makes panels draggable (evidence: `src/ui/controls.js`)
- DSP controls → DSP tooltips: displays guidance (evidence: `src/ui/controls.js`)
- DSP controls → DSP defaults: uses parameter defaults (evidence: `src/ui/controls.js`)
