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::Phased Class Reference

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) More...

`#include <CSL_Core.h>`

Inheritance diagram for csl::Phased:

List of all members.

## Public Member Functions
| Phased ()
| Constructors; this one is rearely used.
| Phased (float frequency, float phase=0)
| use the given dynamic frequency & phase
| Phased (UnitGenerator &freq, float phase=0)
| use the given dynamic or static frequency
| ~Phased ()
| Destructor.
void | setFrequency (UnitGenerator &frequency)
| Setter accessors.
void | setFrequency (float frequency)
| set frequency
void | setPhase (float phase)
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
sample | mPhase
| set phase
PortMap | mInputs
| the map of my inputs or controls (used by the mix-in classes)

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

## Constructor & Destructor Documentation

Phased::Phased | ( |  | ) |

Constructors; this one is rearely used.

Definition at line 804 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 818 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 811 of file CSL_Core.cpp.

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

Phased::~Phased | ( |  | ) |

Destructor.

Definition at line 825 of file CSL_Core.cpp.

## Member Function Documentation

void Phased::setFrequency | ( | UnitGenerator & | frequency | ) |

Setter accessors.

set frequency

Definition at line 829 of file CSL_Core.cpp.

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

Referenced by csl::AdditiveInstrument::playMIDI(), csl::AdditiveInstrument::playNote(), csl::AdditiveInstrument::playOSC(), csl::AdditiveInstrument::setParameter(), csl::SquareBL::SquareBL(), test_SHARC(), test_SHARC2(), testRandFreqEnv(), testSplitJoin1(), testSplitJoin2(), testSumOfSines1F(), testSumOfSinesCached(), testSumOfSinesNonCached(), and testSumOfSinesSteps().

void Phased::setFrequency | ( | float | frequency | ) |

set frequency

Reimplemented in csl::KarplusString.

Definition at line 833 of file CSL_Core.cpp.

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

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

Definition at line 475 of file CSL_Core.h.

References mPhase.

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

Definition at line 768 of file CSL_Core.cpp.

References csl::Controllable::mInputs.

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

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

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 csl::Controllable::mInputs.

Referenced by csl::BinaryOp::BinaryOp(), csl::DistanceSimulator::DistanceSimulator(), csl::Effect::Effect(), csl::InOut::InOut(), csl::NtoMPanner::NtoMPanner(), csl::Panner::Panner(), Phased(), csl::Scalable::Scalable(), csl::FrequencyAmount::setAmount(), csl::FrequencyAmount::setFrequency(), 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 inherited

Plug in a float to the named input slot.

Definition at line 754 of file CSL_Core.cpp.

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

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

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 inherited

Definition at line 727 of file CSL_Core.cpp.

References csl::UnitGenerator::nextBuffer().

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

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 csl::Controllable::mInputs.

## Member Data Documentation

sample csl::Phased::mPhase
| protected

set phase

the actual phase accumulator

Definition at line 475 of file CSL_Core.h.

Referenced by setPhase().

PortMap csl::Controllable::mInputs
| protected inherited

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

Definition at line 353 of file CSL_Core.h.

Referenced by csl::Controllable::addInput(), csl::BinaryOp::dump(), csl::Controllable::dump(), csl::Controllable::getPort(), csl::Effect::inPort(), csl::Effect::isActive(), csl::Joiner::isActive(), csl::SquareBL::nextWaveInto(), csl::BinaryOp::operandIsFixed(), 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 csl::Controllable::~Controllable().

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

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