SamplerPurgeHandler
File: Rhapsodist/Core/Processors/SamplerPurgeHandler.js · Expected module ID: the shell references samplerPurgeHandler.
Overview
A standalone Script Processor providing “Lazy Load” and per-sampler purge state. Purge/lazy-load is an engine-level resource-management feature.
Parameters
| ID | Description |
|---|---|
LazyLoad | Toggles global Lazy Load mode. |
PurgeState | A 50-slot slider pack (one slot per sampler) storing each sampler’s purge state (0 = always purged, 1 = loaded/lazy-loadable), bound to LazyLoad from the Settings window. |
Usage
Add SamplerPurgeHandler.js as a Script Processor referenced as samplerPurgeHandler, and link the shell’s btnLazyLoad toggle (see the btnLazyLoad component in ShellLayout / UserSettings).
A sampler whose PurgeState slot is 0 stays fully purged regardless of the Lazy Load setting. A sampler whose slot is 1 loads normally while Lazy Load is off; with Lazy Load on, it instead loads its samples on demand as they’re played (HISE’s “play from purge” mode) rather than up front.
Internal Reference
| Function | Description | Returns |
|---|---|---|
updateSamplerPurgeState(samplerIndex, state) | Computes and sets the sampler’s Purged attribute from its PurgeState slot value and the current LazyLoad state. | — |