@maruaudio/dsp/neural/nam-a2-resource-spec holds the numeric contract for a prepared standard NAM A2 resource: the constants that pack writers and portable Processor readers share, so a module can check a prepared packet without importing the model tooling. It declares no state, parses no JSON and selects no model; that stays in @maruaudio/nam-runtime, whose pack-spec entry re-exports these constants.
| Constant | Value | Meaning |
|---|---|---|
NAM_PACK_MAGIC | 0x4E414D | First float of one model pack |
NAM_PACK_A2_ARCHITECTURE_CODE | 3 | Architecture code for standard A2 |
NAM_PACK_A2_HEADER_LENGTH | 11 | Floats before the weights of an A2 pack |
NAM_PACK_ABSENT | −1e9 | Marks an absent optional value, such as loudness |
NAM_A2_BUNDLE_MAGIC | 0x4E4150 | First float of a Lite-plus-Full bundle |
NAM_A2_BUNDLE_VERSION | 1 | Bundle layout version |
NAM_A2_BUNDLE_HEADER_LENGTH | 4 | Magic, version, Lite pack length, Full pack length |
NAM_A2_BUNDLE_MAX_ELEMENTS | 14,043 | Exact bundle length: the header, then the Lite and Full packs |
Lifecycle
None: immutable constants, read at preparation time.
When to use it
Writing or validating a prepared A2 bundle on either side of the boundary: the packer in @maruaudio/nam-runtime writes it, and the Capture Player Processor checks the magic, version, lengths, architecture code and rate of each pack before it builds @maru/processors-nam-a2 state.
Limits
- Standard A2 only. The bundle carries one Lite (3-channel) and one Full (8-channel) pack; 14,043 is 4 + (11 + 1,871) + (11 + 12,146).
- The constants fix the layout; validating the weights themselves belongs to
@maru/processors-nam-a2.