Gamma  0.9.5
Generic Synthesis Library
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Curve< Tv, Tp > Class Template Reference

Exponential curve with variable curvature. More...

#include <Envelope.h>

List of all members.

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.
Curvereset (Tv start=Tv(0))
 Reset envelope.
Curvevalue (const Tv &v)
 Set value.
Curveset (Tp length, Tp curve, Tv end=Tv(1), Tv start=Tv(0))
 Set length and curvature.

Detailed Description

template<class Tv = real, class Tp = real>
class gam::Curve< Tv, Tp >

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.

Template Parameters:
Tvvalue (sample) type
Tpparameter type

Constructor & Destructor Documentation

Curve ( Tp  length,
Tp  curve,
Tv  end = Tv(1),
Tv  start = Tv(0) 
)
Parameters:
[in]lengthlength of curve in samples
[in]curvecurvature, c, where c > 0 approaches slowly (accelerates), c < 0 approaches rapidly (decelerates), and c = 0 approaches linearly
[in]endend value
[in]startstart value

Member Function Documentation

Curve< Tv, Tp > & set ( Tp  length,
Tp  curve,
Tv  end = Tv(1),
Tv  start = Tv(0) 
)

Set length and curvature.

Parameters:
[in]lengthlength of curve in samples
[in]curvecurvature; pos. approaches slowly, neg. approaches rapidly, 0 approaches linearly
[in]endend value
[in]startstart value

The documentation for this class was generated from the following file: