Klang C++
Language Reference (draft)
|
Attack-Decay-Sustain-Release Envelope. More...
#include <klang.h>
Public Types | |
enum | Mode { Time , Rate } |
enum | Stage { Sustain , Release , Off } |
Envelope stage. More... | |
Public Member Functions | |
ADSR () | |
void | set (param attack, param decay, param sustain, param release) override |
void | release (float time=0.f, float level=0.f) override |
bool | operator== (Envelope::Stage stage) const |
bool | operator!= (Stage stage) const |
operator float () const | |
void | set (const std::vector< Point > &points) |
void | set (const Points &point) |
void | set (Ramp *ramp) |
void | sequence () |
void | setLoop (int startPoint, int endPoint) |
signal | at (param time) const |
void | resetLoop () |
void | setStage (Stage stage) |
const Stage | getStage () const |
float | getLength () const |
bool | finished () const |
void | initialise () |
void | resize (float length) |
void | setTarget (const Point &point, float time=0.0) |
signal & | operator++ (int) |
void | process () override |
const Point & | operator[] (int point) const |
void | setMode (Mode mode) |
Mode | mode () const |
Output< signal > & | operator() (params... p) |
operator const signal & () override | |
operator const signal & () const override | |
virtual const signal & | output () const |
TYPE & | operator>> (TYPE &destination) |
signal | operator+ (TYPE &other) |
signal | operator* (TYPE &other) |
signal | operator- (TYPE &other) |
signal | operator/ (TYPE &other) |
Public Attributes | |
param | A |
param | D |
param | S |
param | R |
enum klang::ADSR::Mode | mode = Time |
signal | out |
Protected Attributes | |
void(Envelope::* | setTargetFunction )(const Point &point, float time) = &Envelope::setTargetTime |
std::vector< Point > | points |
Loop | loop |
int | point |
float | time |
float | timeInc |
Stage | stage |
std::shared_ptr< Ramp > | ramp |
enum klang::ADSR::Mode |
|
inherited |
|
inline |
Definition at line 2996 of file klang.h.
References set().
Definition at line 2815 of file klang.h.
References klang::Envelope::Point::Point(), klang::signal::operator-(), klang::Envelope::points, klang::Envelope::Point::x, and klang::Envelope::Point::y.
|
inlineinherited |
Definition at line 2855 of file klang.h.
References klang::Envelope::getStage(), and klang::Envelope::Off.
|
inlineinherited |
Definition at line 2844 of file klang.h.
References klang::Envelope::points, and klang::Envelope::Point::x.
Referenced by klang::Envelope::resize().
|
inlineinherited |
Definition at line 2841 of file klang.h.
References klang::Envelope::stage.
Referenced by klang::Envelope::finished(), and operator==().
|
inlineinherited |
Definition at line 2860 of file klang.h.
References klang::Envelope::loop, klang::Envelope::point, klang::Envelope::points, klang::Envelope::ramp, klang::Envelope::Loop::reset(), klang::Envelope::setTarget(), klang::Envelope::Ramp::setValue(), klang::Envelope::stage, klang::Envelope::Sustain, klang::Envelope::timeInc, klang::Envelope::Point::x, and klang::Envelope::Point::y.
Referenced by klang::Envelope::resize(), klang::Envelope::sequence(), set(), klang::Envelope::set(), klang::Envelope::set(), and klang::Envelope::set().
|
inlineinherited |
Definition at line 2955 of file klang.h.
References klang::Envelope::Rate, klang::Envelope::setTargetFunction, klang::Envelope::setTargetTime(), and klang::Envelope::Time.
Referenced by klang::Envelope::operator++().
|
inlineoverridevirtualinherited |
|
inlineoverridevirtualinherited |
Reimplemented from klang::Generic::Output< signal >.
Definition at line 1415 of file klang.h.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 2898 of file klang.h.
References klang::Envelope::Loop::end, klang::Envelope::Loop::isActive(), klang::Envelope::Ramp::isActive(), klang::Envelope::loop, klang::Envelope::mode(), klang::Envelope::Off, klang::Envelope::Ramp::operator++(), klang::Envelope::point, klang::Envelope::points, klang::Envelope::ramp, klang::Envelope::Rate, klang::Envelope::Release, klang::Envelope::setTarget(), klang::Envelope::Ramp::setValue(), klang::Envelope::stage, klang::Envelope::Loop::start, klang::Envelope::Sustain, klang::Envelope::time, klang::Envelope::timeInc, klang::Envelope::Point::x, and klang::Envelope::Point::y.
|
inlineinherited |
|
inlineinherited |
|
inline |
Definition at line 3017 of file klang.h.
References klang::Envelope::getStage().
|
inlineinherited |
|
inlineinherited |
Definition at line 2938 of file klang.h.
References klang::Envelope::points.
|
inlinevirtualinherited |
|
inlineoverridevirtualinherited |
Implements klang::Generic::Output< signal >.
Definition at line 2933 of file klang.h.
References klang::Envelope::ramp.
|
inlineoverridevirtual |
Reimplemented from klang::Envelope.
Definition at line 3013 of file klang.h.
References R, and klang::Envelope::release().
|
inlineinherited |
Definition at line 2831 of file klang.h.
References klang::Envelope::loop, klang::Envelope::point, klang::Envelope::points, klang::Envelope::Loop::reset(), klang::Envelope::setTarget(), klang::Envelope::stage, klang::Envelope::Sustain, and klang::Envelope::Point::x.
|
inlineinherited |
Definition at line 2877 of file klang.h.
References klang::Envelope::getLength(), klang::Envelope::initialise(), klang::Envelope::points, and klang::Envelope::Point::x.
|
inlineinherited |
Definition at line 2798 of file klang.h.
References klang::Envelope::initialise(), klang::Envelope::points, and klang::Envelope::Point::x.
Definition at line 2998 of file klang.h.
References klang::Envelope::Point::Point(), A, D, klang::Envelope::initialise(), klang::signal::operator+(), klang::Envelope::points, R, S, and klang::Envelope::setLoop().
Referenced by ADSR().
|
inlineinherited |
Definition at line 2785 of file klang.h.
References klang::Envelope::initialise(), and klang::Envelope::points.
Referenced by klang::Envelope::Envelope(), and klang::Envelope::Envelope().
|
inlineinherited |
Definition at line 2779 of file klang.h.
References klang::Envelope::initialise(), and klang::Envelope::points.
Referenced by klang::Envelope::Envelope(), klang::Envelope::Envelope(), and klang::Envelope::operator=().
|
inlineinherited |
Definition at line 2943 of file klang.h.
References klang::Envelope::initialise(), and klang::Envelope::ramp.
|
inlineinherited |
Definition at line 2809 of file klang.h.
References klang::Envelope::loop, klang::Envelope::points, and klang::Envelope::Loop::set().
Referenced by set().
|
inlineinherited |
Definition at line 2948 of file klang.h.
References klang::Envelope::setTargetFunction, klang::Envelope::setTargetRate(), klang::Envelope::setTargetTime(), and klang::Envelope::Time.
|
inlineinherited |
Definition at line 2838 of file klang.h.
References klang::Envelope::stage.
|
inlineinherited |
Definition at line 2893 of file klang.h.
References klang::Envelope::setTargetFunction.
Referenced by klang::Envelope::initialise(), klang::Envelope::operator++(), klang::Envelope::release(), and klang::Envelope::resetLoop().
|
inlineprotectedinherited |
Definition at line 2967 of file klang.h.
References klang::Envelope::ramp, klang::Envelope::Ramp::setRate(), klang::Envelope::Ramp::setTarget(), klang::Envelope::Ramp::setValue(), klang::Envelope::time, klang::Envelope::Point::x, and klang::Envelope::Point::y.
Referenced by klang::Envelope::setMode().
|
inlineprotectedinherited |
Definition at line 2961 of file klang.h.
References klang::Generic::operator/(), klang::Envelope::ramp, klang::Envelope::Ramp::setRate(), klang::Envelope::Ramp::setTarget(), klang::Envelope::time, klang::Envelope::Point::x, and klang::Envelope::Point::y.
Referenced by klang::Envelope::mode(), and klang::Envelope::setMode().
|
protectedinherited |
Definition at line 2978 of file klang.h.
Referenced by klang::Envelope::initialise(), klang::Envelope::operator++(), klang::Envelope::resetLoop(), and klang::Envelope::setLoop().
enum klang::ADSR::Mode klang::ADSR::mode = Time |
|
inherited |
|
protectedinherited |
Definition at line 2980 of file klang.h.
Referenced by klang::Envelope::initialise(), klang::Envelope::operator++(), and klang::Envelope::resetLoop().
|
protectedinherited |
Definition at line 2977 of file klang.h.
Referenced by klang::Envelope::Envelope(), klang::Envelope::at(), klang::Envelope::getLength(), klang::Envelope::initialise(), klang::Envelope::operator++(), klang::Envelope::operator[](), klang::Envelope::resetLoop(), klang::Envelope::resize(), klang::Envelope::sequence(), set(), klang::Envelope::set(), klang::Envelope::set(), and klang::Envelope::setLoop().
|
protectedinherited |
Definition at line 2984 of file klang.h.
Referenced by klang::Envelope::Envelope(), klang::Envelope::Envelope(), klang::Envelope::Envelope(), klang::Envelope::Envelope(), klang::Envelope::initialise(), klang::Envelope::operator++(), klang::Envelope::process(), klang::Envelope::set(), klang::Envelope::setTargetRate(), and klang::Envelope::setTargetTime().
|
protectedinherited |
Definition at line 2959 of file klang.h.
Referenced by klang::Envelope::mode(), klang::Envelope::setMode(), and klang::Envelope::setTarget().
|
protectedinherited |
Definition at line 2982 of file klang.h.
Referenced by klang::Envelope::getStage(), klang::Envelope::initialise(), klang::Envelope::operator!=(), klang::Envelope::operator++(), klang::Envelope::operator==(), klang::Envelope::release(), klang::Envelope::resetLoop(), and klang::Envelope::setStage().
|
protectedinherited |
Definition at line 2981 of file klang.h.
Referenced by klang::Envelope::operator++(), klang::Envelope::setTargetRate(), and klang::Envelope::setTargetTime().
|
protectedinherited |
Definition at line 2981 of file klang.h.
Referenced by klang::Envelope::initialise(), and klang::Envelope::operator++().