Skip to content

User AMP and IR slots ​

How to import NAM amp models and cab IRs into the pedal's user slots, and how to rename, delete and read them back. For the conversion options, see Converting NAM models; for the wire format, NAM and IR uploads.

Slot numbering ​

The pedal has 10 user AMP slots and 10 user IR slots. Every call takes a 0-based slot.

slotOn the pedalAmp or cab model
0USER AMP 01 / USER IR 0130
1USER AMP 02 / USER IR 0231
………
9USER AMP 10 / USER IR 1039
  • Model number = upload::USER_MODEL_BASE (30) + slot, in the AMP or CAB block. Select it with set_head(Module::Amp, 30 + slot, true).
  • Slot count: upload::USER_SLOTS (10).
  • Data: each slot holds 2048 floats (upload::UPLOAD_FLOATS), sent as 8192 bytes.

Imports overwrite the slot

An import replaces whatever is in the slot, with no undo. Read the slot back first if you want to keep it (below).

Import a file ​

The simplest way: convert and upload in one call.

rust
dev.import_nam_file(2, "Jcm800.nam")?;   // optimised conversion + upload to USER AMP 03
dev.import_ir_file(0, "My Cab.wav")?;    // optimised conversion + upload to USER IR 01
python
dev.import_nam_file(2, "Jcm800.nam")     # optimised conversion + upload to USER AMP 03
dev.import_ir_file(0, "My Cab.wav")      # optimised conversion + upload to USER IR 01
  • Names: the slot is named after the file, like the official app does (Jcm800, My Cab). IR names are cut to the first 16 characters.
  • Return value: the conversion (nam::Converted / ir::ConvertedIr), so you can inspect or cache it.
  • Timing: the NAM conversion runs on the calling thread and takes about a minute in an optimised build (Python releases the GIL meanwhile). An IR conversion takes under a second. The upload itself takes under a second over USB, about 10 s over Bluetooth.
  • Never reads the official app: these calls use open-stomp's own converter.
RustPythonConversionLevel
import_nam_file(slot, path)import_nam_file(slot, path)OptimisedNormalised
import_nam_file_with(slot, path, Measure::App)import_nam_file(slot, path, measure="app", normalise=False)The official app's algorithm (a few seconds)The model's own
import_nam_file_as(slot, path, measure, normalise)import_nam_file(slot, path, measure=…, normalise=…)App, Clean or OptimisedYour choice
import_ir_file(slot, path)import_ir_file(slot, path)Optimised (a 384-tap fit to the whole IR)The app's
import_ir_file_with(slot, path, ir::Method::App)import_ir_file(slot, path, method="app")Exactly the official conversionThe app's

Python defaults

Python's import_nam_file normalises the level by default for every measure; Rust's import_nam_file_with never does. Pass normalise=False to keep a model's own level, as the official app does.

  • Without the nam feature (Rust), import_nam_file* don't exist and import_ir_file falls back to the official conversion (feature flags).
  • What the options mean: Converting NAM models.

Import converted data ​

If you already have the 2048 floats (from nam::convert, ir::convert, a cache, or a captured upload), upload them directly:

rust
// data: 2048 converted floats
dev.import_user_amp(2, "Jcm800", &data, 1.0)?;   // USER AMP 03
dev.import_user_ir(0, "My Cab", &data)?;         // USER IR 01
python
dev.import_user_amp(2, "Jcm800", floats)         # USER AMP 03 (factor=1.0 by default)
dev.import_user_ir(0, "My Cab", floats)          # USER IR 01

Both send the official app's sequences, tested byte for byte against every captured import:

CallSends
import_user_amp(slot, name, data, factor)Selects amp model 30 + slot, writes the slot-info record (name, gain factor), then 61 data chunks. The factor is 1.0 in every official import
import_user_ir(slot, name, data)Shows the CAB page, selects cab model 30 + slot, sends 61 data chunks, then the 0x09 name write

Each chunk waits for its ack before the next goes out. upload::Reassembler turns captured chunks back into floats, so a captured conversion can be uploaded to any slot.

Rename a slot ​

rust
dev.rename_user_amp(2, "Marshall JCM800")?;   // only the name; the sound stays as it is
dev.rename_user_ir(0, "SVT 8x10 57")?;
python
dev.rename_user_amp(2, "Marshall JCM800")     # only the name; the sound stays as it is
dev.rename_user_ir(0, "SVT 8x10 57")
  • What it sends: only the name record of an import (the AMP slot-info write, the IR 0x09 name write), then a re-read of the slot.
  • The sound is unchanged: confirmed on the pedal; a slot's sweep response before and after differs by at most 0.09 dB (rig noise).
  • Names are cut to 31 characters. The official app's IR imports use at most 16.
  • The official app can't rename a slot; this is an open-stomp addition (since 0.5.1).

Delete a slot ​

rust
dev.delete_user_amp(2)?;   // deletes USER AMP 03 and re-reads its info
python
dev.delete_user_amp(2)

This sends the official app's delete and re-reads the slot's info, like the app. The library has no call to delete a user IR slot.

Read a slot back ​

read_user_amp(slot) and read_user_ir(slot) ask the pedal for a slot's 2048 floats. Rust only for now; they are not in the Python bindings.

  • Replies: 61 Update::Messages, one per 136-byte chunk: 0x58 (AMP) or 0x10 (IR) with dir 2. Collect them with upload::Reassembler.
  • Origin: the official app never does this. It was found by probing and checked byte for byte on the pedal (since 0.6.2).
  • Use: back a slot up before overwriting it, or check what an upload stored.
rust
use open_stomp::device::Update;
use open_stomp::midi::{Cmd, Msg};
use open_stomp::upload::{Chunk, Reassembler, amp_sub};

dev.read_user_amp(2)?;                              // USER AMP 03
let mut slot_data = Reassembler::default();
while let Ok(update) = dev.recv() {
    let Update::Message { bytes, .. } = update else { continue };
    let Msg::Nep { cmd, dir: 2, payload } = Msg::parse(&bytes) else { continue };
    if cmd != Cmd::UserAmp as u8 {
        continue;
    }
    let Some(chunk) = Chunk::parse(&payload) else { continue };
    if chunk.sub != amp_sub::READ_DATA {
        continue;
    }
    if let Some((slot, floats)) = slot_data.push(&chunk) {
        println!("USER AMP {:02}: {} floats", slot + 1, floats.len());
        break;
    }
}

For an IR slot, call read_user_ir and match Cmd::IrData with upload::IR_DATA_SUB. Keep applying the other updates to your DeviceState as usual.

Errors ​

The upload calls check the slot and the data before sending anything.

Rust UploadErrorCausePython
Slot(n)Slot outside 0–9ValueError
Length(n)Not exactly 2048 floatsValueError
NotFiniteNaN or infinite valuesValueError
  • import_nam_file* / import_ir_file* return Box<dyn Error + Send + Sync> in Rust, wrapping the UploadError, a nam::NamError (bad or unsupported model) or a WAV / I/O error. Python raises OSError for file errors and ValueError for the rest.
  • Refused sends: if the engine isn't connected (or is listen-only), the call still returns Ok but the engine refuses the upload with an Update::Info { error: true } (connecting).
  • Validate without a device: upload::check(slot, &data).

Upload building blocks ​

For your own transport, the upload module builds the same frames the engine sends:

FunctionReturns
user_amp_upload(&UserAmpInfo, &data)Slot-info write + data chunks (select amp model 30 + slot just before, as the app does)
user_ir_upload(slot, name, &data)Data chunks + name write (select cab model 30 + slot just before)
user_amp_delete(slot)The delete write
user_ir_name(slot, name)The 0x09 name write
user_amp_read(slot), user_ir_read(slot)61 read requests (Rust only)
UserAmpInfo::new(slot, name, factor), parse, to_raw, write_frameThe 128-byte slot-info record, kept whole so unknown bytes survive
Chunk::parse, to_packed; ReassemblerOne chunk; collecting chunks back into floats
data_frames(cmd, slot, sub, &bytes), floats_to_bytes, bytes_to_floatsLow-level framing

Constants: CHUNK_BYTES (136, i.e. 34 floats), UPLOAD_FLOATS (2048), USER_SLOTS (10), USER_MODEL_BASE (30), AMP_INFO_LEN (128), IR_DATA_SUB, and the amp_sub sub-commands (Python: AMP_SUB_*).

MIT or Apache-2.0. Not affiliated with SORAN.