Skip to content

[FEATURE] Instantiate (linear) models from .wav files - #337

Merged
sdatkinson merged 4 commits into
mainfrom
157-nam-from-wav
Sep 18, 2026
Merged

sdatkinson merged 4 commits into
mainfrom
157-nam-from-wav

Conversation

@sdatkinson

Copy link
Copy Markdown
Owner

A .wav file is often used to hold the impulse response of a system. This can be used to define a linear model (as is super-common in digital audio).

This implements a loading routine that does a (lossless) conversion from a .wav IR to a linear model.

Resolves #157

@sdatkinson
sdatkinson merged commit 0b3d3c9 into main Sep 18, 2026
4 checks passed
@sdatkinson
sdatkinson deleted the 157-nam-from-wav branch September 18, 2026 23:59
dfernandes83 added a commit to dfernandes83/NeuralAmpModelerCore that referenced this pull request Sep 21, 2026
Brings in NAM Core 0.6.0 from sdatkinson/NeuralAmpModelerCore:
- models with variable sample rate (sdatkinson#333): Linear reports
  SupportsArbitrarySampleRate() and resamples in Reset()
- 1-to-n and n-to-1 channel configurations in Linear models (sdatkinson#335, breaking:
  a Linear model now needs one kernel per output/input path)
- Linear models instantiated from .wav files through get_dsp() (sdatkinson#337)
- version bump to 0.6.0 (sdatkinson#336)

Conflicts:
- NAM/get_dsp.cpp: kept all three includes (<algorithm> and <cctype> from
  upstream, <cmath> from our validation code).
- NAM/linear.cpp: took upstream's rewritten direct-convolution loop. Our side
  only had a static_cast to silence an MSVC conversion warning in the code
  that upstream replaced.

Consumers now have to compile NAM/wav.cpp too: get_dsp.cpp calls
nam::detail::load_wav_ir().
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.

Instantiate linear NAMs from impulse response .wav files

1 participant