# NeuralAmpModelerCore: the C++ DSP layer underneath NAM plugins

> NeuralAmpModelerCore is a MIT licensed C++ library that holds the DSP and neural network model code that NAM plugins call into, with three command line tools for testing, loading and timing models, and one documented Eigen alignment hazard.

**sdatkinson/NeuralAmpModelerCore** — Core DSP library for NAM plugins

- Repository: https://github.com/sdatkinson/NeuralAmpModelerCore
- Stars: 993 · Forks: 189
- Language: C++
- License: MIT
- Published: 2026-10-20 · Updated: 2026-10-20 · Language: en
- Canonical page: https://hysenlabs.com/projects/sdatkinson-neuralampmodelercore

## What actually lives in the core library

NeuralAmpModelerCore is described in one line as the core C++ DSP library for NAM plugins. That boundary matters, because the library is not a plugin and not an audio application. It is the code underneath them: the routines that run a neural network model over an audio signal, the machinery for loading a model from disk, and the parameter representation those models need. The project points at a separate repository, NeuralAmpModelerPlugin, as the example of how to use it, which tells you that the split between core and plugin is deliberate and that plugin authors are the intended audience. The licence is MIT, which makes it straightforward to embed the library inside a proprietary plugin binary without the copyleft obligations that would come with a share-alike licence, though the licensing terms themselves are a matter for your own review.

## Three tools that come with the library

The repository bundles a small set of command line tools, and they map onto three different jobs that a plugin author would otherwise write from scratch. `run_tests` runs a suite of unit tests, which is the tool you reach for when you change the model code and need to know whether the arithmetic still holds. `loadmodel` lets you test loading a `.nam` file, which is the fastest way to find out whether a model you were given is readable and structurally valid before wiring it into a plugin. `benchmodel` tests how quickly a model runs in real time, which is the one that matters when the plugin has to keep up with a live guitar signal. If the timing needs to be more granular, the documentation points to a separate `main-profiling` branch. For guidance on building all of this, the project directs you to the workflow file in `.github/workflows/build.yml` rather than to a hand written build guide.

## Eigen alignment is the sharp edge

The most valuable part of this README is the section the author labels sharp edges, because it names a failure mode that does not announce itself. The library uses Eigen for the linear algebra that its neural networks require, and since those models hold their parameters as Eigen object members, there is a risk with certain compilers and compiler optimisations that their memory is not aligned properly. The symptom is not described, which is exactly why it is worth reading in advance: a misaligned model can surface as a crash on one compiler and not on another, which makes it look like a plugin bug. Two preprocessor macros work around it, `EIGEN_MAX_ALIGN_BYTES 0` and `EIGEN_DONT_VECTORIZE`, and the project is candid that this will probably harm performance. The problem is tracked as issue 67, and the relevant Eigen documentation on structs having Eigen members is linked for the underlying explanation.

## Building it: the CI workflow is the build guide

There is no install command to copy, and there is no package published for this repository in the documentation. Instead, the build guidance lives in the build workflow, and the practical instruction is to read `.github/workflows/build.yml` for how the tools are compiled. The build system itself is CMake, with a `CMakeLists.txt` at the top level and another inside the `tools/` directory, and the dependency on Eigen is managed through `Dependencies/` alongside a `.gitmodules` file, so the checkout expects submodules to be initialised. There is also a `format.sh` script and a `.clang-format` file, which together indicate that the project expects its own formatting to be applied rather than left to the editor of whoever last touched a file.

## Repository layout: examples, weights and generated docs

The top level tells you what a contributor is expected to work with. `NAM/` holds the library sources, `tools/` the command line tools, `Dependencies/` the vendored or submodule dependencies, `docs/` the documentation, and `media/` the assets used by the README, including a sponsor logo. Two example directories ship with the project, `example_audio/` and `example_models/`, which is the fastest way to try the tooling with something known to work rather than hunting for a `.nam` file. Two generated directories, `build/` and `build_inline/`, sit alongside a `Doxyfile`, so documentation is produced with Doxygen and the two build trees appear to cover separate build configurations. There is also a Python script at the top level named `generate_weights_a2.py`, which points to a second weights architecture handled by the library, though the script itself is not described further in the documentation.

## Release history and who funded the work

The version numbers tell you this is still pre-1.0 software. Recent releases are v0.6.0 on 2026-10-01, v0.5.4 on 2026-06-24 and v0.5.3 on 2026-06-02, and the last push was on 2026-10-01. A 0.x version carries the usual implication that interfaces may still change between minor releases, so a plugin that pins a version of this library should expect to revisit that pin when a 0.7 release lands. The project also documents its funding. Development of version 0.4.0 of the library was supported by TONE3000, and the sponsor logo is kept in `media/` and placed in the README. That is a useful signal for anyone deciding whether to depend on the library, since it shows there is an organisation with a commercial interest in the core staying healthy.

## Conclusion

Adopt NeuralAmpModelerCore if you are writing or maintaining a NAM plugin and want the model loading and DSP code handled by a library that already ships the test tooling. Do not adopt it expecting a turnkey audio host, since this repository is the core library and leaves plugin and hosting decisions elsewhere. Verify first that your compiler and optimisation flags do not trip the Eigen alignment problem, and if they do, test the `EIGEN_MAX_ALIGN_BYTES 0` and `EIGEN_DONT_VECTORIZE` workaround with `benchmodel` before settling on it, because the project states that the workaround will probably harm performance.

## FAQ

### How do I build NeuralAmpModelerCore and its tools?

The project points at the build workflow in `.github/workflows/build.yml` for guidance on building the included tools. The build uses CMake, with `CMakeLists.txt` at the top level and a `tools/CMakeLists.txt`, and dependencies live under `Dependencies/` with a `.gitmodules` file in the repository.

### What is the loadmodel tool used for?

It allows you to test loading a `.nam` file. That makes it the quick check for whether a model file is readable before it is wired into a plugin.

### How do I profile how fast a model runs?

The `benchmodel` tool tests how quickly a model runs in real time. For more granular profiling, the project points to the `main-profiling` branch.

### What should I do about the Eigen alignment warning in NeuralAmpModelerCore?

The library uses Eigen for the linear algebra its neural networks need, and with certain compilers and optimisations the model parameters may not be aligned properly. The documented workaround is the preprocessor macros `EIGEN_MAX_ALIGN_BYTES 0` and `EIGEN_DONT_VECTORIZE`, though the project states this will probably harm performance, and the issue is tracked as issue 67.

## Sources

- [Issues](https://github.com/sdatkinson/NeuralAmpModelerCore/issues)
- [License: MIT](https://github.com/sdatkinson/NeuralAmpModelerCore/blob/main/LICENSE)
- [README](https://github.com/sdatkinson/NeuralAmpModelerCore/blob/main/README.md)
- [Releases](https://github.com/sdatkinson/NeuralAmpModelerCore/releases)
- [sdatkinson/NeuralAmpModelerCore on GitHub](https://github.com/sdatkinson/NeuralAmpModelerCore)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/sdatkinson-neuralampmodelercore
