
Home Information Classes Download Usage Mail List Requirements Links Tutorial
#include <ADSR.h>
Inheritance diagram for ADSR:

This Envelope subclass implements a traditional ADSR (Attack, Decay, Sustain, Release) envelope. It responds to simple keyOn and keyOff messages, keeping track of its state. The state = ADSR::DONE after the envelope value reaches 0.0 in the ADSR::RELEASE state.
by Perry R. Cook and Gary P. Scavone, 1995 - 2004.
Definition at line 23 of file ADSR.h.
Public Types | |
| enum | |
| Envelope states. | |
Public Member Functions | |
| ADSR (void) | |
| Default constructor. | |
| ~ADSR (void) | |
| Class destructor. | |
| void | keyOn (void) |
| Set target = 1, state = ADSR::ATTACK. | |
| void | keyOff (void) |
| Set target = 0, state = ADSR::RELEASE. | |
| void | setAttackRate (StkFloat rate) |
| Set the attack rate. | |
| void | setDecayRate (StkFloat rate) |
| Set the decay rate. | |
| void | setSustainLevel (StkFloat level) |
| Set the sustain level. | |
| void | setReleaseRate (StkFloat rate) |
| Set the release rate. | |
| void | setAttackTime (StkFloat time) |
| Set the attack rate based on a time duration. | |
| void | setDecayTime (StkFloat time) |
| Set the decay rate based on a time duration. | |
| void | setReleaseTime (StkFloat time) |
| Set the release rate based on a time duration. | |
| void | setAllTimes (StkFloat aTime, StkFloat dTime, StkFloat sLevel, StkFloat rTime) |
| Set sustain level and attach, decay, and release time durations. | |
| void | setTarget (StkFloat target) |
| Set the target value. | |
| int | getState (void) const |
| Return the current envelope state (ATTACK, DECAY, SUSTAIN, RELEASE, DONE). | |
| void | setValue (StkFloat value) |
| Set to state = ADSR::SUSTAIN with current and target values of aValue. | |
| StkFloat | tick (void) |
| Return one envelope output value. | |
| StkFloat * | tick (StkFloat *vector, unsigned int vectorSize) |
| Compute vectorSize outputs and return them in vector. | |
| StkFrames & | tick (StkFrames &frames, unsigned int channel=1) |
| Fill a channel of the StkFrames object with computed outputs. | |
|
||||||||||||
|
Fill a channel of the StkFrames object with computed outputs.
The Reimplemented from Envelope. |
| The Synthesis ToolKit in C++ (STK) |
| ©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |