csl::RandEnvelope Class Reference

#include <Envelope.h>

Inheritance diagram for csl::RandEnvelope:

csl::Envelope csl::UnitGenerator csl::Scalable csl::Model csl::Controllable

List of all members.

Public Member Functions

 RandEnvelope (float frequency=1, float amplitude=1, float offset=0, float step=0)
 defaults are 1 Hz, +- 1.0 range
 ~RandEnvelope ()
void setWalk (bool walk)
 Accessors.
void setAmplitude (float amplitude)
void setFrequency (float frequency)
void setStep (float step)
void setOffset (float offset)
virtual bool isActive ()
 This answers whether I'm active (ptr < end).
void reset ()
 These are no-ops in Random envelopes.
void trigger ()
 reset internal time to restart envelope
void dump ()
 reset internal time to restart envelope
void setDuration (float d)
 print the receiver
void scaleTimes (float s)
 set/scale durations
void nextBuffer (Buffer &outputBuffer, unsigned outBufNum) throw (CException)
 scale durations

Protected Member Functions

void initSegment ()
 set up the line segment
void nextSegment ()
 choose the values for the next line segment

Protected Attributes

float mLastVal
 last line segment ending value (unscaled and unoffset)
float mFrequency
 frequency for picking new values
float mAmplitude
 scale (+-)
float mStep
 max step between values (+-)
float mOffset
 DC offset.
unsigned mCurrentIndex
 current index in line segment
unsigned mSegmentLength
 line segment's length in frames
bool mWalk
 whether to produce random values or a random walk
LineSegment mSegment
 single line segment


Detailed Description

RandEnvelope envelope class -- makes random control signals using a single line segment

Constructor & Destructor Documentation

RandEnvelope::RandEnvelope ( float  frequency = 1,
float  amplitude = 1,
float  offset = 0,
float  step = 0 
)

defaults are 1 Hz, +- 1.0 range

~~~~~~~~ RandEnvelope envelope class ~~~~~~~

References initSegment(), mAmplitude, csl::Envelope::mSegments, csl::Envelope::mSize, mStep, and csl::Envelope::mValues.

csl::RandEnvelope::~RandEnvelope (  )  [inline]


Member Function Documentation

void csl::RandEnvelope::setWalk ( bool  walk  )  [inline]

Accessors.

References mWalk.

void csl::RandEnvelope::setAmplitude ( float  amplitude  )  [inline]

References mAmplitude.

void csl::RandEnvelope::setFrequency ( float  frequency  )  [inline]

References mFrequency.

void csl::RandEnvelope::setStep ( float  step  )  [inline]

References mStep.

void csl::RandEnvelope::setOffset ( float  offset  )  [inline]

Reimplemented from csl::Scalable.

References mOffset.

virtual bool csl::RandEnvelope::isActive (  )  [inline, virtual]

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

Reimplemented from csl::Envelope.

void csl::RandEnvelope::reset (  )  [inline, virtual]

These are no-ops in Random envelopes.

Reimplemented from csl::Envelope.

void csl::RandEnvelope::trigger ( void   )  [inline, virtual]

reset internal time to restart envelope

Reimplemented from csl::Envelope.

void csl::RandEnvelope::dump ( void   )  [inline, virtual]

reset internal time to restart envelope

Reimplemented from csl::Envelope.

void csl::RandEnvelope::setDuration ( float  d  )  [inline, virtual]

print the receiver

Reimplemented from csl::Envelope.

void csl::RandEnvelope::scaleTimes ( float  s  )  [inline, virtual]

set/scale durations

Reimplemented from csl::Envelope.

void RandEnvelope::nextBuffer ( Buffer outputBuffer,
unsigned  outBufNum 
) throw (CException) [virtual]

scale durations

The main UGen work method

Reimplemented from csl::Envelope.

References DECLARE_SCALABLE_CONTROLS.

void RandEnvelope::initSegment (  )  [protected]

set up the line segment

References csl::fRandZ(), mAmplitude, mLastVal, mOffset, mSegment, nextSegment(), and csl::LineSegment::setEnd().

Referenced by RandEnvelope().

void RandEnvelope::nextSegment (  )  [protected]


Member Data Documentation

float csl::RandEnvelope::mLastVal [protected]

last line segment ending value (unscaled and unoffset)

Referenced by initSegment(), and nextSegment().

float csl::RandEnvelope::mFrequency [protected]

frequency for picking new values

Referenced by nextSegment(), and setFrequency().

float csl::RandEnvelope::mAmplitude [protected]

scale (+-)

Referenced by initSegment(), nextSegment(), RandEnvelope(), and setAmplitude().

float csl::RandEnvelope::mStep [protected]

max step between values (+-)

Referenced by nextSegment(), RandEnvelope(), and setStep().

float csl::RandEnvelope::mOffset [protected]

DC offset.

Referenced by initSegment(), nextSegment(), and setOffset().

unsigned csl::RandEnvelope::mCurrentIndex [protected]

current index in line segment

Referenced by nextSegment().

unsigned csl::RandEnvelope::mSegmentLength [protected]

line segment's length in frames

Referenced by nextSegment().

bool csl::RandEnvelope::mWalk [protected]

whether to produce random values or a random walk

Referenced by nextSegment(), and setWalk().

single line segment

Referenced by initSegment(), and nextSegment().


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

Generated on Thu Sep 17 23:14:17 2009 for CSL by  doxygen 1.5.8