The DAHDSR superset state machine. More...
#include <envelope.hpp>
Public Types | |
| using | Stage = EnvelopeStage |
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_release_ms (double ms) |
| void | set_attack_curve (float c) |
| void | set_decay_curve (float c) |
| void | set_release_curve (float c) |
| void | set_sustain (SampleType level) |
| void | set_has_sustain (bool on) |
| void | set_gate_driven (bool on) |
| void | set_loop (bool on, int count) |
| void | reset () |
| void | trigger (SampleType velocity) |
| void | release () |
| SampleType | next () |
| SampleType | current () const |
| Stage | stage () const |
| bool | active () const |
| int | loops_completed () const |
Static Public Attributes | |
| static constexpr int | kMaxLoops = 128 |
The DAHDSR superset state machine.
Every public envelope in this header is this engine with some stages disabled and some behavior flags set, so the stage timing, the curve law, retrigger-from-current-level, and looping have exactly one implementation to get right.
RT contract: fixed scalar state; next(), trigger(), release(), and reset() allocate nothing.
| using pulp::signal::detail::EnvelopeEngine< SampleType >::Stage = EnvelopeStage |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
staticconstexpr |