# robert0-ch1/chorda architecture

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

- Interactive diagram: https://gitdiagram.com/robert0-ch1/chorda
- Repository: https://github.com/robert0-ch1/chorda

## Overview

Chorda is a JUCE virtual-string synthesizer plugin and standalone instrument. The host supplies MIDI and parameter automation; the processor prepares voice parameters, renders the string voices, and applies output processing before returning audio. Its editor exposes the controls and string visualization, while preset management supports built-in and user presets. The README documents excitation, string damping, modulation, voice modes, and output effects; sampled source confirms the main processor-to-synth path, but not every internal DSP handoff, so uncertain links are omitted.

Main entry points: [`Source/PluginProcessor.cpp`](https://github.com/robert0-ch1/chorda/blob/main/Source/PluginProcessor.cpp) (Plugin processor), [`Source/PluginEditor.cpp`](https://github.com/robert0-ch1/chorda/blob/main/Source/PluginEditor.cpp) (Plugin editor), [`Source/Presets/PresetManager.cpp`](https://github.com/robert0-ch1/chorda/blob/main/Source/Presets/PresetManager.cpp) (Preset manager), [`Source/DSP/KarplusVoice.cpp`](https://github.com/robert0-ch1/chorda/blob/main/Source/DSP/KarplusVoice.cpp) (String voice)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_audio["Audio engine"]
  node_processor["Plugin processor"]
  node_synth["Voice allocator<br/>[PluckSynth.h]"]
  node_voice["String voice<br/>[KarplusVoice.cpp]"]
  node_sound["Synth sound<br/>[KarplusSound.h]"]
  node_output["Output effects"]
  node_width["Stereo widener<br/>[StereoWidener.h]"]
end

subgraph group_params["Controls and modulation"]
  node_parameters["Parameter definitions<br/>[Parameters.h]"]
  node_modulation["LFO and voice controls"]
end

subgraph group_presets["Preset management"]
  node_presetmanager["Preset manager<br/>[PresetManager.cpp]"]
  node_factory["Factory presets<br/>[FactoryPresets.cpp]"]
  node_userpresets["User preset files<br/>[PresetManager.cpp]"]
end

subgraph group_interface["User interface"]
  node_editor["Plugin editor<br/>[PluginEditor.cpp]"]
  node_stringview["String visualization<br/>[StringView.cpp]"]
  node_presetbar["Preset controls<br/>[PresetBar.cpp]"]
  node_look["Widget styling"]
end

node_host(("DAW / host"))

node_host -->|"sends MIDI"| node_processor
node_host -->|"automates parameters"| node_processor
node_processor -->|"renders notes"| node_synth
node_processor -->|"registers sound"| node_sound
node_processor -->|"sets parameters"| node_voice
node_synth -->|"allocates voices"| node_voice
node_processor -->|"processes output"| node_output
node_output -->|"applies width"| node_width
node_parameters -->|"defines controls"| node_processor
node_processor -->|"prepares modulation"| node_modulation
node_modulation -->|"supplies modulation"| node_voice
node_processor -->|"creates editor"| node_editor
node_editor -->|"displays string"| node_stringview
node_editor -->|"hosts controls"| node_presetbar
node_editor -->|"uses styling"| node_look
node_presetbar -->|"browses presets"| node_presetmanager
node_presetmanager -->|"loads built-ins"| node_factory
node_presetmanager -->|"reads and writes"| node_userpresets

click node_processor "https://github.com/robert0-ch1/chorda/blob/main/Source/PluginProcessor.cpp"
click node_synth "https://github.com/robert0-ch1/chorda/blob/main/Source/DSP/PluckSynth.h"
click node_voice "https://github.com/robert0-ch1/chorda/blob/main/Source/DSP/KarplusVoice.cpp"
click node_sound "https://github.com/robert0-ch1/chorda/blob/main/Source/DSP/KarplusSound.h"
click node_output "https://github.com/robert0-ch1/chorda/blob/main/Source/PluginProcessor.cpp"
click node_width "https://github.com/robert0-ch1/chorda/blob/main/Source/DSP/StereoWidener.h"
click node_parameters "https://github.com/robert0-ch1/chorda/blob/main/Source/Parameters.h"
click node_modulation "https://github.com/robert0-ch1/chorda/blob/main/Source/PluginProcessor.cpp"
click node_editor "https://github.com/robert0-ch1/chorda/blob/main/Source/PluginEditor.cpp"
click node_stringview "https://github.com/robert0-ch1/chorda/blob/main/Source/UI/StringView.cpp"
click node_presetbar "https://github.com/robert0-ch1/chorda/blob/main/Source/UI/PresetBar.cpp"
click node_look "https://github.com/robert0-ch1/chorda/blob/main/Source/UI/PluckLookAndFeel.cpp"
click node_presetmanager "https://github.com/robert0-ch1/chorda/blob/main/Source/Presets/PresetManager.cpp"
click node_factory "https://github.com/robert0-ch1/chorda/blob/main/Source/Presets/FactoryPresets.cpp"
click node_userpresets "https://github.com/robert0-ch1/chorda/blob/main/Source/Presets/PresetManager.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_processor,node_synth,node_voice,node_sound,node_output,node_width toneBlue
class node_parameters,node_modulation toneAmber
class node_presetmanager,node_factory,node_userpresets toneMint
class node_editor,node_stringview,node_presetbar,node_look toneRose
class node_host toneIndigo
```

## Components

### Audio engine

- [Plugin processor](https://github.com/robert0-ch1/chorda/blob/main/Source/PluginProcessor.cpp): `Source/PluginProcessor.cpp`
- [Voice allocator](https://github.com/robert0-ch1/chorda/blob/main/Source/DSP/PluckSynth.h): `Source/DSP/PluckSynth.h`
- [String voice](https://github.com/robert0-ch1/chorda/blob/main/Source/DSP/KarplusVoice.cpp): `Source/DSP/KarplusVoice.cpp`
- [Synth sound](https://github.com/robert0-ch1/chorda/blob/main/Source/DSP/KarplusSound.h): `Source/DSP/KarplusSound.h`
- [Output effects](https://github.com/robert0-ch1/chorda/blob/main/Source/PluginProcessor.cpp): `Source/PluginProcessor.cpp`
- [Stereo widener](https://github.com/robert0-ch1/chorda/blob/main/Source/DSP/StereoWidener.h): `Source/DSP/StereoWidener.h`

### Controls and modulation

- [Parameter definitions](https://github.com/robert0-ch1/chorda/blob/main/Source/Parameters.h): `Source/Parameters.h`
- [LFO and voice controls](https://github.com/robert0-ch1/chorda/blob/main/Source/PluginProcessor.cpp): `Source/PluginProcessor.cpp`

### Preset management

- [Preset manager](https://github.com/robert0-ch1/chorda/blob/main/Source/Presets/PresetManager.cpp): `Source/Presets/PresetManager.cpp`
- [Factory presets](https://github.com/robert0-ch1/chorda/blob/main/Source/Presets/FactoryPresets.cpp): `Source/Presets/FactoryPresets.cpp`
- [User preset files](https://github.com/robert0-ch1/chorda/blob/main/Source/Presets/PresetManager.cpp): `Source/Presets/PresetManager.cpp`

### User interface

- [Plugin editor](https://github.com/robert0-ch1/chorda/blob/main/Source/PluginEditor.cpp): `Source/PluginEditor.cpp`
- [String visualization](https://github.com/robert0-ch1/chorda/blob/main/Source/UI/StringView.cpp): `Source/UI/StringView.cpp`
- [Preset controls](https://github.com/robert0-ch1/chorda/blob/main/Source/UI/PresetBar.cpp): `Source/UI/PresetBar.cpp`
- [Widget styling](https://github.com/robert0-ch1/chorda/blob/main/Source/UI/PluckLookAndFeel.cpp): `Source/UI/PluckLookAndFeel.cpp`

### Other components

- **DAW / host**

## Connections

- DAW / host → Plugin processor: sends MIDI (evidence: `Source/PluginProcessor.cpp`)
- DAW / host → Plugin processor: automates parameters
- Plugin processor → Voice allocator: renders notes (evidence: `Source/PluginProcessor.cpp`)
- Plugin processor → Synth sound: registers sound (evidence: `Source/PluginProcessor.cpp`)
- Plugin processor → String voice: sets parameters (evidence: `Source/PluginProcessor.cpp`)
- Voice allocator → String voice: allocates voices (evidence: `Source/DSP/PluckSynth.h`)
- Plugin processor → Output effects: processes output (evidence: `Source/PluginProcessor.cpp`)
- Output effects → Stereo widener: applies width
- Parameter definitions → Plugin processor: defines controls
- Plugin processor → LFO and voice controls: prepares modulation (evidence: `Source/PluginProcessor.cpp`)
- LFO and voice controls → String voice: supplies modulation (evidence: `Source/PluginProcessor.cpp`)
- Plugin processor → Plugin editor: creates editor (evidence: `Source/PluginProcessor.cpp`)
- Plugin editor → String visualization: displays string
- Plugin editor → Preset controls: hosts controls
- Plugin editor → Widget styling: uses styling
- Preset controls → Preset manager: browses presets
- Preset manager → Factory presets: loads built-ins (evidence: `Source/Presets/PresetManager.cpp`)
- Preset manager → User preset files: reads and writes (evidence: `Source/Presets/PresetManager.cpp`)
