Exponential curve with variable curvature. More...
#include <Envelope.h>
Public Member Functions | |
| Curve (Tp length, Tp curve, Tv end=Tv(1), Tv start=Tv(0)) | |
| bool | done () const |
| Returns whether curve has gone past end value. | |
| Tv | end () const |
| Get end value. | |
| Tv | value () const |
| Get current value. | |
| Tv | operator() () |
| Generates next value. | |
| Curve & | reset (Tv start=Tv(0)) |
| Reset envelope. | |
| Curve & | value (const Tv &v) |
| Set value. | |
| Curve & | set (Tp length, Tp curve, Tv end=Tv(1), Tv start=Tv(0)) |
| Set length and curvature. | |
Exponential curve with variable curvature.
This curve will return values in the interval [start, end] starting from 0 and ending on 'end' over its length in samples. The last point is exclusive, so it takes length + 1 samples to reach 'end' inclusively. For iterations exceeding the specified length, the values returned will be unbounded.
| Tv | value (sample) type |
| Tp | parameter type |
| Curve | ( | Tp | length, |
| Tp | curve, | ||
| Tv | end = Tv(1), |
||
| Tv | start = Tv(0) |
||
| ) |
| [in] | length | length of curve in samples |
| [in] | curve | curvature, c, where c > 0 approaches slowly (accelerates), c < 0 approaches rapidly (decelerates), and c = 0 approaches linearly |
| [in] | end | end value |
| [in] | start | start value |
Set length and curvature.
| [in] | length | length of curve in samples |
| [in] | curve | curvature; pos. approaches slowly, neg. approaches rapidly, 0 approaches linearly |
| [in] | end | end value |
| [in] | start | start value |