Delay-Attack-Hold-Decay-Sustain-Release with per-stage curves and velocity. More...
#include <envelope.hpp>
Public Member Functions | |
| void | prepare (double sample_rate) |
| void | set_delay_ms (double ms) |
| void | set_attack_ms (double ms) |
| void | set_hold_ms (double ms) |
| void | set_decay_ms (double ms) |
| void | set_sustain (SampleType level) |
| void | set_release_ms (double ms) |
| void | set_attack_curve (float c) |
| void | set_decay_curve (float c) |
| void | set_release_curve (float c) |
| void | set_curve (double c) |
| void | set_loop (bool on, int count=0) |
| void | note_on (SampleType velocity=SampleType{1}) |
| void | note_off () |
| void | gate_on () |
| void | gate_off () |
| void | reset () |
| SampleType | next () |
| SampleType | current () const |
| SampleType | value () const |
| bool | active () const |
| int | loops_completed () const |
| EnvelopeStage | stage () const |
Delay-Attack-Hold-Decay-Sustain-Release with per-stage curves and velocity.
USE: the superset for layered and orchestral patches. The delay staggers layers — a swell pad arriving under a pluck is one parameter, not a second voice. The hold shapes the pre-decay plateau. The per-stage curves are what let a synthesized contour match a sampled instrument's. When in doubt about which mod source a matrix slot should carry, this is it.
Velocity scales the peak, so the decay floor (sustain * velocity) tracks it too — a soft note is quieter throughout, not just at its attack.
In looping mode the sustain stage is skipped: an envelope that stops to wait for a note-off cannot also be a cycling source.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |