Expand description
User AMP (NAM, SysEx 0x58) and user IR (SysEx 0x10 + 0x09) uploads (docs/05).
Both send a converted model as 2048 little-endian f32s (8192 bytes) in chunks of 136
bytes, each a packed SysEx write acknowledged before the next. Every chunk starts with a
12-byte header:
[0] 0 [1] slot [2] sub-command [3] 0 [4..8] byte offset (u32 LE) [8..12] total length (u32 LE)A user AMP upload is preceded by a 128-byte slot-info record (sub 3) carrying the name and a
gain factor; a user IR upload is followed by a 0x09 name write. Converting a .nam or
audio file into the 2048 floats is done by the nam and ir modules (docs/05).
Modules§
- amp_sub
0x58sub-commands (unpacked header byte 2).
Structs§
- Chunk
- One upload chunk (or a header-only request/ack), unpacked.
- Reassembler
- Collects the data chunks of one upload (in any order) back into its floats.
- User
AmpInfo - The 128-byte user AMP slot-info record (
0x58sub 3 write, sub 4 reply), kept whole so unknown bytes survive.
Enums§
- Upload
Error - Why an upload was refused.
Constants§
- AMP_
INFO_ LEN - CHUNK_
BYTES - Bytes of payload per chunk (34 floats).
- IR_
DATA_ SUB 0x10sub-command for IR data.- UPLOAD_
FLOATS - Floats per upload, as the official app sends them.
- USER_
MODEL_ BASE - Model number of user slot 0 (USER AMP 01 / USER IR 01).
- USER_
SLOTS - Number of user AMP slots (amp models 30–39) and user IR slots (cab models 30–39).
Functions§
- bytes_
to_ floats - check
- Check a slot and model data before uploading.
- data_
frames - Split
dataintoCHUNK_BYTESwrite frames forcmd(0x58NAM data,0x10IR data). The slot goes where each command expects it: header byte 1 for NAM, byte 0 for IR data. - floats_
to_ bytes - Model data as the little-endian bytes the pedal receives.
- user_
amp_ delete - Delete a user AMP slot (the app re-reads its info afterwards).
- user_
amp_ upload - The official app’s user AMP import: slot-info record, then the model data. The app selects
the slot’s amp model (
host::head(Module::Amp, 30 + slot, true)) just before. - user_
ir_ name - The
0x09user IR name write:<slot> <packed: 01 00 00 00, 32-byte name>. The first field was1after an upload (meaning unknown, docs/09). - user_
ir_ upload - The official app’s user IR import: the data (slot in header byte 0, unlike NAM’s byte 1), then
the name. Checked byte for byte against imports into all ten slots
(
captures/logs/02-ir-tests.log). The app selects the slot’s cab model (host::head(Module::Cab, 30 + slot, true)) just before.