Gamma  0.9.5
Generic Synthesis Library
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Decay< T, Ts > Class Template Reference

Exponentially decaying curve. More...

#include <Envelope.h>

Inherits Ts.

List of all members.

Public Member Functions

 Decay (T decay=T(1), T val=T(1))
decay () const
 Returns -60 dB decay length.
bool done (T thresh=T(0.001)) const
 Returns whether value is below threshold.
value () const
 Returns current value.
operator() ()
 Generate next sample.
void decay (T val)
 Set number of units for curve to decay -60 dB.
void reset ()
 Set current value to 1.
void value (T val)
 Set current value.

Detailed Description

template<class T = real, class Ts = Synced>
class gam::Decay< T, Ts >

Exponentially decaying curve.

This envelope exponentially decays towards zero starting from an initial value. Because zero is never reached, the decay length determines when the envelope is -60 dB down from its initial value. This envelope is one of the most computationally efficient envelopes requiring only a single multiply per iteration.


Constructor & Destructor Documentation

Decay ( decay = T(1),
val = T(1) 
)
Parameters:
[in]decayNumber of units until initial value decays -60 dB
[in]valIntial value

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