Skip to content

NAM and IR conversion ​

The Dual Stomp Lite can't run a NAM model or a long cab IR as they are, so every import is converted. This page shows how open-stomp's conversion compares with the official app's on the real pedal, and why.

In short ​

  • The pedal runs two filters, not a neural network. A NAM import is just two short filters around a fixed saturation.
  • It plays only part of each upload: 512 of the 1024 taps per NAM filter, and the first 384 of 2048 IR samples (8 ms).
  • The official app never checks its result. It designs the filters from two measurements and uploads them.
  • open-stomp fits the filters to the model. It simulates the pedal and adjusts the filters until it sounds like the model, and packs a cab IR's whole tone into the 384 samples the pedal plays.
  • On the pedal it's much closer: 2.1 dB from the original model + IR against the official app's 9.4 dB, and the closer of the two in 91% of a 3-minute recording.

Re-amp comparison ​

A 3-minute bass DI played through the pedal (2026-10-22), against the original NAM model and IR run in software on exactly what the pedal heard. Every take is time-aligned and loudness-matched; hover any chart for exact values.

TakeNAM conversionCab IR conversion
Original (the reference)The .nam model itself, run in softwareThe full IR file
open-stompopen-stomp (current)open-stomp (current)
OfficialOfficial appopen-stomp 0.4
  • Model and cab: Ampeg SVT-VR Classic (Normal) NAM model, Ampeg SVT Beta52 IR.
  • The official take used open-stomp's IR conversion (the session has no fully official take), so it compares the NAM conversions.

The official conversion's low-end score is slightly lower, but it's 7–16 dB too dark above 400 Hz.

Difference from the original ​

Each conversion's long-term spectrum minus the original's; 0 dB is a perfect match. The shaded region is where the original is more than 60 dB down (essentially silence).

Long-term spectrum ​

The average spectrum over the whole recording, 1/6-octave smoothed. The steep drop above ~5 kHz is the cab: bass cabs put out almost nothing up there.

Error over time ​

How far each conversion's third-octave band levels are from the original's at every moment (lower is closer), averaged into 0.5 s steps. Below it, the DI's input level.

Where and when they differ ​

Top: the original's band levels over time. Below: each conversion minus the original, per third-octave band. Red is louder than the original, blue is quieter, gray is a match.

Dynamics ​

Output level against DI input level (50 ms frames, median per 2 dB of input). Steeper means less compression.

By band

Mean difference from the original per third-octave band, over the moments that band is playing. Bias is the average (positive = louder), typical error the average size of the difference. The closer conversion is in bold.

Levels, and how it was measured

The files as exported, before any matching:

Other measurements ​

All on a Dual Stomp Lite (firmware V1.1.1), levels matched before comparing. rms dB error, lower is better.

Sweeps and tones (NAM) ​

The Ampeg SVT "Gain 10 Ultra Lo and Hi MD 421" model, re-amped with sweeps at four input levels and bass tones (2026-10-22).

Official appopen-stomp
Frequency response4.75 dB2.14 dB
Low end (40–160 Hz)4.95 dB3.51 dB
Note dynamics9.34 dB2.88 dB
Harmonics12.16 dB8.60 dB
  • Official app: off by up to 10–13 dB in the 400 Hz – 1 kHz mids at low input levels, 5–8 dB in the upper mids, and up to 20 dB in the top octave.
  • open-stomp: within 4 dB of the model from 100 Hz to 10 kHz.
  • Note dynamics is how each note's level changes with how hard it's played; harmonics compares the 3rd and 5th harmonics with each note's fundamental.

Cab IRs ​

The CAB block alone, re-amped and measured by sweep against the full IR file (31.5 Hz – 16 kHz).

IROfficial appopen-stomp
Ampeg 8x10 57 AH5.28 dB2.11 dB
Ampeg SVT Neumann16.13 dB, and 45 dB too quiet5.23 dB

The Neumann file starts with 21 ms of silence, so the official upload plays almost none of the cab.

In software, on fifteen Ampeg bass IRs (what the pedal plays against the full IR, examples/ir_compare):

IRsOfficial conversionopen-stomp
8 × "8x10" cabs (start at sample 0)2.5 – 5.4 dB0.9 – 3.2 dB
5 × "SVT" IRs that start after 384 samples12.7 – 14.2 dB, 38–44 dB too quiet2.3 – 2.4 dB, level within 0.4 dB
2 × DI recordings that start after 2048 samples9.9 – 13.6 dB, 34 dB too quiet2.9 – 3.6 dB
Mean7.94 dB2.18 dB

The "D-I-Out Hot" DI recording plays 16 dB quiet with open-stomp too, because open-stomp keeps the app's level rule.

What the pedal runs ​

text
input ──► G1 ──► f ──► G2 ──► output
          512-tap     fixed     512-tap
          filter    saturation  filter
NAM model (user AMP slot)Cab IR (user IR slot)
Upload2048 floats: two 1024-tap filters2048 samples at 48 kHz
What the pedal plays512 taps of each filterFirst 384 samples (8 ms)
Official appTwo measurements → minimum-phase filtersFirst 2048 samples of the file, as they are
open-stompFilters fitted through a pedal simulation384-tap filter fitted to the whole IR
Conversion timeAbout a minute (official algorithm: about 4 s)About half a second
  • G1 and G2 are FIR filters, the only part an import changes. G1 shapes the tone into the distortion, G2 the tone out of it (a Wiener–Hammerstein model).
  • f is a fixed saturation curve, the same for every user AMP slot.

How open-stomp converts ​

NAM models (Measure::Optimised, the default):

  1. Simulate the pedal: y = G2 ⊛ f(G1 ⊛ x), with f fitted from re-amp recordings. The simulator predicts the hardware within about 0.5 dB.
  2. Compare with the model on sweeps, tones and pink noise at several levels.
  3. Adjust both filters until the simulated pedal matches the model as closely as 512 taps allow. Each octave counts the same, so the low end isn't traded away for the mids.

Cab IRs (Method::Optimised): a 384-tap minimum-phase filter whose response matches the whole IR (30 Hz – 16 kHz), at the level the app meant to give it.

Level: imports are normalised to one level, like NAM plugins do, so they sit near the built-in amps instead of 13–19 dB below them. Only the volume changes, not the tone.

The official conversions are still available, reproduced exactly. In Open Stomp Manager pick them in the import dialog; from code, see Converting NAM models and IRs.

Limits ​

  • Phase. Both conversions are minimum-phase, so they match how the model sounds (its magnitude response), not its waveform.
  • Filter length. A cab with a deep, narrow bass resonance needs more than 384 or 512 taps. That's the remaining dip at 56–80 Hz in the graph: run in software, open-stomp's NAM upload alone is within ±0.5 dB of the model from 50 to 126 Hz, but even a perfect NAM through the pedal's 384-tap Beta52 IR is 7 dB short at 63 Hz.
  • Nonlinearity. The saturation curve is fixed. High-gain models whose distortion changes with level or frequency can only be approximated.

Under the hood ​

The reverse-engineering and the algorithms, for developers.

How the 512-tap limit was found
  • A test signal was played through the pedal and through the real model in software (tools/pedalsim).
  • The pedal runs only the first 512 taps of each uploaded impulse response: data[512..1024] for G1 and data[1536..2048] for G2 (taps 511..0, reversed). data[0..512] and data[1024..1536] are ignored.
  • A model of the pedal as y = G2_512 ⊛ f(G1_512 ⊛ x), with f a fixed piecewise-linear saturation, nulls against the recorded output of the official, open and clean uploads to −23.4 … −24.4 dB. That's the rig's own repeatability: two recordings of the same upload differ by −24.4 dB.
  • With all 1024 taps the model can't match: the clean conversion's 41 Hz response is then off by about 10 dB.
  • The truncation is why every 1024-tap conversion (the official one included) has excess sub-bass on the pedal: the cut-off tail of a minimum-phase response carries part of its low end.
  • In the library: convert::PEDAL_TAPS (512), convert::upload_data (two responses → upload, unused halves zero) and convert::pedal_irs (upload → the responses the pedal runs).
  • The app's native library (imagelib, which bundles NeuralAmpModelerCore) delivers the result as (float* g1, float* g2, float* factor). The factor is always 1.0 and doesn't change the output level; see NAM and IR uploads.
How the 384-sample IR limit was found
  • Probe IRs (impulses at known taps) were uploaded to USER IR 10 and the CAB block re-amped on its own, by sweep deconvolution divided by the dry path (tools/pedalsim/ir_reamp_*.py).
  • Impulses at taps 0–383 come back at their uploaded amplitude (within a few %). Taps 384, 450, 500, 1000, 1500 and 2040 don't come back at all.
  • In upload order that's data[1664..2048]; data[0..1664] is ignored. In the library: ir::PEDAL_IR_TAPS (384) of ir::IR_TAPS (2048).
  • The CAB block's level is about unity: an impulse of 1.0 at tap 0 measures −0.1 … −0.8 dB against the dry path.
The official NAM converter, run headless
  • The app's converter runs outside the app: tools/namconv/ in the open-stomp-manager repo (nam-re branch).
  • It loads imagelib.framework from the installed app and calls ImageUtility::loadNamFile by address. The C++ API isn't exported, but the symbol table names everything and __TEXT starts at 0.
  • It waits for the end callback and dumps every buffer. No pedal is involved.
  • For both test files (FNDR BFSR VB Edge WRM2 CAB FREE.nam and Jcm800.nam) its output is byte-identical to the captured upload, intermediate buffers included.
  • The test files are NAM 0.7 SlimmableContainers with two WaveNet submodels (3-channel: 1871 weights; 8-channel: 12146 weights). The uploaded floats are not those weights (searched all alignments and float16/32).
BufferSizeFinding
ToneTest_FftBins (const)94 × int32Tone frequencies as bins of an 8192-point FFT at 48 kHz: 10…2488 = 58.6 Hz…14.6 kHz, about 1/12-octave steps
ToneTest_FftBinsThird (const)83 × int32Exactly 3 × the fundamental bins: the 3rd harmonic of each tone (up to 3951 < 4096)
ToneTestOutputLevels94 × f32Level of each tone's fundamental at the model's output
ToneTestOutputLevelsThird83 × f32Level of each tone's 3rd harmonic
g1GainsDb94 (+1) × f32Target gain per tone for G1, in dB
G1IR, G2IR8192 × f32Two impulse responses. `
NamFirG1, NamFirG2 → upload2 × 1024 × f32g1 = reverse(G1IR[0:1024]), g2 = reverse(G2IR[0:1024]): the first 1024 taps of each response, time-reversed
factorf321.0 for both files; written into the slot-info record (offset 52)

Seen raw in a capture, the first half of the upload rises smoothly and exponentially to about 2200 (G1, reversed) and the second half is tiny with energy rising toward the end (G2, reversed).

The official NAM algorithm, step by step (NamFileThread::run)

Recovered from the disassembly (Ghidra) and verified stage by stage: given the model's input and output for each call (captured with the harness's --log-io), tools/namconv/reference.py in the open-stomp-manager repo reproduces every vendor buffer for both test files. Tone levels match to ≤ 1e-5, g1GainsDb to ≤ 0.011 dB, G1IR/G2IR/upload to ≤ 7e-5 relative; the rest is float32 vs float64 FFT rounding.

Building blocks

  • Spectrum: an 8192-point FFT (TI DSPLIB DSPF_sp_fftSPxSP, no window, no scaling) of real input; bins 0…4095, as power re² + im² or magnitude.
  • DC blocker on every model output: biquad b = [0.9953827, −1.990765, 0.9953827], a = [1, −1.990744, 0.9907867], float32. Its state is reset to zero once, before the BLA run, then carries over from call to call (BLA, then each tone in order). The NAM model's own state carries over the same way.
  • All model calls run at 48 kHz on one channel, in this order: the BLA run (8192 samples), then 94 tones (10240 samples each).

Steps

  1. Best linear approximation (BLA). y = model(BLA_x), DC-blocked. BLA_x is an 8192-sample constant in the binary: a pink random-phase multisine over every bin, amplitude √(1/max(f, 40 Hz)) scaled by 1e-5 (peak ≈ 3e-5, about −90 dBFS), so the model is driven in its small-signal range. Its phases don't come from rand(); it was apparently generated offline. H[k] = |Y[k]| / |X[k]| for k = 0…4095, and H_dB = 20·log10 H.
  2. Smoothing (1/24 octave): for k = 2…4095, lo = max(floor(k / 2^(1/48)), 2), hi = clamp(ceil(k · 2^(1/48)), lo, 4095) (fcvtms / fcvtps), m = max(k, lo). Weights are triangular in log-frequency: w_j = (log j − log(lo−1)) / (log m − log(lo−1)) for j ≤ m, (log(hi+1) − log j) / (log(hi+1) − log m) for j > m. Hs[k] = sqrt(Σ w_j H_j² / Σ w_j), and Hs[0] = Hs[1] = Hs[2].
  3. Tone test. For each of the 94 bins b in ToneTest_FftBins: input sinf(n · b · 2π/8192) for n = 0…10239 (amplitude 1.0), model, DC blocker, power spectrum of samples 2048…10239. level = √P[b] · (π/4) / 4096; for the first 83 tones also level3 = √P[3b] · (3π/4) / 4096 (the 3rd harmonic).
  4. Gains. F[k] = levels linearly interpolated between tone bins (held at the first/last value outside). T[k] = 3rd-harmonic levels interpolated over the 3b bins (0 below, last value above). M = max(F, T). g1GainsDb[i] = 20·log10(Hs[b_i] / M[b_i]).
  5. Curves. G1_dB[k] = g1GainsDb interpolated in log-frequency between tone bins (held outside). G2_dB[k] = H_dB[k] − G1_dB[k] (unsmoothed H).
  6. Filters. Each curve → linear magnitude, mirrored to 8192 points as m[8191−k] = m[k] (not m[N−k]), then Magnitude2MinPhase: φ = −imag(hilbert(ln m)) (ln 0 → −30), IR = real(ifft(m · e^{jφ})) (1/N-scaled). This gives G1IR and G2IR.
  7. Upload. g1 = reverse(G1IR[0:1024]), g2 = reverse(G2IR[0:1024]), factor = 1.0 (a constant in the code).

The rest of run() (FIR objects, "match EQ" buffers, the srand(33) odd-prime multisine levelsTesterItem) sets up other features and doesn't affect the upload.

Two quirks (which Measure::App copies):

  • The DC transient. The model's output has a DC offset (≈ 3e-4 for both test files, 10× the BLA signal) and the DC blocker starts from zero, so its few-hundred-sample transient leaks into the BLA spectrum. The app's H is about 30–38 dB too high below 100 Hz, 5–30 dB above 4 kHz, a few dB in between. G1 and G2 inherit this.
  • The mirror. m[8191−k] = m[k] plus taking the real part blends neighbouring bins, so G1IR/G2IR miss jagged target curves by up to about 1–3 dB per bin (G1IR vs g1GainsDb: mean 0.01–0.13 dB, std 0.5–1.1 dB in the app's own output).
open-stomp's NAM conversions (nam::convert::Measure)
MeasureWhat it doesTime
AppThe official algorithm, quirks included. Keeps the app's 1024-tap layout byte for byte.About 4 s
CleanPlays the excitation twice and measures the steady-state second period: no DC transient, the model's real small-signal response. Uploads only the taps the pedal runs.About the same as App
Optimised (default)Starts from Clean, then fits G1 and G2 through a simulation of the pedal.About a minute

Device::import_nam_file uses Optimised and a normalised level. import_nam_file_with picks the Measure and keeps the model's own level; import_nam_file_as chooses both.

The optimiser (nam::optimise)
  • Pedal model. y = G2 ⊛ f(G1 ⊛ x) with 512-tap filters and a fixed piecewise-linear saturation f. Its knots are at 0 and ±¼ … ±32 in octaves, flat beyond. Fitted jointly to re-amp recordings of three different uploads; nulls against them to the rig's own repeatability.
  • Target. The model's output for the same signal: input −12 dB, the app's DC blocker, × 0.0932 (the pedal's output level relative to the model's, measured on the re-amp rig).
  • Test signal (53 s at 48 kHz): log sweeps 20 Hz – 20 kHz at −36, −24, −12 and −6 dBFS; 1 s tones at 41.2, 55, 73.4, 98 and 196 Hz at −24, −12 and −6 dBFS; pink noise at about −36, −24 and −12 dBFS; a pink-noise segment at −18 dBFS that is simulated but not fitted.
  • Filters. Each is a smooth log-magnitude curve at 41 control points (20 Hz × 2^(i/4), linear in log-frequency), made minimum-phase by the folded cepstrum (N = 8192) and cut to 512 taps.
  • Loss. Multi-resolution STFT log-magnitude L1 distance (windows 4096, 1024 and 256, ¼ hop, 50 ms trimmed from each segment end), each bin weighted by Weighting:
    • Octave (default): ∝ 1/f above 40 Hz, flat from 20–40 Hz, nothing below 20 Hz, normalised to a mean of 1 per resolution.
    • Flat: every bin the same (the PyTorch reference tests use it).
  • Penalties. 1e-3 · mean(max(|u| − 100, 0)²) keeps u = G1 ⊛ x inside the range f was fitted on, plus 1e-3 · the mean squared second difference of each curve (smoothness).
  • Fit. Adam, 300 steps, learning rate 0.05 with a 10-step warm-up and cosine decay, starting from the Clean conversion; the best step is kept (optimise::Options: steps, learning_rate, warmup, smoothness, weighting).
  • Gradients are written out by hand and checked against PyTorch's autograd (tests/data/optim) and finite differences.
  • Speed. About a minute per model (optimised build, 8 cores). convert::convert_optimised reports progress and can stop early with the best result so far.
Why each octave counts the same
  • An STFT's bins are evenly spaced in Hz: below 120 Hz is about 0.5% of the bins in the 4096-point window, one or two in the shorter ones.
  • With a flat loss the fit happily traded 8 dB at 63 Hz for a fraction of a dB in the mids. Weighting bins by 1/f fixed that.
  • Simulation, six models, flat → octave weighting (rms dB):
ModelFrequency responseNote levelLow end (40–160 Hz)
Ampeg SVT-VR Classic (Normal)2.49 → 1.212.12 → 0.604.92 → 2.07
Ampeg SVT Gain 10 Ultra Lo and Hi MD 4215.79 → 5.564.47 → 4.748.15 → 7.00
Ampeg SVT Ultra Lo MD 4213.31 → 2.791.85 → 1.704.83 → 3.39
Orange Terror Bass (Clean)1.33 → 0.861.27 → 0.711.13 → 0.73
Orange Terror Bass (Dirt)2.16 → 1.992.20 → 1.701.33 → 1.55
Marshall JCM800 (guitar)4.00 → 3.712.73 → 1.086.07 → 4.79
  • The pedal simulator was ruled out as the cause: it predicted the recorded sweep responses within about 0.5 dB from 32 to 318 Hz.
  • Starting G1 with a steep low cut gained another ~1 dB at 63–79 Hz on the Gain 10 model in the PyTorch prototype; it wasn't adopted.
Running NAM models (nam::Model)
  • A pure-Rust port of the parts of NeuralAmpModelerCore the converter needs (feature nam).
  • Supported: WaveNet models, plain (NAM 0.5 "classic", e.g. the standard A1 architecture) or inside a SlimmableContainer (NAM 0.7, the full-size submodel). Gated and ungated layers, bottleneck, layer1x1/head1x1, kernel heads.
  • Not supported: LSTM/ConvNet models, FiLM, grouped convolutions, condition DSPs, post-stack heads.
  • Accuracy: matches NeuralAmpModelerCore to ≤ 3e-5 on its example models (tests/data/nam/), and the vendor's own model output to about 1e-6 relative over a whole conversion.
Matching the official app exactly

nam::convert(&mut model) runs the official algorithm (Measure::App) with open-stomp's own excitation (excitation()) in about 4 s.

Excitationg1g2
The app's BLA_x (convert_with + official_excitation, read from your own install)≤ 0.01 dB≤ 0.03 dB
Ours (excitation(), the default)0.7–1.6 dB rms (max 2–7)1.0–1.3 dB rms (max 2–4)
  • Why ours differs. Where the DC transient and the signal interfere (roughly 100 Hz – 1 kHz), the result depends on the excitation's phases. The app itself would differ by this much with any other table. Averaging over phases doesn't get closer; only the app's exact table reproduces its results.
  • On hardware: "Ampeg SVT – MD 421" converted by the official converter and by ours sound identical; on paper they differ by ≤ 0.15 dB (1/3-octave).
  • Using the app's table. BLA_x is vendor data, so it isn't shipped. nam::convert::official_excitation(path) reads it from your own copy of Stomp Manager (found by an 8-byte prefix and a 64-bit hash; nothing is executed). find_official_excitation() tries the standard install locations (official_app_locations()). Strictly opt-in: Device::import_nam_file always uses open-stomp's own converter.
  • Result. With the app's table, conversions match the official app exactly: verified on ten models, error energy −51 to −93 dB. The Windows build's table is assumed identical (not checked).
The official IR algorithm
  • Source: the app's native code (nux_plugins: JuceUtil::convertAudioToWaveFormat, decompiled with Ghidra), confirmed on eleven captured imports (ten designed test IRs in tests/data/ir and a real reverb IR). ir::convert reproduces them all, eight bit for bit and the rest within float rounding (examples/ir_capture_check).
  1. Normalise the file. Unless it's already a 48 kHz mono 24-bit WAV, it's converted to one: JUCE's ResamplingAudioSource (samplesIn/samplesOut = rate / 48000) writes ⌊len · 48000 / rate⌋ samples of the first channel to a 24-bit WAV. Linear interpolation (single precision) plus JUCE's 2nd-order low-pass at the lower Nyquist frequency (input when downsampling, output when upsampling, none within ±0.01 % of 1:1). 24-bit: round(x · 8388607), read back as / 8388608. open-stomp's copy is ir::resample_like_app.
  2. Take the first 2048 samples (zero-padded), time-reversed: data[2047 − k] = g · ir[k]. No trimming, windowing or minimum-phase conversion.
  3. Gain (ir::app_gain): a 16384-point FFT of the 2048 samples, bins 136–1023 (398 Hz – 3 kHz): g = 1 / √(max |X| · min |X|), so the band's peak and trough are symmetric about 0 dB. A single impulse becomes exactly 1.0. The first captured import ("percussive verb 1") had gain 12.5344, reproduced to −138 dB.
The optimised IR algorithm (ir::convert_optimised)

ir::Method::App is the official conversion (ir::convert, the enum's default and what Device::import_ir_file uses without the nam feature); Method::Optimised (feature nam) is this one.

  1. Resample with a windowed sinc (ir::resample) instead of linear interpolation.
  2. Target: the full IR's magnitude response, 1/6-octave smoothed.
  3. Design a minimum-phase filter with that response (folded cepstrum, 32768 points): no leading delay, energy packed into the start. A few iterations correct for what the 384 taps (faded over the last 48) actually produce.
  4. Fit the taps (Adam, 400 steps, hand-written gradient through the FFT) to the full IR's levels in 1/6-octave bands every 1/12 octave from 30 Hz to 16 kHz, level left free.
  5. Level: the app's own gain rule applied to the first 2048 samples counted from the IR's onset, matched over 100 Hz – 8 kHz. The unused 1664 samples are zero.
Import level normalisation
  • The official app plays models 24–34 dB below the model's own output for the same input, 13–19 dB below the built-in amps for the SVT-VR models tested.
  • nam::convert::normalise_level measures what the pedal would play (pink noise at −18 dBFS) and scales G2 to NORMALISED_LEVEL_DB (−32.5 dB). G2 comes after the saturation, so only the volume changes.
  • Calibrated on the pedal (tools/pedalsim/nam_level_rig.py): normalised imports play at the level of the built-in Ampug SV Bass and Mes 400 Bass with the same knobs. Two models 6 dB apart raw land within 0.2 dB.
  • The slot-info factor can't do this: an upload with factor 2.0 plays at exactly the same level.
How short filters limit a bass cab

Best possible 40–160 Hz error for a minimum-phase filter fitted to a +20 dB resonance at 63–80 Hz above a cut of about 33 dB/octave:

TapsBest 40–160 Hz error
384 (the pedal's IR)7.0 dB
512 (one NAM filter)4.1 dB
895 (the NAM's G2 and the IR back to back)2.3 dB
1023 (both NAM filters)2.1 dB
20480 dB

Fitting the NAM's G2 and the IR together would get close to the 895-tap row, but the AMP slot would then only sound right with that one cab. Not implemented.

Reproduce ​

The analysis code is in tools/pedalsim:

ScriptWhat it does
reamp_run.pyPlays the test signal through the pedal, one block at a time
readme_plots.py <session>Measures a re-amp session (sweeps and tones)
reamp_compareThe re-amp comparison and its charts
ir_compare (example)The fifteen-cab software comparison

MIT or Apache-2.0. Not affiliated with SORAN.