# airiharuki/webvst architecture

> Architecture diagram of the GitHub repository airiharuki/webvst, 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/airiharuki/webvst
- Repository: https://github.com/airiharuki/webvst

## Overview

SPECTRA.OSC is a browser-based additive/wavetable synthesizer with live keyboard performance, sound design controls, factory presets, generative sequencing, and real-time waveform/FFT displays. The main workflow runs from the workstation UI through the audio engine to browser audio output; the sequencer can also trigger notes through that engine. The graph reflects the README and shown excerpts/index references. Some UI callback wiring and DSP internals were not fully excerpted, so uncertain connections are omitted.

Main entry points: [`src/App.tsx`](https://github.com/airiharuki/webvst/blob/main/src/App.tsx) (Workstation Shell), [`src/components/OscillatorControls.tsx`](https://github.com/airiharuki/webvst/blob/main/src/components/OscillatorControls.tsx) (Oscillator Controls), [`src/components/FilterControls.tsx`](https://github.com/airiharuki/webvst/blob/main/src/components/FilterControls.tsx) (Filter And ADSR), [`src/lib/audioEngine.ts`](https://github.com/airiharuki/webvst/blob/main/src/lib/audioEngine.ts) (Web Audio DSP Engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workstation["Workstation UI"]
  node_bootstrap["React Bootstrap<br/>[main.tsx]"]
  node_app["Workstation Shell<br/>[App.tsx]"]
  node_osccontrols["Oscillator Controls"]
  node_filtercontrols["Filter And ADSR<br/>[FilterControls.tsx]"]
  node_knob["Rotary Knob<br/>[Knob.tsx]"]
  node_visualizer["Wave And FFT Display<br/>[WaveVisualizer.tsx]"]
end

subgraph group_synthesis["Audio Synthesis"]
  node_engine["Web Audio DSP Engine<br/>[audioEngine.ts]"]
  node_output(("Browser Audio Output"))
end

subgraph group_sequencing["Performance And Sequencing"]
  node_midicontrols["Piano And Sequencer UI<br/>[MidiControls.tsx]"]
  node_generator["MIDI Pattern Generator<br/>[midiGenerator.ts]"]
end

subgraph group_shared["Shared Data"]
  node_presets["Factory Presets<br/>[presets.ts]"]
  node_contracts["Synth Parameter Types<br/>[types.ts]"]
end

node_performer(("Performer"))

node_performer -->|"opens workstation"| node_bootstrap
node_bootstrap -->|"renders"| node_app
node_app -->|"initializes"| node_engine
node_app -->|"initializes"| node_generator
node_app -->|"loads presets"| node_presets
node_app -->|"presents controls"| node_osccontrols
node_app -->|"presents controls"| node_filtercontrols
node_app -->|"presents controls"| node_midicontrols
node_app -->|"presents display"| node_visualizer
node_performer -->|"edits sound"| node_osccontrols
node_performer -->|"edits filter"| node_filtercontrols
node_performer -->|"plays or configures"| node_midicontrols
node_osccontrols -->|"uses"| node_knob
node_filtercontrols -->|"uses"| node_knob
node_midicontrols -->|"uses"| node_knob
node_generator -->|"triggers notes"| node_engine
node_visualizer -->|"reads analyser"| node_engine
node_engine -->|"routes audio"| node_output
node_app -->|"uses parameters"| node_contracts
node_osccontrols -->|"uses parameters"| node_contracts
node_filtercontrols -->|"uses parameters"| node_contracts
node_generator -->|"reads scales"| node_presets
node_presets -->|"defines preset data"| node_contracts

click node_bootstrap "https://github.com/airiharuki/webvst/blob/main/src/main.tsx"
click node_app "https://github.com/airiharuki/webvst/blob/main/src/App.tsx"
click node_osccontrols "https://github.com/airiharuki/webvst/blob/main/src/components/OscillatorControls.tsx"
click node_filtercontrols "https://github.com/airiharuki/webvst/blob/main/src/components/FilterControls.tsx"
click node_knob "https://github.com/airiharuki/webvst/blob/main/src/components/Knob.tsx"
click node_visualizer "https://github.com/airiharuki/webvst/blob/main/src/components/WaveVisualizer.tsx"
click node_midicontrols "https://github.com/airiharuki/webvst/blob/main/src/components/MidiControls.tsx"
click node_engine "https://github.com/airiharuki/webvst/blob/main/src/lib/audioEngine.ts"
click node_generator "https://github.com/airiharuki/webvst/blob/main/src/lib/midiGenerator.ts"
click node_presets "https://github.com/airiharuki/webvst/blob/main/src/data/presets.ts"
click node_contracts "https://github.com/airiharuki/webvst/blob/main/src/types.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_bootstrap,node_app,node_osccontrols,node_filtercontrols,node_knob,node_visualizer toneBlue
class node_engine,node_output toneAmber
class node_midicontrols,node_generator toneMint
class node_presets,node_contracts toneRose
class node_performer toneIndigo
```

## Components

### Workstation UI

- [React Bootstrap](https://github.com/airiharuki/webvst/blob/main/src/main.tsx): `src/main.tsx`
- [Workstation Shell](https://github.com/airiharuki/webvst/blob/main/src/App.tsx): `src/App.tsx`
- [Oscillator Controls](https://github.com/airiharuki/webvst/blob/main/src/components/OscillatorControls.tsx): `src/components/OscillatorControls.tsx`
- [Filter And ADSR](https://github.com/airiharuki/webvst/blob/main/src/components/FilterControls.tsx): `src/components/FilterControls.tsx`
- [Rotary Knob](https://github.com/airiharuki/webvst/blob/main/src/components/Knob.tsx): `src/components/Knob.tsx`
- [Wave And FFT Display](https://github.com/airiharuki/webvst/blob/main/src/components/WaveVisualizer.tsx): `src/components/WaveVisualizer.tsx`

### Audio Synthesis

- [Web Audio DSP Engine](https://github.com/airiharuki/webvst/blob/main/src/lib/audioEngine.ts): `src/lib/audioEngine.ts`
- **Browser Audio Output**

### Performance And Sequencing

- [Piano And Sequencer UI](https://github.com/airiharuki/webvst/blob/main/src/components/MidiControls.tsx): `src/components/MidiControls.tsx`
- [MIDI Pattern Generator](https://github.com/airiharuki/webvst/blob/main/src/lib/midiGenerator.ts): `src/lib/midiGenerator.ts`

### Shared Data

- [Factory Presets](https://github.com/airiharuki/webvst/blob/main/src/data/presets.ts): `src/data/presets.ts`
- [Synth Parameter Types](https://github.com/airiharuki/webvst/blob/main/src/types.ts): `src/types.ts`

### Other components

- **Performer**

## Connections

- Performer → React Bootstrap: opens workstation (evidence: `README.md`)
- React Bootstrap → Workstation Shell: renders (evidence: `src/main.tsx`)
- Workstation Shell → Web Audio DSP Engine: initializes (evidence: `src/App.tsx`)
- Workstation Shell → MIDI Pattern Generator: initializes (evidence: `src/App.tsx`)
- Workstation Shell → Factory Presets: loads presets (evidence: `src/App.tsx`)
- Workstation Shell → Oscillator Controls: presents controls (evidence: `src/App.tsx`)
- Workstation Shell → Filter And ADSR: presents controls (evidence: `src/App.tsx`)
- Workstation Shell → Piano And Sequencer UI: presents controls (evidence: `src/App.tsx`)
- Workstation Shell → Wave And FFT Display: presents display (evidence: `src/App.tsx`)
- Performer → Oscillator Controls: edits sound (evidence: `README.md`)
- Performer → Filter And ADSR: edits filter (evidence: `README.md`)
- Performer → Piano And Sequencer UI: plays or configures (evidence: `README.md`)
- Oscillator Controls → Rotary Knob: uses (evidence: `src/components/OscillatorControls.tsx`)
- Filter And ADSR → Rotary Knob: uses (evidence: `src/components/FilterControls.tsx`)
- Piano And Sequencer UI → Rotary Knob: uses (evidence: `src/components/MidiControls.tsx`)
- MIDI Pattern Generator → Web Audio DSP Engine: triggers notes (evidence: `src/lib/midiGenerator.ts`)
- Wave And FFT Display → Web Audio DSP Engine: reads analyser (evidence: `src/components/WaveVisualizer.tsx`)
- Web Audio DSP Engine → Browser Audio Output: routes audio (evidence: `README.md`)
- Workstation Shell → Synth Parameter Types: uses parameters (evidence: `src/App.tsx`)
- Oscillator Controls → Synth Parameter Types: uses parameters (evidence: `src/components/OscillatorControls.tsx`)
- Filter And ADSR → Synth Parameter Types: uses parameters (evidence: `src/components/FilterControls.tsx`)
- MIDI Pattern Generator → Factory Presets: reads scales (evidence: `src/lib/midiGenerator.ts`)
- Factory Presets → Synth Parameter Types: defines preset data (evidence: `src/data/presets.ts`)
