|
HART
0.1.0
High level Audio Regression and Testing
|
A simple envelope constructed from semgents. More...
#include <hart_segmentedenvelope.hpp>
Public Types | |
| enum class | Shape { linear , exponential , sCurve } |
| Determines a shape of ramp curve. More... | |
Public Member Functions | |
| SegmentedEnvelope (double startValue) | |
| Creates a segmented envelope instance. | |
| void | renderNextBlock (size_t blockSize, std::vector< double > &valuesOutput) override |
| void | prepare (double sampleRateHz, size_t) override |
| void | reset () override |
| SegmentedEnvelope & | hold (double durationSeconds) |
| Adds a flat horizontal section to the envelope. | |
| SegmentedEnvelope & | rampTo (double targetValue, double durationSeconds, Shape shape=Shape::linear) |
| Adds a transitional section to the envelope. | |
| std::unique_ptr< Envelope > | copy () const override |
| Created a copy of the envelope wrapped in a smart pointer. | |
Public Member Functions inherited from Envelope | |
| virtual | ~Envelope ()=default |
| std::vector< double > | renderNextBlock (size_t blockSize) |
A simple envelope constructed from semgents.
Definition at line 15 of file hart_segmentedenvelope.hpp.
Determines a shape of ramp curve.
| Enumerator | |
|---|---|
| linear | Linear curve. |
| exponential | Exponential curve. |
| sCurve | S-curve. |
Definition at line 21 of file hart_segmentedenvelope.hpp.
|
inline |
Creates a segmented envelope instance.
| startValue | Initial value of the envelope, in any unit |
Definition at line 30 of file hart_segmentedenvelope.hpp.
|
inlineoverridevirtual |
Implements Envelope.
Definition at line 38 of file hart_segmentedenvelope.hpp.
Implements Envelope.
Definition at line 53 of file hart_segmentedenvelope.hpp.
|
inlineoverridevirtual |
Implements Envelope.
Definition at line 61 of file hart_segmentedenvelope.hpp.
|
inline |
Adds a flat horizontal section to the envelope.
| durationSeconds | Duration of the new segment in seconds |
Definition at line 70 of file hart_segmentedenvelope.hpp.
|
inline |
Adds a transitional section to the envelope.
| targetValue | Value at the end of transition, in any unit |
| durationSeconds | Duration of the the transition in seconds |
| shape | Shape of the transition ramp curve |
Definition at line 81 of file hart_segmentedenvelope.hpp.
|
inlineoverridevirtual |
Created a copy of the envelope wrapped in a smart pointer.
Implements Envelope.
Definition at line 90 of file hart_segmentedenvelope.hpp.