|
Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Definition at line 48 of file segment.hpp.
#include <segment.hpp>
Public Member Functions | |
| void | configure (const Segment *segments, uint8_t count, int8_t sustain_index=-1) |
| void | gate_on () |
| void | gate_on (float velocity) |
| Start with velocity — sets gate_strength to the given value. | |
| void | gate_off () |
| void | set_gate_su (float gate) |
| void | retrigger () |
| Retrigger: restart from current level without requiring gate_off first. | |
| void | process (float *out, uint16_t frames) |
| Fill output buffer with envelope levels (float [0.0, 1.0]). | |
| float | level () const |
| float | gate_strength () const |
| bool | active () const |
| SegmentState | state () const |
| uint8_t | current_segment_index () const |
Static Public Attributes | |
| static constexpr uint8_t | MAX_SEGMENTS = 8 |
|
inline |
Configure the segment sequence.
| segments | Array of segments (copied internally, up to MAX_SEGMENTS) |
| count | Number of segments |
| sustain_index | Segment index to hold at (-1 = no sustain) |
Definition at line 60 of file segment.hpp.
References sbl::dsp::widgets::SegmentGenerator< CurveEngine >::MAX_SEGMENTS.
|
inline |
Start the envelope from segment 0. If already running, restarts from the current level (retrigger behavior).
Definition at line 73 of file segment.hpp.
References sbl::dsp::widgets::Idle, and sbl::dsp::widgets::Running.
|
inline |
Start with velocity — sets gate_strength to the given value.
Definition at line 83 of file segment.hpp.
References sbl::dsp::widgets::Idle, and sbl::dsp::widgets::Running.
|
inline |
Release the envelope. If in sustain, jumps to the next segment (typically release). If running pre-sustain, jumps to release. If no sustain configured, does nothing.
Definition at line 95 of file segment.hpp.
References sbl::dsp::widgets::Running, and sbl::dsp::widgets::Sustain.
|
inline |
Accept a normalized gate signal. Detects edges to trigger/release. The gate value is stored for strength access (velocity/amplitude).
Definition at line 114 of file segment.hpp.
References sbl::dsp::widgets::Idle, sbl::dsp::widgets::Running, and sbl::dsp::widgets::Sustain.
|
inline |
Retrigger: restart from current level without requiring gate_off first.
Definition at line 144 of file segment.hpp.
References sbl::dsp::widgets::Running.
|
inline |
Fill output buffer with envelope levels (float [0.0, 1.0]).
Definition at line 154 of file segment.hpp.
References sbl::dsp::widgets::Running, and sbl::dsp::widgets::Segment::target.
|
inline |
Definition at line 174 of file segment.hpp.
|
inline |
Definition at line 175 of file segment.hpp.
|
inline |
Definition at line 177 of file segment.hpp.
References sbl::dsp::widgets::Complete, and sbl::dsp::widgets::Idle.
|
inline |
Definition at line 181 of file segment.hpp.
|
inline |
Definition at line 182 of file segment.hpp.
|
staticconstexpr |
Definition at line 52 of file segment.hpp.
Referenced by sbl::dsp::widgets::SegmentGenerator< CurveEngine >::configure().