AttackOffset
File: Rhapsodist/Processors/AttackOffset.js.
Overview
Applies a randomised sample start offset and volume fade-in. Scaled separately for a note’s initial attack versus a rapid repetition of the same note (within 0.2s), and further scaled by velocity between MinVelocity and MaxVelocity.
A repetition never scales below half its maximum offset/fade; a fresh attack can scale all the way to zero at the highest tracked velocity.
Parameters
| ID | Description |
|---|---|
Mute | Disables the processor; no offset or fade is applied while on. |
AttackOffset | Max sample start offset for a fresh attack, -1–20000 samples. |
RepeatOffset | Max sample start offset for a repeated attack, -1–20000 samples. |
AttackFade | Max fade-in time for a fresh attack, 0–500 ms. |
RepeatFade | Max fade-in time for a repeated attack, 0–500 ms. |
MinVelocity / MaxVelocity | Velocity range (0–127) over which offset/fade are scaled by velocity. |
-1 on an offset knob tells HISE to use the sample’s own configured Sample Start Offset, so these knobs only matter on samples that have one set.
Usage
Load into a sampler’s MIDI Processor chain and set the knobs to taste.
Internal Reference
| Function | Description | Returns |
|---|---|---|
getScaledValue(maxValue: number, velocity: number, minValue: number) | Scales maxValue by velocity position between MinVelocity/MaxVelocity, floored at minValue as a fraction of maxValue, then applies +/-10% random jitter. Returns maxValue unchanged if it’s -1. | number |