Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial

# stk::Envelope Class Reference

STK linear line envelope class. More...

`#include <Envelope.h>`

Inheritance diagram for stk::Envelope:

List of all members.

## Public Member Functions
| Envelope (void)
| Default constructor.
| ~Envelope (void)
| Class destructor.
Envelope & | operator= (const Envelope &e)
| Assignment operator.
void | keyOn (void)
| Set target = 1.
void | keyOff (void)
| Set target = 0.
void | setRate (StkFloat rate)
| Set the rate.
void | setTime (StkFloat time)
| Set the rate based on a time duration.
void | setTarget (StkFloat target)
| Set the target value.
void | setValue (StkFloat value)
| Set current and target values to value.
int | getState (void) const
| Return the current envelope state (0 = at target, 1 otherwise).
StkFloat | lastOut (void) const
| Return the last computed output value.
StkFloat | tick (void)
| Compute and return one output sample.
StkFrames & | tick (StkFrames &frames, unsigned int channel=0)
| Fill a channel of the StkFrames object with computed outputs.

## Detailed Description

STK linear line envelope class.

This class implements a simple linear line envelope generator which is capable of ramping to an arbitrary target value by a specified rate. It also responds to simple keyOn and keyOff messages, ramping to 1.0 on keyOn and to 0.0 on keyOff.

by Perry R. Cook and Gary P. Scavone, 1995 - 2010.

## Member Function Documentation

StkFrames & stk::Envelope::tick | ( | StkFrames & | frames,
|  | unsigned int | channel = `0` |
| ) |  |  | `[inline, virtual]`

Fill a channel of the StkFrames object with computed outputs.

The `channel` argument must be less than the number of channels in the StkFrames argument (the first channel is specified by 0). However, range checking is only performed if _STK_DEBUG_ is defined during compilation, in which case an out-of-range value will trigger an StkError exception.

Implements stk::Generator.

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

- Envelope.h

The Synthesis ToolKit in C++ (STK)
©1995-2010 Perry R. Cook and Gary P. Scavone. All Rights Reserved.