64 StkFloat
lastOut(
void )
const {
return lastFrame_[0]; };
67 StkFloat
tick(
void );
81 void sampleRateChanged( StkFloat newRate, StkFloat oldRate );
89inline StkFloat Envelope :: tick(
void )
92 if ( target_ > value_ ) {
94 if ( value_ >= target_ ) {
101 if ( value_ <= target_ ) {
106 lastFrame_[0] = value_;
114#if defined(_STK_DEBUG_)
115 if ( channel >= frames.
channels() ) {
116 oStream_ <<
"Envelope::tick(): channel and StkFrames arguments are incompatible!";
117 handleError( StkError::FUNCTION_ARGUMENT );
121 StkFloat *samples = &frames[channel];
122 unsigned int hop = frames.
channels();
123 for (
unsigned int i=0; i<frames.
frames(); i++, samples += hop )
STK linear line envelope class.
Definition Envelope.h:23
void keyOff(StkFloat target=0.0)
Start ramping to specified target (default = 0).
Definition Envelope.h:39
Envelope & operator=(const Envelope &e)
Assignment operator.
void setTarget(StkFloat target)
Set the target value.
~Envelope(void)
Class destructor.
int getState(void) const
Return the current envelope state (0 = at target, 1 otherwise).
Definition Envelope.h:61
void keyOn(StkFloat target=1.0)
Start ramping to specified target (default = 1).
Definition Envelope.h:36
Envelope(void)
Default constructor.
StkFloat tick(void)
Compute and return one output sample.
Definition Envelope.h:89
void setValue(StkFloat value)
Set current and target values to value.
void setRate(StkFloat rate)
Set the rate.
void setTime(StkFloat time)
Set the rate based on a positive time duration (seconds).
StkFloat lastOut(void) const
Return the last computed output value.
Definition Envelope.h:64
STK abstract unit generator parent class.
Definition Generator.h:21
An STK class to handle vectorized audio data.
Definition Stk.h:279
unsigned int channels(void) const
Return the number of channels represented by the data.
Definition Stk.h:416
unsigned int frames(void) const
Return the number of sample frames represented by the data.
Definition Stk.h:419
The STK namespace.
Definition ADSR.h:6