CSL  6.0
csl::Phased Class Reference

Phased – a mix-in for objects with phase accumulators (local float) and frequency controls (an input port). More...

#include <CSL_Core.h>

+ Inheritance diagram for csl::Phased:

Public Member Functions

 Phased ()
 Constructors; this one is rearely used. More...
 
 Phased (float frequency, float phase=0)
 use the given dynamic frequency & phase More...
 
 Phased (UnitGenerator &freq, float phase=0)
 use the given dynamic or static frequency More...
 
 ~Phased ()
 Destructor. More...
 
void setFrequency (UnitGenerator &frequency)
 Setter accessors. More...
 
void setFrequency (float frequency)
 set frequency More...
 
void setPhase (float phase)
 
PortgetPort (CSL_MAP_KEY name)
 

Protected Member Functions

void addInput (CSL_MAP_KEY name, UnitGenerator &ugen)
 Plug in a unit generator to the named input slot. More...
 
void addInput (CSL_MAP_KEY name, float value)
 Plug in a float to the named input slot. More...
 
void pullInput (Port *thePort, unsigned numFrames) throw (CException)
 method to read the control values (in case they're dynamic). this sends nextBuffer() to the input. More...
 
void pullInput (Port *thePort, Buffer &theBuffer) throw (CException)
 
virtual void dump ()
 pretty-print the receiver's input/controls map More...
 

Protected Attributes

sample mPhase
 set phase More...
 
PortMap mInputs
 the map of my inputs or controls (used by the mix-in classes) More...
 

Detailed Description

Phased – a mix-in for objects with phase accumulators (local float) and frequency controls (an input port).

This puts an item named CSL_FREQUENCY in the Controllable parent mInputs map.

We use Controllable as a virtual superclass so that we can mix it in twice (in classes that are also Scalable)

Definition at line 497 of file CSL_Core.h.

Constructor & Destructor Documentation

Phased::Phased ( )

Constructors; this one is rearely used.

Definition at line 956 of file CSL_Core.cpp.

References CSL_FREQUENCY, csl::logMsg(), and csl::Controllable::mInputs.

Phased::Phased ( float  frequency,
float  phase = 0 
)

use the given dynamic frequency & phase

Definition at line 970 of file CSL_Core.cpp.

References csl::Controllable::addInput(), CSL_FREQUENCY, and csl::logMsg().

Phased::Phased ( UnitGenerator freq,
float  phase = 0 
)

use the given dynamic or static frequency

Definition at line 963 of file CSL_Core.cpp.

References csl::Controllable::addInput(), CSL_FREQUENCY, and csl::logMsg().

Phased::~Phased ( )

Destructor.

Definition at line 977 of file CSL_Core.cpp.

Member Function Documentation

void Phased::setFrequency ( float  frequency)

set frequency

Definition at line 985 of file CSL_Core.cpp.

References csl::Controllable::addInput(), and CSL_FREQUENCY.

void csl::Phased::setPhase ( float  phase)
inline

Definition at line 507 of file CSL_Core.h.

References mPhase.

Port * Controllable::getPort ( CSL_MAP_KEY  name)
inherited
void Controllable::addInput ( CSL_MAP_KEY  name,
float  value 
)
protectedinherited

Plug in a float to the named input slot.

Definition at line 906 of file CSL_Core.cpp.

References csl::logMsg(), csl::Controllable::mInputs, and csl::Port::mValue.

void Controllable::pullInput ( Port thePort,
unsigned  numFrames 
)
throw (CException
)
protectedinherited

method to read the control values (in case they're dynamic). this sends nextBuffer() to the input.

Definition at line 847 of file CSL_Core.cpp.

References csl::kSamples, csl::logMsg(), csl::Buffer::mIsPopulated, csl::Buffer::mNumFrames, csl::Buffer::mType, csl::UnitGenerator::nextBuffer(), and csl::Buffer::zeroBuffers().

Referenced by csl::Panner::nextBuffer(), csl::NtoMPanner::nextBuffer(), and csl::Effect::pullInput().

void Controllable::pullInput ( Port thePort,
Buffer theBuffer 
)
throw (CException
)
protectedinherited

Definition at line 879 of file CSL_Core.cpp.

References csl::UnitGenerator::nextBuffer().

Member Data Documentation

sample csl::Phased::mPhase
protected

set phase

the actual phase accumulator

Definition at line 507 of file CSL_Core.h.

Referenced by setPhase().


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