From 2a61b2e0dff952e590863aeabb5b3e07de7e6a4f Mon Sep 17 00:00:00 2001 From: Steven Atkinson Date: Wed, 10 Jun 2026 12:56:03 -0700 Subject: [PATCH 1/4] Derive project version from header --- CMakeLists.txt | 16 ++++++++++++++-- README.md | 2 +- docs/conf.py | 22 ++++++++++++++++++++-- docs/wavenet_walkthrough.rst | 4 ++-- 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e9fee88..d21f36a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,19 @@ cmake_minimum_required(VERSION 3.10) -# Make sure this matches ./NAM/version.h! -project(NAM VERSION 0.4.0) +file(READ "${CMAKE_CURRENT_LIST_DIR}/NAM/version.h" _nam_version_header) +foreach(_component MAJOR MINOR PATCH) + string(REGEX MATCH + "#define[ \t]+NEURAL_AMP_MODELER_DSP_VERSION_${_component}[ \t]+([0-9]+)" + _nam_version_match "${_nam_version_header}" + ) + if(NOT _nam_version_match) + message(FATAL_ERROR "Could not parse NEURAL_AMP_MODELER_DSP_VERSION_${_component} from NAM/version.h") + endif() + set(_nam_version_${_component} "${CMAKE_MATCH_1}") +endforeach() + +set(_nam_project_version "${_nam_version_MAJOR}.${_nam_version_MINOR}.${_nam_version_PATCH}") +project(NAM VERSION "${_nam_project_version}") set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") diff --git a/README.md b/README.md index f94ea3f5..57ff429d 100644 --- a/README.md +++ b/README.md @@ -24,5 +24,5 @@ This library uses [Eigen](http://eigen.tuxfamily.org) to do the linear algebra r Tone3000 logo -Development of version 0.4.0 of this library has been generously supported by [TONE3000](https://tone3000.com). +Early development of this library was generously supported by [TONE3000](https://tone3000.com). **Thank you!** diff --git a/docs/conf.py b/docs/conf.py index 305152c8..28638cda 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -4,6 +4,7 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html import os +import re import sys from pathlib import Path @@ -19,8 +20,25 @@ project = 'NeuralAmpModelerCore' copyright = '2023-present Steven Atkinson' author = 'Neural Amp Modeler Contributors' -release = '0.4.0' -version = '0.4.0' + + +def _get_project_version(): + version_header = Path(__file__).resolve().parent.parent / 'NAM' / 'version.h' + contents = version_header.read_text(encoding='utf-8') + version_parts = {} + for component in ('MAJOR', 'MINOR', 'PATCH'): + match = re.search( + rf'#define\s+NEURAL_AMP_MODELER_DSP_VERSION_{component}\s+(\d+)', + contents, + ) + if match is None: + raise RuntimeError(f'Could not parse {component.lower()} version from {version_header}') + version_parts[component.lower()] = match.group(1) + return f"{version_parts['major']}.{version_parts['minor']}.{version_parts['patch']}" + + +release = _get_project_version() +version = release # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/docs/wavenet_walkthrough.rst b/docs/wavenet_walkthrough.rst index 9dd90e63..c3cee7ed 100644 --- a/docs/wavenet_walkthrough.rst +++ b/docs/wavenet_walkthrough.rst @@ -27,8 +27,8 @@ Here's a rundown of what's not exactly the same at an informal level: gated activation. Here, the gated activation is optional (and is frequently not used, like in the popular A1 standard/lite/feather/nano configurations). -* In v0.4.0, even more modifications have been added in--FiLMs, a bottlneck, and an - arbitrary "conditioning DSP" module that can be used to embed the input signal in a more +* NAM adds further modifications: FiLMs, a bottleneck, and an arbitrary + "conditioning DSP" module that can be used to embed the input signal in a more effective way to modulate the layers in the main model. It doesn't need to be a WaveNet, but if it were then this feels more like a "cascading (stacked) WaveNet". From f7bf9af3c4536bbf6858ae12f2c09e8be1a72f92 Mon Sep 17 00:00:00 2001 From: Steven Atkinson Date: Wed, 10 Jun 2026 12:59:28 -0700 Subject: [PATCH 2/4] Restore README version reference --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 57ff429d..8e575962 100644 --- a/README.md +++ b/README.md @@ -24,5 +24,5 @@ This library uses [Eigen](http://eigen.tuxfamily.org) to do the linear algebra r Tone3000 logo -Early development of this library was generously supported by [TONE3000](https://tone3000.com). +Development of version 0.4.0 of this library has been generously supported by [TONE3000](https://tone3000.com). **Thank you!** From 4f72acd53d2885d6274e9fa66a334cac01ff2a10 Mon Sep 17 00:00:00 2001 From: Steven Atkinson Date: Wed, 10 Jun 2026 13:00:16 -0700 Subject: [PATCH 3/4] Restore WaveNet walkthrough version reference --- docs/wavenet_walkthrough.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/wavenet_walkthrough.rst b/docs/wavenet_walkthrough.rst index c3cee7ed..9dd90e63 100644 --- a/docs/wavenet_walkthrough.rst +++ b/docs/wavenet_walkthrough.rst @@ -27,8 +27,8 @@ Here's a rundown of what's not exactly the same at an informal level: gated activation. Here, the gated activation is optional (and is frequently not used, like in the popular A1 standard/lite/feather/nano configurations). -* NAM adds further modifications: FiLMs, a bottleneck, and an arbitrary - "conditioning DSP" module that can be used to embed the input signal in a more +* In v0.4.0, even more modifications have been added in--FiLMs, a bottlneck, and an + arbitrary "conditioning DSP" module that can be used to embed the input signal in a more effective way to modulate the layers in the main model. It doesn't need to be a WaveNet, but if it were then this feels more like a "cascading (stacked) WaveNet". From c136943a123ebe599f1e724f860f8eb01f5e4ebf Mon Sep 17 00:00:00 2001 From: Steven Atkinson Date: Wed, 10 Jun 2026 13:02:11 -0700 Subject: [PATCH 4/4] Restore README to main --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8e575962..f94ea3f5 100644 --- a/README.md +++ b/README.md @@ -24,5 +24,5 @@ This library uses [Eigen](http://eigen.tuxfamily.org) to do the linear algebra r Tone3000 logo -Development of version 0.4.0 of this library has been generously supported by [TONE3000](https://tone3000.com). +Development of version 0.4.0 of this library has been generously supported by [TONE3000](https://tone3000.com). **Thank you!**