#include <CSL_Core.h>

Public Member Functions | |
| Controllable () | |
| virtual | ~Controllable () |
| Constructor takes no arguments. | |
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) |
| void | pullInput (Port *thePort, Buffer &theBuffer) throw (CException) |
| virtual void | dump () |
| pretty-print the receiver's input/controls map | |
Protected Attributes | |
| PortMap | mInputs |
| Destructor (ought to remove the output links of the ports). | |
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.
| csl::Controllable::Controllable | ( | ) | [inline] |
| virtual csl::Controllable::~Controllable | ( | ) | [inline, virtual] |
Constructor takes no arguments.
| void Controllable::addInput | ( | CSL_MAP_KEY | name, | |
| UnitGenerator & | ugen | |||
| ) | [protected] |
Plug in a unit generator to the named input slot.
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] |
| 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.
References csl::kSamples, csl::logMsg(), csl::Buffer::mIsPopulated, csl::Buffer::mNumFrames, csl::Buffer::mType, and csl::UnitGenerator::nextBuffer().
Referenced by csl::DelayLine::nextBuffer(), csl::NtoMPanner::nextBuffer(), csl::Panner::nextBuffer(), and csl::Effect::pullInput().
| void Controllable::pullInput | ( | Port * | thePort, | |
| Buffer & | theBuffer | |||
| ) | throw (CException) [protected] |
References csl::UnitGenerator::nextBuffer().
| void Controllable::dump | ( | void | ) | [protected, virtual] |
pretty-print the receiver's input/controls map
Reimplemented in csl::Abst_SoundFile, csl::CASoundFile, csl::BinaryOp, csl::Clipper, csl::Filter, csl::Mixer, csl::Envelope, csl::RandEnvelope, csl::KarplusString, csl::Noise, csl::Oscillator, csl::SumOfSines, csl::SineAsPhased, csl::SineAsScaled, and csl::SpatialSource.
References CSL_FREQUENCY, CSL_INPUT, CSL_OFFSET, CSL_SCALE, csl::logMsg(), and mInputs.
PortMap csl::Controllable::mInputs [protected] |
Destructor (ought to remove the output links of the ports).
the map of my inputs or controls (used by the mix-in classes)
Reimplemented in csl::Joiner.
Referenced by addInput(), csl::BinaryOp::dump(), dump(), csl::Effect::inPort(), csl::Effect::isActive(), csl::SquareBL::nextWaveInto(), csl::BinaryOp::operandIsFixed(), csl::Phased::Phased(), csl::DistanceSimulator::positionChanged(), csl::Scalable::Scalable(), csl::Abst_SoundFile::setRate(), csl::Moog::setupCoeffs(), csl::Allpass::setupCoeffs(), csl::Notch::setupCoeffs(), csl::Formant::setupCoeffs(), and csl::Butter::setupCoeffs().
1.5.8