CSL  6.0
csl::Controllable Class Reference

Controllable – superclass of the mix-ins that add control or signal inputs. This holds onto a map of port objects that represent the inputs, and manages the naming and processing flow for dynamic inputs. More...

#include <CSL_Core.h>

+ Inheritance diagram for csl::Controllable:

Public Member Functions

 Controllable ()
 
virtual ~Controllable ()
 Constructor takes no arguments. More...
 
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

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

Detailed Description

Controllable – superclass of the mix-ins that add control or signal inputs. This holds onto a map of port objects that represent the inputs, and manages the naming and processing flow for dynamic inputs.

A typical complex UGen will have several ports, e.g., for frequency, scale, and offset in the case of an oscillator that supports AM and FM. The pullInput() message is used to call the nextBuffer() method of a given port.

Definition at line 371 of file CSL_Core.h.

Constructor & Destructor Documentation

csl::Controllable::Controllable ( )
inline

Definition at line 373 of file CSL_Core.h.

Controllable::~Controllable ( )
virtual

Constructor takes no arguments.

< Destructor

Destructor (remove the output links of the ports)

Definition at line 841 of file CSL_Core.cpp.

References mInputs.

Member Function Documentation

Port * Controllable::getPort ( CSL_MAP_KEY  name)

Definition at line 920 of file CSL_Core.cpp.

References mInputs.

Referenced by csl::FrequencyAmount::getFrequency(), and csl::VSTIO::getParameter().

void Controllable::addInput ( CSL_MAP_KEY  name,
float  value 
)
protected

Plug in a float to the named input slot.

Definition at line 906 of file CSL_Core.cpp.

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

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

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
)
protected

Definition at line 879 of file CSL_Core.cpp.

References csl::UnitGenerator::nextBuffer().

Member Data Documentation


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