How fichl/neuralampmodelerplugin works
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.cpp Processor and UI binding · NeuralAmpModeler.h Real-time audio callback · build-native.yml Native build CI · Unserialization.cpp Model deserialization
Components 19
Product runtime
Shared plug-in and standalone implementation.
- iPlug2 host framework · Provides host callbacks, parameters, editor plumbing, and standalone hosting.
iPlug2 - Processor and UI binding · Connects host events, UI state, and real-time processing.
NeuralAmpModeler/NeuralAmpModeler.cpp - Custom controls
NeuralAmpModeler/NeuralAmpModelerControls.h - Presentation styling
NeuralAmpModeler/Colors.h - Real-time audio callback · Consumes an already-instantiated model and returns processed audio.
NeuralAmpModeler/NeuralAmpModeler.h - Tone stack
NeuralAmpModeler/ToneStack.cpp - CPU/platform boundary
NeuralAmpModeler/architecture.hpp
Model loading
Persisted NAM models become runtime state off the audio thread.
- Model deserialization · Creates runtime model state outside the audio thread.
NeuralAmpModeler/Unserialization.cpp - NAM core
NeuralAmpModelerCore - Model config
Models/2022-11-14-01_rhythm/config.json - Model weights
Models/2022-11-14-01_rhythm/weights.npy
Targets and distribution
Platform builds package the shared product.
- Windows app and VST3
NeuralAmpModeler/projects/NeuralAmpModeler-vst3.vcxproj - macOS and iOS targets
NeuralAmpModeler/projects/NeuralAmpModeler-macOS.xcodeproj - Format identities · Declares AU, VST3, AAX, app, and AUv3 identities.
NeuralAmpModeler/resources/NeuralAmpModeler-VST3-Info.plist - Platform packaging
NeuralAmpModeler/scripts/makedist-mac.sh - Windows installer
NeuralAmpModeler/installer/NeuralAmpModeler.iss
Automation
CI and release tooling build and ship native artifacts.
- Native build CI
.github/workflows/build-native.yml - Native release CI
.github/workflows/release-native.yml - Development container
.devcontainer/Dockerfile
Connections 19
- 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