Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   Tutorial


Envelope Class Reference

#include <Envelope.h>

Inheritance diagram for Envelope:

Generator Stk ADSR Asymp List of all members.

Detailed Description

STK envelope base class.

This class implements a simple envelope generator which is capable of ramping to a 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 - 2004.

Definition at line 21 of file Envelope.h.

Public Member Functions

 Envelope (void)
 Default constructor.

virtual ~Envelope (void)
 Class destructor.

virtual void keyOn (void)
 Set target = 1.

virtual 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.

virtual void setTarget (StkFloat target)
 Set the target value.

virtual void setValue (StkFloat value)
 Set current and target values to aValue.

virtual int getState (void) const
 Return the current envelope state (0 = at target, 1 otherwise).

virtual StkFloat tick (void)
 Return one envelope output value.

virtual StkFloat * tick (StkFloat *vector, unsigned int vectorSize)
 Compute vectorSize outputs and return them in vector.

virtual StkFramestick (StkFrames &frames, unsigned int channel=1)
 Fill a channel of the StkFrames object with computed outputs.


Member Function Documentation

virtual StkFrames& Envelope::tick StkFrames frames,
unsigned int  channel = 1
[virtual]
 

Fill a channel of the StkFrames object with computed outputs.

The channel argument should be one or greater (the first channel is specified by 1). An StkError will be thrown if the channel argument is zero or it is greater than the number of channels in the StkFrames object.

Reimplemented from Generator.

Reimplemented in ADSR, and Asymp.


The documentation for this class was generated from the following file:
The Synthesis ToolKit in C++ (STK)
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.