# mattromano/feedback-desktop architecture

> Architecture diagram of the GitHub repository mattromano/feedback-desktop, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mattromano/feedback-desktop
- Repository: https://github.com/mattromano/feedback-desktop

## Overview

feedBack is an Electron desktop rhythm game expanded for Rock Band/Guitar Hero-style band play, alongside real-instrument play. The documented flow is: choose solo or band play, configure players and inputs, select a playable song, confirm parts and difficulty, then play and review results. The graph also shows desktop/audio infrastructure and plugin support. Game modes and several subsystems are documented but not represented by sampled implementation excerpts; those links rely on the README or are omitted where wiring is unclear.

Main entry points: [`src/main/main.ts`](https://github.com/mattromano/feedback-desktop/blob/custom/src/main/main.ts) (Electron main), [`src/audio/AudioEngine.cpp`](https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/AudioEngine.cpp) (Audio engine), [`src/audio/Sandbox/SandboxedProcessor.cpp`](https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/Sandbox/SandboxedProcessor.cpp) (Sandbox processor), [`src/main/audio-bridge.ts`](https://github.com/mattromano/feedback-desktop/blob/custom/src/main/audio-bridge.ts) (Audio bridge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_play["Play experience"]
  node_play_ui["Play screens<br/>[screen.js]"]
  node_band_setup["Band setup<br/>[screen.js]"]
  node_song_library["Song library<br/>[screen.js]"]
  node_instrument_modes["Instrument modes<br/>[screen.js]"]
  node_scoring_results["Scoring and results<br/>[screen.js]"]
end

subgraph group_desktop["Desktop services"]
  node_main_process["Electron main<br/>[main.ts]"]
  node_audio_bridge["Audio bridge<br/>[audio-bridge.ts]"]
  node_python_server["Python server process<br/>[python.ts]"]
  node_plugin_manager["Plugin manager<br/>[plugin-manager.ts]"]
  node_soundfont_manager["Soundfont manager"]
  node_desktop_config[("Desktop settings<br/>[desktop-config.ts]")]
  node_updater["App updater<br/>[update-manager.ts]"]
end

subgraph group_audio["Audio runtime"]
  node_native_addon["Native audio addon<br/>[AddonContext.cpp]"]
  node_audio_engine["Audio engine<br/>[AudioEngine.cpp]"]
  node_device_setup["Device setup<br/>[DeviceSetup.cpp]"]
  node_signal_chain["Signal chain<br/>[SignalChain.cpp]"]
  node_detection["Note detection<br/>[PitchDetector.cpp]"]
end

subgraph group_plugins["Plugin audio"]
  node_vst_host["VST host<br/>[VSTHost.cpp]"]
  node_sandbox_processor["Sandbox processor"]
  node_sandbox_protocol["Sandbox protocol<br/>[Protocol.h]"]
  node_audio_channel["Audio channel<br/>[AudioChannel.h]"]
  node_control_channel["Control channel<br/>[ControlChannel.h]"]
  node_vst_process["VST host process<br/>[main.cpp]"]
end

node_player(("Player"))

node_player -->|"chooses play"| node_play_ui
node_play_ui -->|"starts band"| node_band_setup
node_band_setup -->|"opens pick mode"| node_song_library
node_song_library -->|"selects song"| node_instrument_modes
node_instrument_modes -->|"plays and scores"| node_scoring_results
node_main_process -->|"starts and awaits"| node_python_server
node_main_process -->|"initializes"| node_audio_bridge
node_main_process -->|"initializes"| node_plugin_manager
node_main_process -->|"initializes"| node_soundfont_manager
node_main_process -->|"uses settings"| node_desktop_config
node_main_process -->|"initializes"| node_updater
node_audio_bridge -->|"invokes"| node_native_addon
node_audio_bridge -->|"reads settings"| node_desktop_config
node_plugin_manager -->|"restarts after changes"| node_python_server
node_soundfont_manager -->|"reads and writes"| node_desktop_config
node_soundfont_manager -->|"restarts after change"| node_python_server
node_native_addon -->|"owns engine"| node_audio_engine
node_audio_engine -.->|"configures devices"| node_device_setup
node_audio_engine -.->|"processes sources"| node_signal_chain
node_audio_engine -->|"enables detection"| node_detection
node_signal_chain -->|"uses processor"| node_sandbox_processor
node_native_addon -->|"owns host"| node_vst_host
node_vst_host -->|"loads out of process"| node_sandbox_processor
node_sandbox_processor -->|"sends control"| node_control_channel
node_sandbox_processor -->|"transfers audio"| node_audio_channel
node_control_channel -->|"uses wire format"| node_sandbox_protocol
node_audio_channel -->|"uses wire format"| node_sandbox_protocol
node_vst_process -->|"implements protocol"| node_sandbox_protocol

click node_play_ui "https://github.com/mattromano/feedback-desktop/blob/custom/src/renderer/screen.js"
click node_band_setup "https://github.com/mattromano/feedback-desktop/blob/custom/src/renderer/screen.js"
click node_song_library "https://github.com/mattromano/feedback-desktop/blob/custom/src/renderer/screen.js"
click node_instrument_modes "https://github.com/mattromano/feedback-desktop/blob/custom/src/renderer/screen.js"
click node_scoring_results "https://github.com/mattromano/feedback-desktop/blob/custom/src/renderer/screen.js"
click node_main_process "https://github.com/mattromano/feedback-desktop/blob/custom/src/main/main.ts"
click node_audio_bridge "https://github.com/mattromano/feedback-desktop/blob/custom/src/main/audio-bridge.ts"
click node_python_server "https://github.com/mattromano/feedback-desktop/blob/custom/src/main/python.ts"
click node_plugin_manager "https://github.com/mattromano/feedback-desktop/blob/custom/src/main/plugin-manager.ts"
click node_soundfont_manager "https://github.com/mattromano/feedback-desktop/blob/custom/src/main/soundfont-manager.ts"
click node_desktop_config "https://github.com/mattromano/feedback-desktop/blob/custom/src/main/desktop-config.ts"
click node_updater "https://github.com/mattromano/feedback-desktop/blob/custom/src/main/update-manager.ts"
click node_native_addon "https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/addon/AddonContext.cpp"
click node_audio_engine "https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/AudioEngine.cpp"
click node_device_setup "https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/engine/DeviceSetup.cpp"
click node_signal_chain "https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/SignalChain.cpp"
click node_detection "https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/PitchDetector.cpp"
click node_vst_host "https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/VSTHost.cpp"
click node_sandbox_processor "https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/Sandbox/SandboxedProcessor.cpp"
click node_sandbox_protocol "https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/Sandbox/Protocol.h"
click node_audio_channel "https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/Sandbox/AudioChannel.h"
click node_control_channel "https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/Sandbox/ControlChannel.h"
click node_vst_process "https://github.com/mattromano/feedback-desktop/blob/custom/src/vst-host/main.cpp"

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_play_ui,node_band_setup,node_song_library,node_instrument_modes,node_scoring_results toneBlue
class node_main_process,node_audio_bridge,node_python_server,node_plugin_manager,node_soundfont_manager,node_desktop_config,node_updater toneAmber
class node_native_addon,node_audio_engine,node_device_setup,node_signal_chain,node_detection toneMint
class node_vst_host,node_sandbox_processor,node_sandbox_protocol,node_audio_channel,node_control_channel,node_vst_process toneRose
class node_player toneIndigo
```

## Components

### Play experience

- [Play screens](https://github.com/mattromano/feedback-desktop/blob/custom/src/renderer/screen.js): `src/renderer/screen.js`
- [Band setup](https://github.com/mattromano/feedback-desktop/blob/custom/src/renderer/screen.js): `src/renderer/screen.js`
- [Song library](https://github.com/mattromano/feedback-desktop/blob/custom/src/renderer/screen.js): `src/renderer/screen.js`
- [Instrument modes](https://github.com/mattromano/feedback-desktop/blob/custom/src/renderer/screen.js): `src/renderer/screen.js`
- [Scoring and results](https://github.com/mattromano/feedback-desktop/blob/custom/src/renderer/screen.js): `src/renderer/screen.js`

### Desktop services

- [Electron main](https://github.com/mattromano/feedback-desktop/blob/custom/src/main/main.ts): `src/main/main.ts`
- [Audio bridge](https://github.com/mattromano/feedback-desktop/blob/custom/src/main/audio-bridge.ts): `src/main/audio-bridge.ts`
- [Python server process](https://github.com/mattromano/feedback-desktop/blob/custom/src/main/python.ts): `src/main/python.ts`
- [Plugin manager](https://github.com/mattromano/feedback-desktop/blob/custom/src/main/plugin-manager.ts): `src/main/plugin-manager.ts`
- [Soundfont manager](https://github.com/mattromano/feedback-desktop/blob/custom/src/main/soundfont-manager.ts): `src/main/soundfont-manager.ts`
- [Desktop settings](https://github.com/mattromano/feedback-desktop/blob/custom/src/main/desktop-config.ts): `src/main/desktop-config.ts`
- [App updater](https://github.com/mattromano/feedback-desktop/blob/custom/src/main/update-manager.ts): `src/main/update-manager.ts`

### Audio runtime

- [Native audio addon](https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/addon/AddonContext.cpp): `src/audio/addon/AddonContext.cpp`
- [Audio engine](https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/AudioEngine.cpp): `src/audio/AudioEngine.cpp`
- [Device setup](https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/engine/DeviceSetup.cpp): `src/audio/engine/DeviceSetup.cpp`
- [Signal chain](https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/SignalChain.cpp): `src/audio/SignalChain.cpp`
- [Note detection](https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/PitchDetector.cpp): `src/audio/PitchDetector.cpp`

### Plugin audio

- [VST host](https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/VSTHost.cpp): `src/audio/VSTHost.cpp`
- [Sandbox processor](https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/Sandbox/SandboxedProcessor.cpp): `src/audio/Sandbox/SandboxedProcessor.cpp`
- [Sandbox protocol](https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/Sandbox/Protocol.h): `src/audio/Sandbox/Protocol.h`
- [Audio channel](https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/Sandbox/AudioChannel.h): `src/audio/Sandbox/AudioChannel.h`
- [Control channel](https://github.com/mattromano/feedback-desktop/blob/custom/src/audio/Sandbox/ControlChannel.h): `src/audio/Sandbox/ControlChannel.h`
- [VST host process](https://github.com/mattromano/feedback-desktop/blob/custom/src/vst-host/main.cpp): `src/vst-host/main.cpp`

### Other components

- **Player**

## Connections

- Player → Play screens: chooses play
- Play screens → Band setup: starts band (evidence: `src/renderer/screen.js`)
- Band setup → Song library: opens pick mode (evidence: `src/renderer/screen.js`)
- Song library → Instrument modes: selects song (evidence: `src/renderer/screen.js`)
- Instrument modes → Scoring and results: plays and scores (evidence: `src/renderer/screen.js`)
- Electron main → Python server process: starts and awaits (evidence: `src/main/main.ts`)
- Electron main → Audio bridge: initializes (evidence: `src/main/main.ts`)
- Electron main → Plugin manager: initializes (evidence: `src/main/main.ts`)
- Electron main → Soundfont manager: initializes (evidence: `src/main/main.ts`)
- Electron main → Desktop settings: uses settings (evidence: `src/main/main.ts`)
- Electron main → App updater: initializes (evidence: `src/main/main.ts`)
- Audio bridge → Native audio addon: invokes (evidence: `src/main/audio-bridge.ts`)
- Audio bridge → Desktop settings: reads settings (evidence: `src/main/audio-bridge.ts`)
- Plugin manager → Python server process: restarts after changes (evidence: `src/main/plugin-manager.ts`)
- Soundfont manager → Desktop settings: reads and writes (evidence: `src/main/soundfont-manager.ts`)
- Soundfont manager → Python server process: restarts after change (evidence: `src/main/soundfont-manager.ts`)
- Native audio addon → Audio engine: owns engine
- Audio engine → Device setup: configures devices
- Audio engine → Signal chain: processes sources
- Audio engine → Note detection: enables detection (evidence: `src/audio/AudioEngine.cpp`)
- Signal chain → Sandbox processor: uses processor (evidence: `src/audio/SignalChain.cpp`)
- Native audio addon → VST host: owns host
- VST host → Sandbox processor: loads out of process
- Sandbox processor → Control channel: sends control (evidence: `src/audio/Sandbox/SandboxedProcessor.cpp`)
- Sandbox processor → Audio channel: transfers audio (evidence: `src/audio/Sandbox/SandboxedProcessor.cpp`)
- Control channel → Sandbox protocol: uses wire format (evidence: `src/audio/Sandbox/ControlChannel.h`)
- Audio channel → Sandbox protocol: uses wire format (evidence: `src/audio/Sandbox/AudioChannel.h`)
- VST host process → Sandbox protocol: implements protocol (evidence: `src/vst-host/main.cpp`)
