# fichl/neuralampmodelerplugin architecture

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

- Interactive diagram: https://gitdiagram.com/fichl/neuralampmodelerplugin
- Repository: https://github.com/fichl/neuralampmodelerplugin

## Overview

#### Purpose and Entry Points
Neural Amp Modeler is a native real-time audio processor: a VST3/AudioUnit plug-in and standalone app that runs Neural Amp Modeler amp/cab-style models. The primary implementation entry points are `NeuralAmpModeler/NeuralAmpModeler.cpp` and `NeuralAmpModeler/NeuralAmpModeler.h`; platform/plugin targets select this code through `NeuralAmpModeler/projects/`.

#### Host and UI Integration
The plug-in is built on iPlug2, which supplies host callbacks, parameter/control plumbing, editor rendering, and standalone hosting. `NeuralAmpModeler/NeuralAmpModeler.cpp` binds the processor and UI; `NeuralAmpModeler/NeuralAmpModelerControls.h` defines custom controls; `NeuralAmpModeler/Colors.h` centralizes presentation styling. This layer is the boundary between DAW/app events and audio/model state.

#### Audio DSP Pipeline
The real-time audio callback owns the critical processing path: host input enters the plug-in, is processed through the loaded NAM model and associated tone controls, then is returned to the host output. `NeuralAmpModeler/ToneStack.cpp` and `NeuralAmpModeler/ToneStack.h` implement the tone-stack DSP stage. `NeuralAmpModeler/architecture.hpp` is an architecture-facing boundary around supported CPU/platform behavior. Real-time safety is materially distinct from UI, filesystem loading, and model parsing.

#### Model Loading and Core Dependency
Models are distributed as a `config.json` plus `weights.npy`, for example `Models/2022-11-14-01_rhythm/config.json` and `Models/2022-11-14-01_rhythm/weights.npy`. `NeuralAmpModeler/Unserialization.cpp` is the model-deserialization boundary, converting persisted model artifacts into runtime state. `NeuralAmpModelerCore` is the core dependency location, while the root `Models/` directory provides bundled/example model payloads. Model selection/loading should remain outside the audio thread; the audio path consumes an already-instantiated model.

#### Formats and Platform Targets
A shared product implementation is packaged for Windows and Apple targets. Windows project entry points include `NeuralAmpModeler/projects/NeuralAmpModeler-app.vcxproj` and `NeuralAmpModeler/projects/NeuralAmpModeler-vst3.vcxproj`; Apple builds use `NeuralAmpModeler/projects/NeuralAmpModeler-macOS.xcodeproj` and `NeuralAmpModeler/projects/NeuralAmpModeler-iOS.xcodeproj`. Resources declare AU, VST3, AAX, app, and AUv3 identities under `NeuralAmpModeler/resources/`, such as `NeuralAmpModeler/resources/NeuralAmpModeler-VST3-Info.plist`.

#### Build, Distribution, and Infrastructure
Native CI and release automation run in GitHub Actions: `.github/workflows/build-native.yml` and `.github/workflows/release-native.yml`. Per-platform scripts package binaries and prepare resources in `NeuralAmpModeler/scripts/`, including `NeuralAmpModeler/scripts/makedist-mac.sh` and `NeuralAmpModeler/scripts/makedist-win.bat`. Windows installer production is defined by `NeuralAmpModeler/installer/NeuralAmpModeler.iss`. Development is container-capable through `.devcontainer/Dockerfile`.

#### Repository Boundaries
`NeuralAmpModeler/` is the production NAM product. `TemplateProject/` is an iPlug2-style template/reference project, not the primary runtime. `REAPER/` contains DAW-oriented sample assets/project material. Third-party/framework sources are represented by `iPlug2/`, `eigen/`, and the core/model dependency directories; changes to those interfaces affect processor integration rather than product UI alone.

Main entry points: [`NeuralAmpModeler/NeuralAmpModeler.cpp`](https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/NeuralAmpModeler.cpp) (Processor and UI binding), [`NeuralAmpModeler/NeuralAmpModeler.h`](https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/NeuralAmpModeler.h) (Real-time audio callback), [`.github/workflows/build-native.yml`](https://github.com/fichl/neuralampmodelerplugin/blob/main/.github/workflows/build-native.yml) (Native build CI), [`NeuralAmpModeler/Unserialization.cpp`](https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/Unserialization.cpp) (Model deserialization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_product["Product runtime"]
  node_iplug2{{"iPlug2 host framework"}}
  node_processor["Processor and UI binding<br/>native entry point"]
  node_controls["Custom controls<br/>UI controls"]
  node_colors["Presentation styling<br/>UI styling<br/>[Colors.h]"]
  node_audio["Real-time audio callback<br/>DSP pipeline<br/>[NeuralAmpModeler.h]"]
  node_tone["Tone stack<br/>DSP stage<br/>[ToneStack.cpp]"]
  node_platform["CPU/platform boundary<br/>architecture boundary<br/>[architecture.hpp]"]
end

subgraph group_models["Model loading"]
  node_unserialization["Model deserialization<br/>loading boundary"]
  node_core{{"NAM core<br/>model runtime dependency"}}
  node_config["Model config<br/>model artifact<br/>[config.json]"]
  node_weights["Model weights<br/>model artifact<br/>[weights.npy]"]
end

subgraph group_targets["Targets and distribution"]
  node_windows["Windows app and VST3<br/>Windows project targets"]
  node_apple["macOS and iOS targets<br/>Apple project targets"]
  node_format_resources["Format identities<br/>plug-in resources"]
  node_packaging["Platform packaging<br/>distribution scripts<br/>[makedist-mac.sh]"]
  node_installer["Windows installer<br/>installer definition"]
end

subgraph group_automation["Automation"]
  node_build_ci["Native build CI<br/>GitHub Actions workflow<br/>[build-native.yml]"]
  node_release_ci["Native release CI<br/>GitHub Actions workflow<br/>[release-native.yml]"]
  node_container["Development container<br/>development environment<br/>[Dockerfile]"]
end

node_iplug2 -->|"hosts"| node_processor
node_processor -->|"renders"| node_controls
node_processor -->|"styles with"| node_colors
node_processor -->|"drives"| node_audio
node_audio -->|"processes through"| node_tone
node_audio -->|"runs model"| node_core
node_platform -.->|"constrains"| node_audio
node_config -->|"loads"| node_unserialization
node_weights -->|"loads"| node_unserialization
node_unserialization -->|"instantiates"| node_core
node_windows -->|"builds"| node_processor
node_apple -->|"builds"| node_processor
node_format_resources -.->|"identifies"| node_windows
node_format_resources -.->|"identifies"| node_apple
node_build_ci -->|"builds"| node_windows
node_build_ci -->|"builds"| node_apple
node_release_ci -->|"runs"| node_packaging
node_packaging -->|"produces Windows package"| node_installer
node_container -.->|"supports native development"| node_build_ci

click node_iplug2 "https://github.com/fichl/neuralampmodelerplugin/tree/main/iPlug2"
click node_processor "https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/NeuralAmpModeler.cpp"
click node_controls "https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/NeuralAmpModelerControls.h"
click node_colors "https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/Colors.h"
click node_audio "https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/NeuralAmpModeler.h"
click node_tone "https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/ToneStack.cpp"
click node_platform "https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/architecture.hpp"
click node_unserialization "https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/Unserialization.cpp"
click node_core "https://github.com/fichl/neuralampmodelerplugin/tree/main/NeuralAmpModelerCore"
click node_config "https://github.com/fichl/neuralampmodelerplugin/blob/main/Models/2022-11-14-01_rhythm/config.json"
click node_weights "https://github.com/fichl/neuralampmodelerplugin/blob/main/Models/2022-11-14-01_rhythm/weights.npy"
click node_windows "https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/projects/NeuralAmpModeler-vst3.vcxproj"
click node_apple "https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/projects/NeuralAmpModeler-macOS.xcodeproj"
click node_format_resources "https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/resources/NeuralAmpModeler-VST3-Info.plist"
click node_packaging "https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/scripts/makedist-mac.sh"
click node_installer "https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/installer/NeuralAmpModeler.iss"
click node_build_ci "https://github.com/fichl/neuralampmodelerplugin/blob/main/.github/workflows/build-native.yml"
click node_release_ci "https://github.com/fichl/neuralampmodelerplugin/blob/main/.github/workflows/release-native.yml"
click node_container "https://github.com/fichl/neuralampmodelerplugin/blob/main/.devcontainer/Dockerfile"

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_iplug2,node_processor,node_controls,node_colors,node_audio,node_tone,node_platform toneBlue
class node_unserialization,node_core,node_config,node_weights toneAmber
class node_windows,node_apple,node_format_resources,node_packaging,node_installer toneMint
class node_build_ci,node_release_ci,node_container toneRose
```

## Components

### Product runtime

Shared plug-in and standalone implementation.

- [iPlug2 host framework](https://github.com/fichl/neuralampmodelerplugin/tree/main/iPlug2): framework · Provides host callbacks, parameters, editor plumbing, and standalone hosting. · `iPlug2`
- [Processor and UI binding](https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/NeuralAmpModeler.cpp): native entry point · Connects host events, UI state, and real-time processing. · `NeuralAmpModeler/NeuralAmpModeler.cpp`
- [Custom controls](https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/NeuralAmpModelerControls.h): UI controls · `NeuralAmpModeler/NeuralAmpModelerControls.h`
- [Presentation styling](https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/Colors.h): UI styling · `NeuralAmpModeler/Colors.h`
- [Real-time audio callback](https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/NeuralAmpModeler.h): DSP pipeline · Consumes an already-instantiated model and returns processed audio. · `NeuralAmpModeler/NeuralAmpModeler.h`
- [Tone stack](https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/ToneStack.cpp): DSP stage · `NeuralAmpModeler/ToneStack.cpp`
- [CPU/platform boundary](https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/architecture.hpp): architecture boundary · `NeuralAmpModeler/architecture.hpp`

### Model loading

Persisted NAM models become runtime state off the audio thread.

- [Model deserialization](https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/Unserialization.cpp): loading boundary · Creates runtime model state outside the audio thread. · `NeuralAmpModeler/Unserialization.cpp`
- [NAM core](https://github.com/fichl/neuralampmodelerplugin/tree/main/NeuralAmpModelerCore): model runtime dependency · `NeuralAmpModelerCore`
- [Model config](https://github.com/fichl/neuralampmodelerplugin/blob/main/Models/2022-11-14-01_rhythm/config.json): model artifact · `Models/2022-11-14-01_rhythm/config.json`
- [Model weights](https://github.com/fichl/neuralampmodelerplugin/blob/main/Models/2022-11-14-01_rhythm/weights.npy): model artifact · `Models/2022-11-14-01_rhythm/weights.npy`

### Targets and distribution

Platform builds package the shared product.

- [Windows app and VST3](https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/projects/NeuralAmpModeler-vst3.vcxproj): Windows project targets · `NeuralAmpModeler/projects/NeuralAmpModeler-vst3.vcxproj`
- [macOS and iOS targets](https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/projects/NeuralAmpModeler-macOS.xcodeproj): Apple project targets · `NeuralAmpModeler/projects/NeuralAmpModeler-macOS.xcodeproj`
- [Format identities](https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/resources/NeuralAmpModeler-VST3-Info.plist): plug-in resources · Declares AU, VST3, AAX, app, and AUv3 identities. · `NeuralAmpModeler/resources/NeuralAmpModeler-VST3-Info.plist`
- [Platform packaging](https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/scripts/makedist-mac.sh): distribution scripts · `NeuralAmpModeler/scripts/makedist-mac.sh`
- [Windows installer](https://github.com/fichl/neuralampmodelerplugin/blob/main/NeuralAmpModeler/installer/NeuralAmpModeler.iss): installer definition · `NeuralAmpModeler/installer/NeuralAmpModeler.iss`

### Automation

CI and release tooling build and ship native artifacts.

- [Native build CI](https://github.com/fichl/neuralampmodelerplugin/blob/main/.github/workflows/build-native.yml): GitHub Actions workflow · `.github/workflows/build-native.yml`
- [Native release CI](https://github.com/fichl/neuralampmodelerplugin/blob/main/.github/workflows/release-native.yml): GitHub Actions workflow · `.github/workflows/release-native.yml`
- [Development container](https://github.com/fichl/neuralampmodelerplugin/blob/main/.devcontainer/Dockerfile): development environment · `.devcontainer/Dockerfile`

## Connections

- iPlug2 host framework → Processor and UI binding: hosts
- Processor and UI binding → Custom controls: renders
- Processor and UI binding → Presentation styling: styles with
- Processor and UI binding → Real-time audio callback: drives
- Real-time audio callback → Tone stack: processes through
- Real-time audio callback → NAM core: runs model
- CPU/platform boundary → Real-time audio callback: constrains
- Model config → Model deserialization: loads
- Model weights → Model deserialization: loads
- Model deserialization → NAM core: instantiates
- Windows app and VST3 → Processor and UI binding: builds
- macOS and iOS targets → Processor and UI binding: builds
- Format identities → Windows app and VST3: identifies
- Format identities → macOS and iOS targets: identifies
- Native build CI → Windows app and VST3: builds
- Native build CI → macOS and iOS targets: builds
- Native release CI → Platform packaging: runs
- Platform packaging → Windows installer: produces Windows package
- Development container → Native build CI: supports native development
