csl::Envelope Class Reference

#include <Envelope.h>

Inheritance diagram for csl::Envelope:

csl::UnitGenerator csl::Scalable csl::ADSR csl::AR csl::RandEnvelope csl::Triangle List of all members.

Detailed Description

Envelope: a collection of LineSegments; may have an input (scale) and act like a processor, or have no input and act like a control UGen. I inherit Scalable setScale, setOffset for inputs


Public Member Functions

 Envelope ()
 Envelope (double t, double x1, double y1, double x2=NULL, double y2=1.0, double x3=NULL, double y3=1.0, double x4=NULL, double y4=1.0, double x5=NULL, double y5=1.0, double x6=NULL, double y6=1.0)
 Lots of useful constructors.
 Envelope (double t, unsigned int size, double x[], double y[])
virtual ~Envelope ()
bool isActive ()
 This answers whether I'm active (ptr < end).
void addBreakpoint (double startTime, double value)
void setInterpolationAtSegment (LineMode mode, unsigned idx)
 allows to specify interpolation other than linear for a segment.
void setDuration (float d)
 set/scale durations
void scaleTimes (float s)
 scale durations
void reset ()
 reset internal time to restart envelope
void trigger ()
 reset internal time to restart envelope
void dump ()
 Pretty-printer.
void nextBuffer (Buffer &outputBuffer, unsigned outBufNum) throw (CException)
 The main FrameStream work method.

Protected Member Functions

unsigned int privateNextBuffer (CPoint *breakpoint, LineSegment *segment, float *buffer, unsigned int numFrames)
 Internal helper method for computing the next buffer.
void createSegments ()
 Allocate memory for the segments.
void calculateSegments ()
 Calculate the internal data.

Protected Attributes

float mDuration
 Total duration, typically in seconds.
float mCurrentMark
 How far we have read.
Breakpoints mSegmentMap
LineSegment ** mSegments
double * mValues
unsigned mSize


Constructor & Destructor Documentation

csl::Envelope::Envelope  )  [inline]
 

Envelope::Envelope double  t,
double  x1,
double  y1,
double  x2 = NULL,
double  y2 = 1.0,
double  x3 = NULL,
double  y3 = 1.0,
double  x4 = NULL,
double  y4 = 1.0,
double  x5 = NULL,
double  y5 = 1.0,
double  x6 = NULL,
double  y6 = 1.0
 

Lots of useful constructors.

Envelope::Envelope double  t,
unsigned int  size,
double  x[],
double  y[]
 

Envelope::~Envelope  )  [virtual]
 


Member Function Documentation

bool csl::Envelope::isActive  )  [inline]
 

This answers whether I'm active (ptr < end).

Reimplemented in csl::RandEnvelope.

void Envelope::addBreakpoint double  startTime,
double  value
 

void Envelope::setInterpolationAtSegment LineMode  mode,
unsigned  idx
 

allows to specify interpolation other than linear for a segment.

void Envelope::setDuration float  d  ) 
 

set/scale durations

void Envelope::scaleTimes float  s  ) 
 

scale durations

void Envelope::reset  ) 
 

reset internal time to restart envelope

Reimplemented in csl::RandEnvelope.

void Envelope::trigger  ) 
 

reset internal time to restart envelope

Reimplemented in csl::RandEnvelope.

void Envelope::dump  ) 
 

Pretty-printer.

Reimplemented in csl::RandEnvelope.

void Envelope::nextBuffer Buffer outputBuffer,
unsigned  outBufNum
throw (CException)
 

The main FrameStream work method.

Reimplemented in csl::RandEnvelope.

unsigned int csl::Envelope::privateNextBuffer CPoint breakpoint,
LineSegment segment,
float *  buffer,
unsigned int  numFrames
[protected]
 

Internal helper method for computing the next buffer.

void Envelope::createSegments  )  [protected]
 

Allocate memory for the segments.

void Envelope::calculateSegments  )  [protected]
 

Calculate the internal data.


Member Data Documentation

float csl::Envelope::mDuration [protected]
 

Total duration, typically in seconds.

float csl::Envelope::mCurrentMark [protected]
 

How far we have read.

Breakpoints csl::Envelope::mSegmentMap [protected]
 

LineSegment** csl::Envelope::mSegments [protected]
 

double* csl::Envelope::mValues [protected]
 

unsigned csl::Envelope::mSize [protected]
 


The documentation for this class was generated from the following files:
Generated on Fri Apr 6 20:18:20 2007 for CSL by  doxygen 1.4.5-20051010