NAM-Plug is a high-performance, ultra-low latency CLAP (CLever Audio Plug-in) audio plugin for real-time Neural Amp Modeler (NAM) simulation on Linux DAWs (Bitwig Studio, REAPER, Fender Studio Pro, etc.).
Powered directly by the NeuralAmpModeler-rs neural DSP engine, NAM-Plug brings world-class guitar amplifier and pedal modeling into modern Linux music productionβcombining strict zero-allocation real-time safety, SIMD AVX2/FMA vectorization, sub-millisecond audio determinism, and dual-oracle bit-exact fidelity.
Whether tracking live guitar with sub-millisecond roundtrip latency or producing dense, multi-track studio sessions, NAM-Plug delivers uncompromising sonic accuracy and rock-solid stability.
-
Pristine Tone & Proven Parity: Validated against canonical C++ NAMCore and double-precision
$f64$ oracles ($>136.4\text{ dB}$ SNR for WaveNet,$>150.3\text{ dB}$ for ConvNet). - Hard Real-Time Determinism: Zero heap allocations, zero locks, and zero blocking syscalls on the audio thread. No dropouts, audio glitches, or xruns.
- Modern Linux DAW Native: Native CLAP 1.2+ implementation featuring a hardware-accelerated Slint GUI with native X11 XEmbed host panel embedding, sample-accurate automation, dynamic latency compensation (PDC), and zero-friction Flatpak extension support.
The hardware-accelerated Slint interface running inside a Linux DAW. Organized into five ergonomic zones:
-
Asset Selection & Identity (Left Panel): Load
.nam/.nambneural amp models in the AMP MODEL card and either.wavspeaker cabinet impulse responses (IRs) or 1-in/1-out.nam/.nambneural cabinet models in the exclusive CABINET card (with selectablePeak/Preserved/LegacyIR level policy and independentON/BYPcabinet bypass), accompanied by the SIMD badge (AVX2+FMA) and version info. -
Analog Gain, Gate, Calibration & Quality Stages (Center Panel): Input trim (
$-20\text{ to }+20\text{ dB}$ ), Output level ($-40\text{ to }+20\text{ dB}$ ), integrated noise gate ($-90\text{ to }0\text{ dB}$ ,"OFF"at-90.0 dB) with selectable topology (Silblock-RMS silence gate orMusC++-reference quadratic downward expander) and dynamic LED indicator, anti-aliasing oversampling (Off,2Γ,4Γ), activation precision (StdvsFast), Input Calibration (CAL INtoggle +-60.0 to +60.0 dBustepper), and Output Mode (Raw/Norm/Cal). -
Dual-Stage Precision Metering: Dual stereo/mono input (post-trim, pre-model) and output (post-gain) level meters with simultaneous IEC 60268-10 Type I quasi-peak ballistics, solid inner EWMA RMS cores (
$\tau = 300\text{ ms}$ ), 2-second peak-hold bars, and independent latching IN CLIP / OUT CLIP indicators with click-to-reset. -
Master Bypass: Hardware toggle switch transitioning cleanly between
DSP ACTIVEandBYPASSvia a 64-sample click-free crossfade. -
Real-Time Telemetry Bar (Footer): Live status reporting sample rate (
SR), buffer size (BUF), latency (LAT), channel layout (CH), DSP load percentage (% DSPwith overload/XRUN alert LED and tooltip), contextual alert pill, and window backend.
-
Pure Rust & Strict Real-Time Determinism: Inherits the hard real-time safety guarantees of
NeuralAmpModeler-rs. The audio processing callback performs zero heap allocations, zero heap deallocations, and zero mutex locks (audited viaCountingAllocator). Dropped models, IRs, and oversampling buffers retire asynchronously through a 3-tier lock-free SPSC garbage-collection cascade (SPSC queue β 16-slot parking lot β overflow ring buffer) with rollback guards. -
SIMD AVX2 Vectorization & Zero-Vtable Dispatch: Enforces the
x86-64-v3(AVX2/FMA/BMI2) instruction set baseline. Compute kernels employ tap-major memory layouts andsum0..sum3instruction-level parallelism unrolling. Static monomorphization viadispatch_simd!eliminates virtual function tables (vtables) and indirect function pointers from the audio path. -
Dual-Oracle Numerical Parity: Formally certified against canonical C++ NAMCore (
$f32$ ) and double-precision ($f64$ ) mathematical oracles across 52 baseline envelopes (defined in the core engine'sdocs/quality-contract_x86_zen3_laptop.json). Typical WaveNet models achieve ESR$< 2.31 \times 10^{-14}$ (SNR$> 136.4\text{ dB}$ , MR-STFT$< 6.5 \times 10^{-6}$ ), while ConvNet achieves ESR$< 9.33 \times 10^{-16}$ (SNR$> 150.3\text{ dB}$ ). -
Native CLAP 1.2+ Standard Integration: Built directly upon the
clackframework, exposing a clean, translation-free CLAP implementation. Fully supports sample-accurate parameter automation across 18 host parameters, project state persistence (StateEnvelopev3 JSON serialization with SHA-256 asset verification), host latency reporting with dynamic PDC (clap_plugin_latency), 16 host extensions (audio-ports,audio-ports-config,audio-ports-config-info,audio-ports-activation,params,state,state-context,latency,track-info,remote-controls,param-indication,preset-load,render,tail,timer-support,gui), and a CLAP Preset Discovery factory supporting bothLocation::FileandLocation::Plugin. - Hardware-Accelerated Slint GUI with Native X11 Embedding: Declarative user interface rendered via FemtoVG / OpenGL with native X11 XEmbed host panel embedding into Bitwig Studio and REAPER, plus X11 floating and experimental Wayland floating window support. A dedicated event-loop thread polls lock-free atomic view models at 60 Hz (relaxing to 30 Hz in silence) with 0% audio thread overhead.
-
Complete Integrated Tone Pipeline: Includes a native 256-phase minimum-phase Kaiser sinc resampler (
$0.7\text{β}1.3\text{ Β΅s}$ execution,$>105\text{ dB}$ stopband, 0 pre-ringing) adapting any model sample rate to host rates (44.1, 48, 96, 192 kHz), an exclusive cabinet slot supporting Uniform-Partitioned Overlap-Save (UPOLS) FFT.wavIR convolution ($1.3\text{ Β΅s}$ for 512-sample IRs) or 1-in/1-out.nam/.nambneural cabinet models with independent latency-aligned bypass, selectableSilence/Musicalnoise gate, input calibration/output normalization modes, a 5 Hz post-IR DC blocker, a zero-latency output safety limiter (Off/Clamp/SoftClip), polyphase half-band oversampling (2Γ/4Γ), and branchless crossfaded master bypass (64-sample ramp, about 1.3 ms at 48 kHz). -
Binary
.nambv2 Container Support: Loads pre-transposed binary models (Gate-Major LSTM, Interleaved-4 WaveNet) with IEEE 802.3 CRC32 integrity validation, slashing model loading and hot-swap times from$\sim 50\text{ ms}$ to$< 1\text{ ms}$ . -
Sandbox-Ready Dual-Stack Flatpak Extension: Distributed as an official Flatpak extension (
org.freedesktop.LinuxAudio.Plugins.NAMPlug) targeting both26.08(canonical) and25.08(compatibility)org.freedesktop.LinuxAudio.BaseExtensionbranches simultaneously, providing automatic discovery in sandboxed DAWs (Fender Studio Pro, Bitwig Studio, REAPER) without compromising filesystem security.
| Feature / Attribute | Technical Implementation | Benefit & Impact |
|---|---|---|
| Inference Topologies | WaveNet (A1/A2), LSTM (1- & 2-layer, multi-I/O), ConvNet, Linear FIR/FFT, Sequential | Comprehensive NAM model coverage with native Rust execution speed |
| Plugin Standard | Native CLAP 1.2+ via clack-plugin & clack-extensions
|
Zero translation layer; sample-accurate automation, dynamic PDC, and full state saving |
| RT Determinism | Zero heap alloc/free, zero mutex locks, 3-tier lock-free GC cascade | Deterministic, dropout-free audio under sub-millisecond buffer sizes (32β64 samples) |
| SIMD Acceleration | Mandatory x86-64-v3 (AVX2/FMA) baseline; static dispatch_simd! dispatch |
WaveNet Standard β 41.8 Β΅s / LSTM 1Γ16 β 6.8 Β΅s per 64-sample block (Ryzen 7 5700U) |
| Dual-Oracle Parity | Validated against C++ NAMCore ( |
Bit-exact fidelity ( |
| Native Polyphase Resampler | 256 phases Γ 64 taps Kaiser sinc resampler (minimum-phase cepstrum) | Pristine multi-rate conversion (>105 dB stopband, < 0.05 dB ripple) in 0.7β1.3 Β΅s |
| Exclusive Cabinet Slot | UPOLS FFT convolution (.wav IR) or 1Γ1 neural cabinet (.nam/.namb); IrLevelPolicy; PARAM_CAB_BYPASS
|
Ultra-low-overhead cabinet simulation ( |
| Anti-Aliasing Oversampling | Half-band polyphase FIR filters (Off, 2x exp., 4x exp., >100 dB stopband) |
Attenuates non-linear foldover; fixed-rate models shift timbre until SRI oversampling lands |
| Activation Precision |
Standard (exact Taylor minimax) vs Fast (PadΓ© polynomial approximations) |
User-selectable balance between floating-point precision (+89.5 dB SNR) and CPU cycles |
| Signal Conditioning | Loudness-normalized IR policy; 5 Hz f64 DC blocker; Off/Clamp/SoftClip output limiter; smoothed gains |
Musical, click-free chain with explicit DC removal and safe output headroom |
| Graphical User Interface | Slint 1.19 declarative UI (FemtoVG/OpenGL via winit) |
Native X11 XEmbed embedding, X11/Wayland floating fallback (Wayland experimental), 60/30 Hz dual IN/OUT VU metering |
| Denormal Armor | Symmetric β220 dBFS dither injection + hardware MXCSR FTZ/DAZ | Eliminates 10β100Γ CPU microcode penalties during digital silence with zero net DC drift |
| Bypass Crossfader | 64-sample crossfade ramp (about 1.3 ms at 48 kHz) with branchless FMA loop & phase compensation | Smooth, pop-free transitions with zero phase cancellation |
| Dynamic Latency (PDC) | Cold-path cached effective latency with dynamic clap_plugin_latency
|
Instant host Plugin Delay Compensation with 0 per-block audio thread overhead |
Binary .namb v2 Format |
Pre-transposed memory layout (Gate-Major LSTM, Interleaved-4 WaveNet) with CRC32 | Reduces model loading and DAW track hot-swap time from ~50 ms to |
| Flatpak Extension |
org.freedesktop.LinuxAudio.Plugins.NAMPlug (dual-stack 26.08 & 25.08) |
Seamless loading in sandboxed Flatpak DAWs without host filesystem holes |
| Release Optimization | A/B ceremony (ab-opt-ceremony.sh) gating PGO / optional BOLT, codegen guard & receipt chain |
Empirical optimization promotion, zero-alloc/div codegen checks, and cryptographic SHA-256 certification |
| Architecture | Supported Configurations | Dynamic Fallback | Notes |
|---|---|---|---|
| WaveNet A1 | Standard (CH=16), Lite (12), Feather (8), Nano (4) | WaveNetModelDyn |
Dilated causal 1D convs, gated tanh/sigmoid |
| WaveNet A2 | Full (CH=8), Lite (CH=3), Cascade | WaveNetA2Dyn |
Headroom-optimized modern NAM architecture |
| LSTM | 10 profiles: 1-layer (hidden 3β40), 2-layer (hidden 8β24) | LstmModelDyn |
Pre-transposed gate-major SIMD GEMV kernels; multi-I/O |
| ConvNet | Causal Conv1D + BatchNorm1D + activation | β | Fast feed-forward models; grouped conv & multi-I/O |
| Linear | Direct FIR or Partitioned FFT convolution | β | Clean tone equalization & linear filters |
| Sequential | Composite multi-stage pipeline | β | Serial composition of arbitrary supported models |
| Slimmable | Multi-submodel bundles with runtime quality transitions | β | Adaptive compute bundles with dynamic crossfading |
Accuracy is strictly enforced against two co-equal reference oracles across 52 model baselines (defined in the core engine's quality-contract_x86_zen3_laptop.json):
-
Canonical C++ NAMCore Reference (
$f32$ ): Verifies bit-exact behavioral parity across WaveNet, LSTM, ConvNet, and Linear models. -
Double-Precision Reference (
$f64$ ): Quantifies numerical ideality and eliminates floating-point rounding divergence.
| Architecture / Model | Error-to-Signal Ratio (ESR) | Signal-to-Noise Ratio (SNR) | Multi-Resolution STFT |
|---|---|---|---|
| WaveNet Standard | |||
| WaveNet A2 | |||
| ConvNet ReLU | |||
| LSTM 1-Layer |
All models satisfy spectral convergence and LUFS loudness constancy invariants, ensuring identical tone and frequency response compared to reference captures.
Execution times measured per 64-sample block at 48 kHz (x86-64-v3 AVX2 baseline, rustc 1.99.0):
| Component / Profile | Execution Time | RT Budget Used | Theoretical Tracks per Core |
|---|---|---|---|
| WaveNet Standard (CH=16) | 41.8 Β΅s | 3.1% | ~31 tracks |
| WaveNet Lite (CH=12) | 57.2 Β΅s | 4.3% | ~23 tracks |
| WaveNet Feather (CH=8) | 20.1 Β΅s | 1.5% | ~66 tracks |
| WaveNet Nano (CH=4) | 18.3 Β΅s | 1.4% | ~72 tracks |
| WaveNet A2 Full (CH=8) | 19.8 Β΅s | 1.5% | ~67 tracks |
| WaveNet A2 Lite (CH=3) | 14.0 Β΅s | 1.1% | ~95 tracks |
| LSTM 1-Layer (Hidden=16) | 6.8 Β΅s | 0.5% | ~195 tracks |
| LSTM 2-Layer (Hidden=8) | 7.6 Β΅s | 0.6% | ~175 tracks |
| ConvNet | 9.5 Β΅s | 0.7% | ~140 tracks |
| Linear FIR (RF=4 Direct) | 0.13 Β΅s | 0.01% | >1,000 tracks |
| DSP Resampler (44.1 β 48 kHz) | 1.3 Β΅s | 0.10% | >1,000 tracks |
| Cabinet IR Convolver (UPOLS 512) | 1.3 Β΅s | 0.10% | >1,000 tracks |
| Full Pipeline Base (Model + CabSim) | 42.8 Β΅s | 3.2% | ~31 tracks |
| Full Pipeline HQ (Model + CabSim + 4Γ OS) | 174.4 Β΅s | 13.1% | ~7 tracks |
In addition to core DSP benchmarks, the distributed release artifact (~/.clap/nam_plug.clap) undergoes automated real-time certification via nam_perf_guard certify under realistic DAW host conditions (event queues, parameter smoothing, crossfading, buffer routing) using the build selected by the empirical A/B optimization ceremony (utils/ab-opt-ceremony.sh, promoting PGO / optional LLVM-BOLT only when proven):
| Host Scenario / Topology | Block Size | p50 Latency | p99 Latency | Deadline Budget | Budget Used (p50 / p99) | Headroom | Certification Status |
|---|---|---|---|---|---|---|---|
| WaveNet A1 Standard | 64 samples | 102.2 Β΅s | 111.8 Β΅s | 1.33 ms | 7.7% / 8.4% | 90.1% | β PASS (Certified) |
| WaveNet A1 Standard | 128 samples | 201.4 Β΅s | 219.5 Β΅s | 2.67 ms | 7.6% / 8.2% | 90.3% | β PASS (Certified) |
| WaveNet A2 Slimmable | 64 samples | 49.9 Β΅s | 60.1 Β΅s | 1.33 ms | 3.7% / 4.5% | 94.7% | β PASS (Certified) |
| LSTM 1Γ3 | 64 samples | 12.4 Β΅s | 19.9 Β΅s | 1.33 ms | 0.9% / 1.5% | 98.2% | β PASS (Certified) |
| CLAP Passthrough (No Model) | 64 samples | 2.3 Β΅s | 2.4 Β΅s | 1.33 ms | 0.17% / 0.18% | 99.8% | β PASS (Certified) |
Tip
What This Means In Your DAW:
Even under worst-case p99 spikes with a heavy WaveNet A1 amplifier model, NAM-Plug consumes less than 8.4% of a 64-sample buffer deadline (
New to Neural Amp Modeler or guitar amp simulation? Here is everything you need to get up and running in minutes.
In guitar production, an authentic recorded amp tone consists of two distinct components:
- The Amplifier Head (
.nam/.nambfile): Captures the nonlinear tube saturation, distortion harmonics, EQ tone stack, and compression of the physical guitar amp or overdrive pedal. - The Speaker Cabinet (
.wavImpulse Response or 1Γ1.nam/.nambNeural Cabinet): Captures the acoustic frequency curve, cone resonance, microphone type, and placement of the physical speaker cabinet.
Important
Pair Your Amp Model with a Cab IR!
An amp model without a speaker cabinet IR will sound harsh and fizzy (like plugging an amp head directly into a PA mixer). Unless your .nam file is labeled as a "Full Rig" (which bundles both amp and cabinet), always load both a Model and a Cabinet IR.
- TONE3000: Thousands of curated community captures of boutique tube amps, vintage heads, bass rigs, and overdrive pedals.
- NeuralAmpModeler.com: The official home and model repository for the NAM ecosystem.
- Cabinet Stage (Single Exclusive Slot): Accepts either a standard 24-bit or 32-bit float mono
.wavspeaker impulse response (44.1 kHz, 48 kHz, or 96 kHz) via UPOLS convolution or a 1-in/1-out neural cabinet model (.nam/.namb, at unity gain, keeping a dedicated independent bypass toggle).
[Dry Guitar DI] β [INPUT Gain] β [GATE] β [Neural Model (.nam)] β [Cab Slot (.wav | .nam/.namb)] β [OUTPUT Gain] β [DAW Track]
- Insert NAM-Plug: Add NAM-Plug as an audio effect on your dry guitar or bass track. Set your audio interface gain so your guitar's strongest picking hits around -18 to -12 dBFS.
-
Load an Amp Model: Click
LOAD .NAMin the AMP MODEL card and select your.namor.nambfile. -
Load a Cabinet (.wav or .nam/.namb): Click
LOAD CABin the CABINET card and select either a.wavspeaker impulse response or a 1-in/1-out neural cabinet model (.nam/.namb) in the single exclusive slot (loading one asset atomically replaces any active cabinet asset, showing aWAV,NAM, orNAMBformat badge and disambiguatedparent/file.extlabel, while preserving the previous cabinet on failure).- For
.wavIRs, click the IR level policy badge (Peak/Preserved/Legacy) in the card header to choose between peak normalization (peak-normalized, default), 1:1 original WAV amplitude (preserved), or legacy C++ plugin level scaling (legacy-nam-plugin,$10^{-18/20} \times 48000 / f_s$ ). Neural cabinet models (.nam/.namb) ignore amp calibration andIrLevelPolicy, always running at unity gain (and add neural inference CPU/latency when active). - Click the cabinet
ON/BYPtoggle (PARAM_CAB_BYPASS) at any time to bypass only the cabinet stage with click-free 64-sample cosine crossfading and constant PDC latency.
- For
-
Dial in Gain Staging & Calibration:
- Adjust
INPUT($-20\text{ to }+20\text{ dB}$ , default0.0 dB) to feed the model the right amount of drive. - Adjust
OUTPUT($-40\text{ to }+20\text{ dB}$ , GUI default-3.0 dB, host parameter default0.0 dB) to balance levels with your overall mix. - Hold
Shiftwhile dragging or scrolling any knob for0.1Γfine-tuning, and double-click a knob to reset it to its default. - Toggle
CAL INand step thedBureference (-60.0to+60.0 dBu, default12.0 dBu) to align your audio interface's 0 dBFS headroom with model metadata, and chooseOut(Raw,Normdefault, orCal). - Watch the dual IN/OUT tricolor meters and click either
IN CLIPorOUT CLIPindicator to reset it if digital clipping occurs.
- Adjust
-
Set the Noise Gate: If your guitar pickups produce single-coil hum or high-gain hiss, turn the
GATEknob up from-90.0 dB("OFF"by default) until silence is reached between notes (GATE ACTIVEindicator). UseSil(default) for CPU-skipping silence shutoff after the IR, orMusfor continuous C++-reference quadratic downward expansion applied post-model / pre-CabSim IR so cabinet impulse tails decay naturally. -
Choose Oversampling:
-
Off(Live Mode): Pure zero added latency, perfect for real-time tracking and monitoring. -
2Γ/4Γ(Experimental): Attenuates non-linear aliasing foldover, but fixed-rate models shift timbre until Sample-Rate-Independent (SRI) oversampling is delivered.
-
-
Select Activation Math Mode:
-
Std(Standard / Default): Exact precision Taylor minimax math (+89.5 dB SNR). -
Fast: PadΓ© polynomial approximation, reducing CPU consumption on dense sessions.
-
- Bypass / Active: Toggle the Bypass switch at any time to audition your raw tone. Transitions use a 64-sample crossfade ramp (about 1.3 ms at 48 kHz) with no clicks or pops.
The footer displays instantaneous DSP telemetry polled at 60 Hz (relaxing to 30 Hz in silence):
| Readout | What It Means | Ideal Value / Behavior |
|---|---|---|
SR |
Current host sample rate | 44100 Hz, 48000 Hz, 96000 Hz |
BUF |
Quantum block size received from DAW | 64 spl, 128 spl, 256 spl |
LAT |
Latency added by the plugin | 0 spl (0.0 ms) in live mode (no IR/resampling/OS); updates dynamically for PDC |
CH |
Negotiated audio channel layout | Mono (Config 0) or Stereo (Config 1) |
% DSP |
% of audio deadline budget consumed | Typically 3% β 12%; red LED lights up if XRUN occurs |
ALERT |
Contextual diagnostic status pill | Blank in normal operation; displays fault/warning text |
BACKEND |
Active window display backend | X11 (Embedded), X11 (Floating), Wayland (Floating) |
NAM-Plug features a dual-stage input and output metering system designed for precise gain-staging:
-
Input Metering (IN): Tapped post-trim / pre-model (immediately after the input gain knob and smoother, before entering the noise gate and neural model). This allows the performer to gauge the actual drive level fed into the neural network, matching the canonical C++ reference input pointer (
mInputPointers). - Output Metering (OUT): Tapped post-gain / post-cabsim at the final stage before passing audio to the DAW host.
-
Ballistics & Visual Representation:
-
Peak Bar: Quasi-peak level with responsive exponential release (
BALLISTICS_DECAY_RATE = 0.962at 60 Hz, β 20 dB decay in ~1.0 s, tuned from IEC 60268-10 Type I ballistics), rendered as a semi-transparent outer bar. -
RMS Core: Continuous energy level smoothed via a single-pole leaky EWMA integrator with
$\tau = 300\text{ ms}$ (matchingIPeakAvgSenderballistics), rendered as a solid high-contrast inner bar. - Peak Hold: 2-second (120 frames at 60 Hz) floating marker with instant attack and smooth linear drop.
-
Digital Clip Indicators: Separate, latching
IN CLIPandOUT CLIPwarning buttons lighting up at$\ge 0.0\text{ dBFS}$ with touch/click reset.
-
Peak Bar: Quasi-peak level with responsive exponential release (
To maintain uncompromising real-time determinism, pristine modularity, and zero-allocation execution, certain features from legacy guitar plugins are omitted by deliberate engineering design:
- Omission of Integrated Tone Stack (EQ): Unlike all-in-one plugin suites, NAM-Plug deliberately omits an internal 3-band post-model tone stack (Bass/Mid/Treble). In professional digital audio workstation (DAW) workflows, tone shaping, parametric equalization, and dynamic notch filtering are best handled by dedicated, high-resolution EQ plugins (e.g., FabFilter Pro-Q, ReaEQ, or Bitwig EQ+) placed before or after NAM-Plug. Neural models captured from physical amplifiers already embody the exact tone stack settings dialed in during the capture session.
- Post-Cabinet DC Blocker (now included):
Starting with 1.3.0 (state v3) NAM-Plug inserts a transparent 5 Hz
f64TDF-II DC blocker after the cabinet and before output calibration, enabled by default and exposed as theDC BlockerCLAP parameter. It removes speaker/room DC without audible bass loss and without consuming host PDC.Output Limit(defaultOff) additionally offers a zero-latencySoftClip/Clampsafety stage; true-peak look-ahead remains a NAM-Audio-Pipe-only option so the plug-in never introduces hidden latency.
| Requirement | Specification | Verification Command |
|---|---|---|
| Operating System | Linux (Kernel |
uname -r |
| CPU Architecture |
x86_64 with AVX2/FMA/BMI2 (x86-64-v3 baseline); aarch64 (NEON) CI-validated |
lscpu |
| Rust Toolchain |
|
rustc --version |
| CLAP Host / DAW | Bitwig Studio, REAPER, Fender Studio Pro, etc. | Host application |
| System Libraries | Build tools, CMake, X11, OpenGL development headers | See command below |
MSRV Policy:
rust-version = "1.99.0"inCargo.tomlis the guaranteed public MSRV promise. The project builds and validates on stable Rust.
sudo apt update && sudo apt install -y build-essential pkg-config cmake libgl1-mesa-dev libx11-dev libxcursor-dev libxcb1-dev libxkbcommon-devFor running the full local lint, AppStream metadata, and headless GUI test suites (utils/lints.sh and utils/tests-long.sh), also install:
sudo apt install -y libxkbcommon-x11-dev libfontconfig1-dev binutils appstream xvfbNAM-Plug supports a dual-stack packaging architecture targeting both 26.08 and 25.08 runtime branches simultaneously:
# For modern DAWs on runtime 26.08 (e.g., Fender Studio Pro 8):
flatpak install --user --reinstall target/dist/nam-plug-1.3.0-linux-x86_64.flatpak
# For stable DAWs on runtime 25.08 (e.g., Bitwig Studio, REAPER):
flatpak install --user --reinstall target/dist/nam-plug-1.3.0-linux-x86_64-25.08.flatpakBoth branches can coexist side by side without conflicts:
flatpak list --runtime | grep NAMPlugCompatible DAWs automatically mount the matching branch at /app/extensions/Plugins/clap/nam_plug.clap on startup β no manual filesystem permissions or sandbox holes required.
To inspect the installed files per branch:
ls -la ~/.local/share/flatpak/runtime/org.freedesktop.LinuxAudio.Plugins.NAMPlug/x86_64/26.08/active/files/clap/
ls -la ~/.local/share/flatpak/runtime/org.freedesktop.LinuxAudio.Plugins.NAMPlug/x86_64/25.08/active/files/clap/To uninstall:
flatpak uninstall --user org.freedesktop.LinuxAudio.Plugins.NAMPlugNote
Host Memory Management:
On systems with constrained RAM, configure CARGO_BUILD_JOBS in your host shell profile (e.g. ~/.bashrc) to prevent memory exhaustion during parallel codegen.
[!NOTE]
Engine Dependency & Optional C++ Parity Checkout: NAM-Plug consumes NeuralAmpModeler-rs (4.1.0) directly from crates.io via Cargo.toml. No sibling checkout is needed to build or run cargo test --features testing. When running full C++ NAMCore parity tests (utils/tests-long.sh) without an external NAM_CORE_RENDER_BIN, clone the engine next to this repository at the commit pinned in variables.env (ENGINE_COMMIT):
git clone https://github.com/fabiohl/NeuralAmpModeler-rs ../NeuralAmpModeler-rs
git -C ../NeuralAmpModeler-rs checkout "$(sed -n 's/^ENGINE_COMMIT="\(.*\)"/\1/p' variables.env)"For native DAWs installed directly on your system:
# 1. Build the release shared library
cargo build --release
# 2. Install to your local user CLAP directory
mkdir -p ~/.clap
cp target/release/libnam_plug.so ~/.clap/nam_plug.clapTo preview the GUI standalone without opening a DAW:
cargo run --bin ui_previewFor maximum performance in live and studio environments, compile using the automated release pipeline, which follows the empirical A/B optimization ceremony (utils/ab-opt-ceremony.sh, applying PGO and optional LLVM-BOLT only when proven) and delivers canonical artifacts into target/dist/:
./utils/build-release.sh| Canonical Option | Purpose |
|---|---|
--package |
Generates distribution archive (.tar.zst) and dual-stack Flatpak bundles (26.08 & 25.08) |
--install |
Only with --certify: installs the verified nam_plug.clap to ~/.clap/ and declared Flatpak bundles |
--strict |
Enforces fail-closed mode: any optimization or verification gap aborts with exit code 1 |
--certify |
Does not compile; strictly validates and certifies canonical artifacts via receipts |
-h, --help |
Displays command-line help screen and exits |
The table below summarizes verified GUI presentation and host integration behavior across Linux host environments:
| Host / Session | Plugin GUI Support | Notes & Operational Behavior |
|---|---|---|
| Bitwig Studio (X11) | β Embedded (XEmbed) | Native X11 embedded GUI panel (default), sample-accurate automation, state save/restore, and offline bouncing. |
| REAPER (Native Linux, X11) | β Embedded (XEmbed) | Native X11 embedded GUI panel (default), parameter automation, dynamic PDC, and ultra-low latency playback. |
| X11 Hosts in General | β Embedded / Floating | Embedded via XEmbed or floating window, depending on host window negotiation (is_floating). |
| Fender Studio Pro 8.2 (Linux, Wayland) | Plugin GUI not available (host design decision): the host exclusively requests embedded Wayland (is_floating = false), does not negotiate floating windows for CLAP plugins, and uses its native generic parameter editor. Model selection and state restore work natively via CLAP_PRESET_DISCOVERY_LOCATION_PLUGIN and clap.state. |
|
| Wayland Hosts Requesting Floating Windows | π§ͺ Floating Window (Experimental) | Standalone floating window supported by the plugin code (is_floating = true), but classified as experimental due to the absence of a verified test host negotiating floating windows under Wayland. |
When running in a host or display server environment where the custom graphical interface is not displayed (such as Fender Studio Pro under native Wayland), NAM-Plug remains fully operational via the host's generic parameter controls and CLAP preset discovery:
- DSP Parameter Control (18 Parameters): All continuous, discrete, and bypass parameters are exposed to the host and can be automated, adjusted, or modulated directly from the generic parameter panel:
- Core Gain, Gate & Routing:
Input Gain(-24β¦+24 dB),Output Gain(-48β¦+24 dB),Gate Active,Gate Threshold(-70 dBdefault),Gate Mode(Musicaldefault),Bypass, andActive Model(read-only indicator). - Quality & Adaptive Compute:
Adaptive Compute,Slim Override,Oversampling,Activation Precision,DC Blocker(default on) andOutput Limit(default off). - Calibration & Cabinet Control:
Calibrate Input,Input Cal Level(0.1 dBu resolution),Output Mode,IR Level Policy(LoudnessNormalizeddefault), andCabinet Bypass.
- Core Gain, Gate & Routing:
- Remote-Control Pages: Hosts without the GUI get three eight-slot pages β Gain & Gate, Calibration & Cabinet and Quality & Protection.
- Model Selection in Generic Hosts:
- Place
.namor.nambmodel files (or symlinks) inside~/.nam/models. - NAM-Plug's CLAP preset discovery provider automatically adapts to the host indexer: hosts identifying as PreSonus/Fender receive
CLAP_PRESET_DISCOVERY_LOCATION_PLUGINentries with per-fileload_keymetadata, whereas Bitwig Studio and other standard hosts receiveCLAP_PRESET_DISCOVERY_LOCATION_FILE. Both location kinds are supported identically byclap_plugin_preset_load. - In Fender Studio Pro 8.2, all models in
~/.nam/modelsappear in the FX Browser (Effects > Fabio Lima > NAM-Plug) and in the generic editor's preset selector, and load asynchronously on selection. Adding new.nam/.nambfiles to~/.nam/modelsis picked up automatically when reopening the host (or immediately via Plug-in Manager β Update Plug-in List).
- Place
- Session Persistence & State Restores:
- When a DAW project (
.song), track template, or host preset (.clappreset) is saved, the host serializes the full plugin state (StateEnvelopev3, including the active amp model path, basename, and 64-character SHA-256 hash). - Upon reloading the session or track, NAM-Plug restores the exact model instance and parameters: it first checks the recorded absolute path, and if relocated, automatically searches
~/.nam/modelsfor a matching filename and SHA-256 checksum. - Full model-bearing session persistence (
.songsave, close, reopen, and embedded.clappresetstate with populatedmodel_path,model_basename, andmodel_hash) is verified in both X11 hosts and Fender Studio Pro 8.2.
- When a DAW project (
- Important Operational Boundaries:
- No Cross-DAW State Transfer (GAP-13): Serialized device presets or saved session chunks should not be expected to transfer seamlessly across different DAW hosts.
- Cabinet Slot Requires GUI (GAP-10): Selecting or swapping the file inside the exclusive Cabinet slot (a speaker cabinet
.wavimpulse response or a 1-in/1-out.nam/.nambneural cabinet model) still requires the custom graphical interface, because CLAP Preset Discovery selects the primary amp model. Sessions loaded without GUI preserve any previously serialized cabinet asset, and the independentCabinet Bypassparameter remains fully controllable and automatable from the generic host panel. - Model Directory Convention (
~/.nam/models): The~/.nam/modelsdirectory is a local user storage and symlink location for model files; the plugin does not crawl arbitrary directories on the host filesystem. - Flatpak Environments: When running sandboxed Flatpak DAWs, ensure models and cabinet assets are stored in directories accessible within the DAW's sandbox boundary (such as the user's home directory or
~/.nam/models).
The ./utils/ suite automates formatting, static analysis, parity verification, and release certification:
| Script | Purpose & Scope |
|---|---|
utils/lints.sh |
Static Analysis Gate: Runs cargo fmt, cargo check matrix, strict clippy, bidirectional cross-target clippy, doc, SPDX headers, RT allocation scan, AppStream validation, and script budgets (~8s warm). |
utils/tests-quick.sh |
Agile QA Suite: Fast test run (β€ 5 min budget) covering unit/integration tests and real-time allocation heap audit (heap-audit). |
utils/tests-long.sh |
Pre-Release Audit: Heavy stress testing (GC model swaps, off-RT drain, RT priority/latency, Xvfb GUI). Supports --strict, --artifact, and --only. |
utils/ab-opt-ceremony.sh |
A/B Optimization Ceremony: Empirical performance comparison (plain vs. pgo vs. pgo+bolt) on an isolated core prior to canonical build. |
utils/build-release.sh |
Release Pipeline & Certification: Compiles release artifacts (target/dist/), packages bundles, and certifies canonical receipts (--certify). |
utils/verify_rt_codegen.sh |
Static Codegen Guard: Disassembles the CLAP .so and asserts zero malloc/free, zero div/idiv, and bounded TLS access. |
utils/miri-audit.sh |
Optional UB/Aliasing Audit: Runs cargo +nightly miri over retired_box, GuiHostBridge, and quiescence teardown protocols. |
utils/mod-update.sh |
Dependency Maintenance: Manual toolchain and Cargo dependency upgrade utility. |
All automation scripts adhere to a unified execution contract (Class A interactive, Class B decoupled audit, Class C build, Class D manual tool) with deterministic PHASE: and RESULT: output streams.
The official release sequence strictly decouples compilation from certification:
# 1. Run the A/B optimization ceremony (Plain vs. PGO vs. PGO+BOLT)
./utils/ab-opt-ceremony.sh --runs 3
# 2. Build canonical release artifact (nam_plug.clap) and packages into target/dist/
./utils/build-release.sh --strict --package
# 3. Audit the canonical artifact under heavy stress
./utils/tests-long.sh --strict --artifact
# 4. Certify release evidence atomically without recompilation and install
./utils/build-release.sh --strict --certify --installFor full details on script classes, exit codes, interface variables, and measured execution budgets, see docs/testing.md.
For in-depth architectural specifications and engineering guides, consult the docs/ directory and core engine references:
| Document | Description |
|---|---|
CHANGELOG.md |
Release history, version notes, and architectural milestones |
docs/architecture.md |
Full CLAP architecture, SPSC GC thread model, Slint GUI lifecycle, and lock-free state synchronization |
docs/architecture.md#21-link-time-symbol-hardening--elf-interposition-defense |
Link-time ELF symbol hardening and dynamic linker interposition defense (.cargo/hide-libm-shadow.map) |
docs/architecture.md#12-host-vs-plugin-real-time-boundary--rt-hardening-delegation |
Real-time boundary demarcation: process-level hardening delegation vs. local plugin safety |
docs/architecture.md#105-appstream-catalog-dynamics--bundle-semantics |
AppStream catalog indexing, Flatpak bundle semantics, and diagnostic invariants |
docs/testing.md |
Test suite structure, host-harness verification phases, and CLAP test policies |
docs/functional-tests.md |
Functional test matrix, DAW verification procedures, and release certification checklists |
NeuralAmpModeler-rs: Architecture |
Core engine DSP architecture, SIMD kernels, memory layout, and resampler design |
NeuralAmpModeler-rs: Audio Fidelity Map |
DSP decision matrix, frequency response analysis, and quality modes (Live vs HQ) |
NeuralAmpModeler-rs: Libm Postmortem |
In-depth postmortem on ELF libm symbol interposition hang investigation |
We welcome community contributions, bug reports, and feedback!
- Test in Your DAW: Try NAM-Plug in your favorite Linux DAW (Bitwig Studio, REAPER, Fender Studio Pro, etc.) with different buffer sizes (32, 64, 128, 256) and sample rates.
- Model & IR Compatibility: Test your favorite
.nammodels and speaker IRs, and share your experience or benchmarks. - Issue Reporting: Submit detailed bug reports, questions, or feature requests via GitHub Issues.
- Steven Atkinson β Creator of Neural Amp Modeler (NAM) for pioneering deep learning guitar amplifier modeling and generously open-sourcing the ecosystem.
- Clack Framework & CLAP Community β For providing the Rust
clacklibrary and spearheading the open, modern CLever Audio Plug-in standard. - Slint Team & Community β For the declarative GUI framework and high-performance FemtoVG/OpenGL renderer.
The system architecture, real-time safety guarantees, CLAP state management, DSP pipeline design, and GUI implementation represent the creative and technical direction of the author (FΓ‘bio Henrique de Lima Silva). Implementation and iterative development were accelerated through human-directed AI pair programming within Google Antigravity IDE.
This project is licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later). See LICENSE.txt for details. Third-party attribution for the Apache-2.0 NeuralAmpModeler-rs engine is in NOTICE, which is included in the distributed tarball and Flatpak bundle.
