@maruaudio/dsp/voices/sampler-bus-slot defines the layout of the sampler's effect-bus table (): the f32 data slot a host stages after the zone table and the sampler Processor reads. Bus 1 is the instrument chain with its live schema parameters and is not in the table; buses 2 to 4 are preset content. The DSP node is constants and two index functions; the sampler Processor owns validation and dispatch.
Parameters
| Region of the table | Elements |
|---|---|
| Header | 8: [version, busMask, zoneCount, reserve, 0, 0, 0, 0], version 1 |
| Bus 2, 3, 4 | 105 chain values each (SAMPLER_BUS_CHAIN_VALUES), in the multi-effect chain's schema order |
| Zones | zoneCount bus codes from element 323 (SAMPLER_BUS_ZONES_FIRST), at most 1024 |
busMask bit 0 is bus 2, bit 1 bus 3, bit 2 bus 4; a clear bit means the bus is off and its block must be zeros. A zone code of 0 is bus 1 and 1 to 3 are buses 2 to 4; a code naming an off bus still routes there and passes dry. A full slot is 1347 elements (SAMPLER_BUS_SLOT_ELEMENTS).
| Function | Returns |
|---|---|
samplerBusBlockFirst(bus) | First element of bus 2..4's block: 8 + (bus − 2) × 105 |
samplerBusMacroTarget(bus, chainIndex) | 1000 + (bus − 2) × 105 + chainIndex, for chain indices 1..104 (never the chain order); targets end before 1315 |
Lifecycle
Stateless. The host packs the table at preset load; the Processor validates and installs it at resource load. A table's length is 323 + zoneCount; an empty load means no table (every zone on bus 1, buses 2 to 4 off). A reservation, the header alone with column 3 set to 1, sizes every effect family of every extra bus once from a non-realtime entry, so later loads allocate nothing.
When to use it
Packing or reading the sampler's extra effect buses from a host, an SDK staging helper or a native shell, so every side agrees on the same element offsets.
Limits
- Layout only: the leaf does not check the table, the mask or the zone codes.
- The functions do not range-check
busorchainIndex.