Multi-layer (multi-mic / velocity-layer) selection over a SampleZoneMap. More...
Go to the source code of this file.
Namespaces | |
| namespace | pulp |
| namespace | pulp::audio |
Functions | |
| std::size_t | pulp::audio::select_layers (const SampleZoneMap &map, const ZoneSelectionRequest &request, ZoneSelection *out, std::size_t max_out) noexcept |
| Resolve a trigger to every zone that should sound. | |
Multi-layer (multi-mic / velocity-layer) selection over a SampleZoneMap.
ZoneSelector::select() returns the single best zone for a trigger. A multisample instrument often needs several zones to sound at once: multiple microphone positions, or overlapping velocity layers that crossfade. This helper returns every zone that should sound for one (note, velocity) trigger, while still rotating round-robin variations within each non-zero round_robin_group (so RR alternates are not all triggered together).
Selection rules:
RT-safe when the map is immutable for the duration of the call: no allocation, no locking. O(zones^2) in the worst case, which is negligible for realistic zone counts.