Attack-Release, gate-driven. More...
#include <envelope.hpp>
Public Member Functions | |
| void | prepare (double sample_rate) |
| void | set_attack_ms (double ms) |
| void | set_release_ms (double ms) |
| void | set_attack_curve (float c) |
| void | set_release_curve (float c) |
| void | set_curve (double c) |
| Round-2 compatibility curve: 0 is linear and 1 is the strongest capacitor-like attack/release pair. | |
| void | gate (bool on) |
| Gate edges drive the envelope; repeated calls with the same state are no-ops, so this can be called every sample from a gate signal. | |
| void | gate_on () |
| Convenience spelling with exactly the same level-before-advance sample ordering as gate(true). | |
| void | gate_off () |
| void | reset () |
| SampleType | next () |
| SampleType | current () const |
| SampleType | value () const |
| bool | active () const |
| EnvelopeStage | stage () const |
Attack-Release, gate-driven.
Attack while the gate is high, sustain at 1, release when it falls.
USE: the sustained-gate workhorse — pad and drone VCAs, gate-CV amplitude, and sidechain duck-and-recover shapes (invert it through an AttenuverterT). When a sound has no decay stage, this is the right primitive; an ADSR with sustain pinned to 1 is the same shape with three more parameters to explain and get wrong.
|
inline |
|
inline |
|
inline |
Gate edges drive the envelope; repeated calls with the same state are no-ops, so this can be called every sample from a gate signal.
|
inline |
|
inline |
Convenience spelling with exactly the same level-before-advance sample ordering as gate(true).
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Round-2 compatibility curve: 0 is linear and 1 is the strongest capacitor-like attack/release pair.
The shared engine's signed curves use opposite signs for rising and falling segments.
|
inline |
|
inline |
|
inline |
|
inline |