# rainbow686/gesture-synth-weld architecture

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

- Interactive diagram: https://gitdiagram.com/rainbow686/gesture-synth-weld
- Repository: https://github.com/rainbow686/gesture-synth-weld

## Overview

Gesture Synth Weld is a browser-based hand-tracking chord synthesizer. The main workflow is: a player starts the instrument, chooses camera or keyboard input, shapes harmony and expression, hears synthesized audio, and can record and save a take locally. App.tsx is the sampled runtime orchestrator; the README documents additional playing modes and recording capabilities whose detailed implementation is not fully shown in the excerpts. Edges cite the README or the source that shows the relationship; unsampled details are not inferred.

Main entry points: [`src/App.tsx`](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/App.tsx) (App Orchestrator), [`src/recording/useRecording.ts`](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/recording/useRecording.ts) (Recording Flow), [`src/audioEngine.ts`](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/audioEngine.ts) (Audio Engine), [`src/components/SettingsPanel.tsx`](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/components/SettingsPanel.tsx) (Instrument Settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_play["Play and Input"]
  node_app["App Orchestrator<br/>[App.tsx]"]
  node_camera["Camera Input<br/>[cameraSource.ts]"]
  node_keyboard["Keyboard Input<br/>[keyboardSource.ts]"]
  node_keymap["Key Bindings<br/>[keymap.ts]"]
  node_tracker["Hand Tracker<br/>[handTracker.ts]"]
end

subgraph group_sound["Harmony and Sound"]
  node_chords["Chord Theory<br/>[chords.ts]"]
  node_audio["Audio Engine<br/>[audioEngine.ts]"]
end

subgraph group_record["Recording and Gallery"]
  node_recording["Recording Flow<br/>[useRecording.ts]"]
  node_rec_ui["Recording Sheet<br/>[RecSheet.tsx]"]
  node_rec_frames["Recording Compositor<br/>[recording.ts]"]
  node_rec_utils["Recording Utilities<br/>[utils.ts]"]
  node_works_ui["Works Gallery<br/>[WorksPanel.tsx]"]
  node_works_store[("Local Works Store<br/>[workStore.ts]")]
end

subgraph group_interface["Interface and Signals"]
  node_settings["Instrument Settings<br/>[SettingsPanel.tsx]"]
  node_hud["Live HUD<br/>[draw.ts]"]
  node_waveform["Waveform Display<br/>[waveform.ts]"]
  node_help["Guides and Help<br/>[HelpModal.tsx]"]
  node_analytics["Analytics Events<br/>[analytics.ts]"]
end

node_player(("Player"))
node_web_audio(("Browser Audio"))
node_analytics_services["Analytics Services"]

node_player -->|"starts and plays"| node_app
node_app -->|"selects input"| node_camera
node_app -->|"selects input"| node_keyboard
node_keyboard -->|"uses bindings"| node_keymap
node_camera -->|"tracks hands"| node_tracker
node_app -->|"consumes gestures"| node_tracker
node_app -->|"controls sound"| node_audio
node_audio -->|"gets chord frequencies"| node_chords
node_audio -->|"synthesizes audio"| node_web_audio
node_player -->|"configures instrument"| node_settings
node_app -->|"renders settings"| node_settings
node_app -->|"draws live display"| node_hud
node_app -->|"renders waveform"| node_waveform
node_player -->|"records a take"| node_recording
node_app -->|"manages recording"| node_recording
node_app -->|"renders recording sheet"| node_rec_ui
node_recording -->|"composes frames"| node_rec_frames
node_recording -->|"makes cover art"| node_rec_utils
node_rec_ui -->|"loads and deletes works"| node_works_store
node_recording -->|"saves finished works"| node_works_store
node_player -->|"views recordings"| node_works_ui
node_app -->|"renders gallery"| node_works_ui
node_app -->|"opens help"| node_help
node_app -->|"tracks interactions"| node_analytics
node_settings -->|"tracks changes"| node_analytics
node_analytics -->|"sends events"| node_analytics_services

click node_app "https://github.com/rainbow686/gesture-synth-weld/blob/main/src/App.tsx"
click node_camera "https://github.com/rainbow686/gesture-synth-weld/blob/main/src/input/cameraSource.ts"
click node_keyboard "https://github.com/rainbow686/gesture-synth-weld/blob/main/src/input/keyboardSource.ts"
click node_keymap "https://github.com/rainbow686/gesture-synth-weld/blob/main/src/input/keymap.ts"
click node_tracker "https://github.com/rainbow686/gesture-synth-weld/blob/main/src/handTracker.ts"
click node_chords "https://github.com/rainbow686/gesture-synth-weld/blob/main/src/chords.ts"
click node_audio "https://github.com/rainbow686/gesture-synth-weld/blob/main/src/audioEngine.ts"
click node_settings "https://github.com/rainbow686/gesture-synth-weld/blob/main/src/components/SettingsPanel.tsx"
click node_hud "https://github.com/rainbow686/gesture-synth-weld/blob/main/src/hud/draw.ts"
click node_waveform "https://github.com/rainbow686/gesture-synth-weld/blob/main/src/hud/waveform.ts"
click node_recording "https://github.com/rainbow686/gesture-synth-weld/blob/main/src/recording/useRecording.ts"
click node_rec_ui "https://github.com/rainbow686/gesture-synth-weld/blob/main/src/recording/RecSheet.tsx"
click node_rec_frames "https://github.com/rainbow686/gesture-synth-weld/blob/main/src/hud/recording.ts"
click node_rec_utils "https://github.com/rainbow686/gesture-synth-weld/blob/main/src/recording/utils.ts"
click node_works_ui "https://github.com/rainbow686/gesture-synth-weld/blob/main/src/components/WorksPanel.tsx"
click node_works_store "https://github.com/rainbow686/gesture-synth-weld/blob/main/src/works/workStore.ts"
click node_help "https://github.com/rainbow686/gesture-synth-weld/blob/main/src/components/HelpModal.tsx"
click node_analytics "https://github.com/rainbow686/gesture-synth-weld/blob/main/src/analytics.ts"

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_app,node_camera,node_keyboard,node_keymap,node_tracker,node_web_audio toneBlue
class node_chords,node_audio toneAmber
class node_recording,node_rec_ui,node_rec_frames,node_rec_utils,node_works_ui,node_works_store toneMint
class node_settings,node_hud,node_waveform,node_help,node_analytics toneRose
class node_player,node_analytics_services toneIndigo
```

## Components

### Play and Input

- [App Orchestrator](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/App.tsx): `src/App.tsx`
- [Camera Input](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/input/cameraSource.ts): `src/input/cameraSource.ts`
- [Keyboard Input](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/input/keyboardSource.ts): `src/input/keyboardSource.ts`
- [Key Bindings](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/input/keymap.ts): `src/input/keymap.ts`
- [Hand Tracker](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/handTracker.ts): `src/handTracker.ts`

### Harmony and Sound

- [Chord Theory](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/chords.ts): `src/chords.ts`
- [Audio Engine](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/audioEngine.ts): `src/audioEngine.ts`

### Recording and Gallery

- [Recording Flow](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/recording/useRecording.ts): `src/recording/useRecording.ts`
- [Recording Sheet](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/recording/RecSheet.tsx): `src/recording/RecSheet.tsx`
- [Recording Compositor](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/hud/recording.ts): `src/hud/recording.ts`
- [Recording Utilities](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/recording/utils.ts): `src/recording/utils.ts`
- [Works Gallery](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/components/WorksPanel.tsx): `src/components/WorksPanel.tsx`
- [Local Works Store](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/works/workStore.ts): `src/works/workStore.ts`

### Interface and Signals

- [Instrument Settings](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/components/SettingsPanel.tsx): `src/components/SettingsPanel.tsx`
- [Live HUD](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/hud/draw.ts): `src/hud/draw.ts`
- [Waveform Display](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/hud/waveform.ts): `src/hud/waveform.ts`
- [Guides and Help](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/components/HelpModal.tsx): `src/components/HelpModal.tsx`
- [Analytics Events](https://github.com/rainbow686/gesture-synth-weld/blob/main/src/analytics.ts): `src/analytics.ts`

### Other components

- **Player**
- **Browser Audio**
- **Analytics Services**

## Connections

- Player → App Orchestrator: starts and plays (evidence: `README.md`)
- App Orchestrator → Camera Input: selects input (evidence: `src/App.tsx`)
- App Orchestrator → Keyboard Input: selects input (evidence: `src/App.tsx`)
- Keyboard Input → Key Bindings: uses bindings (evidence: `src/input/keyboardSource.ts`)
- Camera Input → Hand Tracker: tracks hands (evidence: `src/input/cameraSource.ts`)
- App Orchestrator → Hand Tracker: consumes gestures (evidence: `src/App.tsx`)
- App Orchestrator → Audio Engine: controls sound (evidence: `README.md`)
- Audio Engine → Chord Theory: gets chord frequencies (evidence: `src/audioEngine.ts`)
- Audio Engine → Browser Audio: synthesizes audio (evidence: `README.md`)
- Player → Instrument Settings: configures instrument (evidence: `README.md`)
- App Orchestrator → Instrument Settings: renders settings (evidence: `src/App.tsx`)
- App Orchestrator → Live HUD: draws live display (evidence: `src/App.tsx`)
- App Orchestrator → Waveform Display: renders waveform (evidence: `src/App.tsx`)
- Player → Recording Flow: records a take (evidence: `README.md`)
- App Orchestrator → Recording Flow: manages recording (evidence: `src/App.tsx`)
- App Orchestrator → Recording Sheet: renders recording sheet (evidence: `src/App.tsx`)
- Recording Flow → Recording Compositor: composes frames (evidence: `src/recording/useRecording.ts`)
- Recording Flow → Recording Utilities: makes cover art (evidence: `src/recording/useRecording.ts`)
- Recording Sheet → Local Works Store: loads and deletes works (evidence: `src/recording/RecSheet.tsx`)
- Recording Flow → Local Works Store: saves finished works (evidence: `src/recording/useRecording.ts`)
- Player → Works Gallery: views recordings (evidence: `README.md`)
- App Orchestrator → Works Gallery: renders gallery (evidence: `src/components/WorksPanel.tsx`)
- App Orchestrator → Guides and Help: opens help (evidence: `src/App.tsx`)
- App Orchestrator → Analytics Events: tracks interactions (evidence: `src/App.tsx`)
- Instrument Settings → Analytics Events: tracks changes (evidence: `src/components/SettingsPanel.tsx`)
- Analytics Events → Analytics Services: sends events (evidence: `src/analytics.ts`)
