CSL 5.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes
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:

List of all members.

## Public Member Functions
| Controllable ()
virtual | ~Controllable ()
| Constructor takes no arguments.
Port * | getPort (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.
void | addInput (CSL_MAP_KEY name, float value)
| Plug in a float to the named input slot.
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.
void | pullInput (Port *thePort, Buffer &theBuffer) throw (CException)
virtual void | dump ()
| pretty-print the receiver's input/controls map

## Protected Attributes
PortMap | mInputs
| the map of my inputs or controls (used by the mix-in classes)

## 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 346 of file CSL_Core.h.

## Constructor & Destructor Documentation

csl::Controllable::Controllable | ( |  | ) |
| inline

Definition at line 348 of file CSL_Core.h.

Controllable::~Controllable | ( |  | ) |
| virtual

Constructor takes no arguments.

< Destructor

Destructor (remove the output links of the ports)

Definition at line 689 of file CSL_Core.cpp.

References mInputs.

## Member Function Documentation

Port * Controllable::getPort | ( | CSL_MAP_KEY | name | ) |

Definition at line 768 of file CSL_Core.cpp.

References mInputs.

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

void Controllable::addInput | ( | CSL_MAP_KEY | name,
|  | UnitGenerator & | ugen
| ) |  |
| protected

Plug in a unit generator to the named input slot.

Definition at line 742 of file CSL_Core.cpp.

References csl::UnitGenerator::addOutput(), csl::logMsg(), and mInputs.

Referenced by csl::BinaryOp::BinaryOp(), csl::DistanceSimulator::DistanceSimulator(), csl::Effect::Effect(), csl::InOut::InOut(), csl::NtoMPanner::NtoMPanner(), csl::Panner::Panner(), csl::Phased::Phased(), csl::Scalable::Scalable(), csl::FrequencyAmount::setAmount(), csl::FrequencyAmount::setFrequency(), csl::Phased::setFrequency(), csl::Effect::setInput(), csl::Scalable::setOffset(), csl::Panner::setPosition(), csl::Abst_SoundFile::setRate(), csl::Scalable::setScale(), csl::NtoMPanner::setX(), csl::NtoMPanner::setY(), and csl::SpatialSource::SpatialSource().

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

Plug in a float to the named input slot.

Definition at line 754 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 695 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 727 of file CSL_Core.cpp.

References csl::UnitGenerator::nextBuffer().

void Controllable::dump | ( | void |  | ) |
| protected virtual

pretty-print the receiver's input/controls map

Reimplemented in csl::RandEnvelope, csl::SumOfSines, csl::Abst_SoundFile, csl::Envelope, csl::Filter, csl::SineAsScaled, csl::SpatialSource, csl::SineAsPhased, csl::Mixer, csl::KarplusString, csl::Oscillator, csl::BinaryOp, csl::Clipper, csl::CASoundFile, and csl::Noise.

Definition at line 774 of file CSL_Core.cpp.

References CSL_FREQUENCY, CSL_INPUT, CSL_OFFSET, CSL_SCALE, csl::logMsg(), and mInputs.

## Member Data Documentation

PortMap csl::Controllable::mInputs
| protected

the map of my inputs or controls (used by the mix-in classes)

Definition at line 353 of file CSL_Core.h.

Referenced by addInput(), csl::BinaryOp::dump(), dump(), getPort(), csl::Effect::inPort(), csl::Effect::isActive(), csl::Joiner::isActive(), csl::SquareBL::nextWaveInto(), csl::BinaryOp::operandIsFixed(), csl::Phased::Phased(), csl::DistanceSimulator::positionChanged(), csl::Scalable::Scalable(), csl::BinaryOp::setOperand(), csl::Abst_SoundFile::setRate(), csl::Butter::setupCoeffs(), csl::Formant::setupCoeffs(), csl::Notch::setupCoeffs(), csl::Allpass::setupCoeffs(), csl::Moog::setupCoeffs(), csl::Scalable::trigger(), csl::Effect::trigger(), csl::Joiner::trigger(), and ~Controllable().

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

- CSL/Kernel/CSL_Core.h
- CSL/Kernel/CSL_Core.cpp