Interpolation envelope segment. More...
#include <Envelope.h>
Inherits Ts.
Public Member Functions | |
| Seg (Tp len=0.5, Tv start=1, Tv end=0, Tp phase=0) | |
| bool | done () const |
| Returns whether envelope is done. | |
| Tv | operator() () |
| Generate next value. | |
| void | operator= (Tv v) |
| Set new end value. Start value is set to current value. | |
| template<class G > | |
| Tv | operator() (G &g) |
| Generates a new end point from a generator when the segment end is reached. | |
| void | freq (Tp v) |
| Set frequency of envelope. | |
| void | period (Tp v) |
| Set length in domain units. | |
| void | phase (Tp v) |
| Set phase along segment. | |
| void | reset () |
| Reset envelope. | |
Interpolation envelope segment.
| Seg | ( | Tp | len = 0.5, |
| Tv | start = 1, |
||
| Tv | end = 0, |
||
| Tp | phase = 0 |
||
| ) |
| [in] | len | Length of segment in domain units |
| [in] | start | Start value |
| [in] | end | End value |
| [in] | phase | Start phase along segment, in [0,1) |
| Tv operator() | ( | G & | g | ) |
Generates a new end point from a generator when the segment end is reached.
This is useful for creating pitched noise from a random number generator.