#include <Envelope.h>

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 | |
| 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] |
| void csl::RandEnvelope::setWalk | ( | bool | walk | ) | [inline] |
| 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] |
| virtual bool csl::RandEnvelope::isActive | ( | ) | [inline, virtual] |
| void csl::RandEnvelope::reset | ( | ) | [inline, virtual] |
| void csl::RandEnvelope::trigger | ( | void | ) | [inline, virtual] |
| void csl::RandEnvelope::dump | ( | void | ) | [inline, virtual] |
| void csl::RandEnvelope::setDuration | ( | float | d | ) | [inline, virtual] |
| void csl::RandEnvelope::scaleTimes | ( | float | s | ) | [inline, virtual] |
| 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] |
choose the values for the next line segment
References csl::LineSegment::duration(), csl::LineSegment::end(), csl::fRandZ(), mAmplitude, mCurrentIndex, csl::UnitGenerator::mFrameRate, mFrequency, mLastVal, mOffset, mSegment, mSegmentLength, mStep, mWalk, csl::LineSegment::reset(), csl::LineSegment::setDuration(), csl::LineSegment::setEnd(), and csl::LineSegment::setStart().
Referenced by initSegment().
float csl::RandEnvelope::mLastVal [protected] |
last line segment ending value (unscaled and unoffset)
Referenced by initSegment(), and nextSegment().
float csl::RandEnvelope::mFrequency [protected] |
float csl::RandEnvelope::mAmplitude [protected] |
float csl::RandEnvelope::mStep [protected] |
float csl::RandEnvelope::mOffset [protected] |
unsigned csl::RandEnvelope::mCurrentIndex [protected] |
unsigned csl::RandEnvelope::mSegmentLength [protected] |
bool csl::RandEnvelope::mWalk [protected] |
LineSegment csl::RandEnvelope::mSegment [protected] |
1.5.8