Skip to content

Comments

[FEATURE] Rendering tool#234

Closed
sdatkinson wants to merge 6 commits intomainfrom
render
Closed

[FEATURE] Rendering tool#234
sdatkinson wants to merge 6 commits intomainfrom
render

Conversation

@sdatkinson
Copy link
Owner

use: ./build/tools/render model.nam input.wav output.wav

Required for Atkinson-Advanced-Modeling/NamIntegrationTests#1

jfsantos and others added 6 commits February 13, 2026 16:54
* Add profiling instrumentation for NAM building blocks

Adds a profiling framework (NAM/profiling.h, NAM/profiling.cpp) with
NAM_PROFILE_START()/NAM_PROFILE_ADD() macros and 14 timing categories.
Supports both desktop (std::chrono) and ARM Cortex-M7 (DWT cycle counter)
backends. Profiling is compile-time gated via -DNAM_PROFILING.

Instruments wavenet _Layer::Process() and _LayerArray::ProcessInner()
with per-category timing, and adds profiling reset/print calls to the
benchmodel tool.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fixed build flags for benchmodel

* Added a command line tool to output memory usage for a given .nam file

* Bugfix - checking that condition_dsp is not null in the JSON (#220)

* [BUGFIX, BREAKING] Make activation base class abstract, fix PReLU implementation (#223)

* Make activation apply method pure virtual instead of no-op default

* Fix bugs

* Refactor to throw std::invalid_argument in debug mode, add tests

* Add TONE3000 support note in README.md (#224)

* Replace hardcoded profiling struct with dynamic registry

  The Timings struct hardcoded 14 named fields, requiring manual updates
  to reset(), total(), print_results(), and every call site whenever a
  category was added or removed. Replace with a flat-array registry where
  types are registered at file scope via register_type(), returning an
  integer index for O(1) accumulation in the hot path.

  Also adds NAM_PROFILE_RESTART() macro to replace a raw #ifdef block
  in wavenet.cpp.

---------

Co-authored-by: João Felipe Santos <santosjf@pm.me>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Steven Atkinson <steven@atkinson.mn>
- Add AudioDSPTools as submodule for WAV input (dsp::wav::Load)
- Add tools/render: loads model, reads input WAV, processes, writes 32-bit float output
- Usage: render <model.nam> <input.wav> [output.wav]
- Supports mono input; validates sample rate matches model

Co-authored-by: Cursor <cursoragent@cursor.com>
@sdatkinson sdatkinson closed this Feb 21, 2026
@sdatkinson sdatkinson deleted the render branch February 21, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants