ADSR envelope generator. Sample-accurate triggering inside an AudioWorklet — no main-thread latency between trigger and ramp-start.
Category: Control
| Name | Type | Description |
|---|
| trigger | control | One-shot. Rising edge runs attack → decay → release (sustain stage is skipped). |
| gate | control | Held. Rising edge starts attack/decay/sustain; falling edge starts release. |
| attack | control | Attack-time CV in seconds. Adds to the `attack` parameter. |
| decay | control | Decay-time CV in seconds. Adds to the `decay` parameter. |
| sustain | control | Sustain-level CV. Adds to the `sustain` parameter. |
| release | control | Release-time CV in seconds. Adds to the `release` parameter. |
Outputs
| Name | Type | Description |
|---|
| out | control | Envelope signal, 0–1. |
Parameters
| Name | Type | Default | Range | Unit | Description |
|---|
| curve | enum | linear | linear, exponential, cosine | — | Segment shape. Linear is straight ramps; exponential mimics analog R/C circuits; cosine has zero slope at endpoints (smoothest, fewest clicks). |
| attack | number | 0.01 | 0.001–5 (log) | s | Attack time in seconds (gate-on → peak). |
| decay | number | 0.1 | 0.001–5 (log) | s | Decay time in seconds (peak → sustain level). |
| sustain | number | 0.7 | 0–1 | — | Sustain level held while gate is high (0–1). |
| release | number | 0.3 | 0.001–10 (log) | s | Release time in seconds (gate-off → 0). |