|
CSL
5.2
|
Scalable – mix-in class with scale and offset control inputs (may be constants or generators). This uses the mInput map keys CSL_SCALE and CSL_OFFSET. Most actual unit generators inherit this as well as UnitGenerator. We use Controllable as a virtual superclass so that we can mix it in twice (in classes that are also Phased) More...
#include <CSL_Core.h>
Inheritance diagram for csl::Scalable:Public Member Functions | |
| Scalable () | |
| Constructors. | |
| Scalable (float scale) | |
| use the given static scale | |
| Scalable (float scale, float offset) | |
| use the given static scale & offset | |
| Scalable (UnitGenerator &scale, float offset) | |
| use the given dynamic scale & static offset | |
| Scalable (UnitGenerator &scale, UnitGenerator &offset) | |
| use the given dynamic scale & offset | |
| ~Scalable () | |
| Destructor. | |
| void | setScale (UnitGenerator &scale) |
| set the receiver's scale member to a UGen or a float | |
| void | setScale (float scale) |
| void | setOffset (UnitGenerator &offset) |
| set the receiver's offset member to a UGen or a float | |
| void | setOffset (float offset) |
| virtual void | trigger () |
| trigger passed on here | |
| void | isScaled () |
| answer whether scale = 1 & offset = 0 | |
| 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) | |
Scalable – mix-in class with scale and offset control inputs (may be constants or generators). This uses the mInput map keys CSL_SCALE and CSL_OFFSET. Most actual unit generators inherit this as well as UnitGenerator. We use Controllable as a virtual superclass so that we can mix it in twice (in classes that are also Phased)
Definition at line 375 of file CSL_Core.h.
| Scalable::Scalable | ( | ) |
Constructors.
Definition at line 839 of file CSL_Core.cpp.
References CSL_OFFSET, CSL_SCALE, csl::logMsg(), and csl::Controllable::mInputs.
| Scalable::Scalable | ( | float | scale | ) |
use the given static scale
Definition at line 847 of file CSL_Core.cpp.
References csl::Controllable::addInput(), CSL_OFFSET, CSL_SCALE, csl::logMsg(), and csl::Controllable::mInputs.
| Scalable::Scalable | ( | float | scale, |
| float | offset | ||
| ) |
use the given static scale & offset
Definition at line 855 of file CSL_Core.cpp.
References csl::Controllable::addInput(), CSL_OFFSET, CSL_SCALE, and csl::logMsg().
| Scalable::Scalable | ( | UnitGenerator & | scale, |
| float | offset | ||
| ) |
use the given dynamic scale & static offset
Definition at line 863 of file CSL_Core.cpp.
References csl::Controllable::addInput(), CSL_OFFSET, CSL_SCALE, and csl::logMsg().
| Scalable::Scalable | ( | UnitGenerator & | scale, |
| UnitGenerator & | offset | ||
| ) |
use the given dynamic scale & offset
Definition at line 871 of file CSL_Core.cpp.
References csl::Controllable::addInput(), CSL_OFFSET, CSL_SCALE, and csl::logMsg().
| Scalable::~Scalable | ( | ) |
Destructor.
Definition at line 879 of file CSL_Core.cpp.
| void Scalable::setScale | ( | UnitGenerator & | scale | ) |
set the receiver's scale member to a UGen or a float
Definition at line 887 of file CSL_Core.cpp.
References csl::Controllable::addInput(), CSL_SCALE, and csl::logMsg().
Referenced by createRandFreqEnvPatch(), csl::FancyFMInstrument::FancyFMInstrument(), csl::AdditiveInstrument::init(), csl::SndFileInstrument::initialize(), main(), csl::FMInstrument::parseArgs(), csl::SndFileInstrument::playNote(), csl::SndFileInstrument::playOSC(), csl::AdditiveInstrument::setParameter(), csl::SndFileInstrument::setParameter(), csl::FancyFMInstrument::setParameter(), sosNote(), test_SHARC(), test_SHARC2(), testADSR_FM(), testARSin2(), testComplexEnvelope(), testEnvScale(), testFancy_FM(), testFanMix1(), testFanMix2(), testMultiTap(), testRandFreqEnv(), testReverb(), testSplitJoin1(), testSplitJoin2(), testStereoverb(), testString(), testStringChorus(), testSumOfSines1F(), testSumOfSinesCached(), testSumOfSinesNonCached(), testSumOfSinesSteps(), and testWaveShaper().
| void Scalable::setScale | ( | float | scale | ) |
Definition at line 894 of file CSL_Core.cpp.
References csl::Controllable::addInput(), CSL_SCALE, and csl::logMsg().
| void Scalable::setOffset | ( | UnitGenerator & | offset | ) |
set the receiver's offset member to a UGen or a float
Definition at line 901 of file CSL_Core.cpp.
References csl::Controllable::addInput(), CSL_OFFSET, and csl::logMsg().
| void Scalable::setOffset | ( | float | offset | ) |
Reimplemented in csl::RandEnvelope.
Definition at line 908 of file CSL_Core.cpp.
References csl::Controllable::addInput(), CSL_OFFSET, and csl::logMsg().
|
virtual |
trigger passed on here
Reimplemented in csl::RandEnvelope, csl::Abst_SoundFile, csl::Envelope, and csl::KarplusString.
Definition at line 917 of file CSL_Core.cpp.
References CSL_OFFSET, CSL_SCALE, and csl::Controllable::mInputs.
| void csl::Scalable::isScaled | ( | ) |
answer whether scale = 1 & offset = 0
|
inherited |
Definition at line 768 of file CSL_Core.cpp.
References csl::Controllable::mInputs.
Referenced by csl::FrequencyAmount::getFrequency(), and csl::VSTIO::getParameter().
|
protectedinherited |
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(), csl::Phased::Phased(), Scalable(), csl::FrequencyAmount::setAmount(), csl::FrequencyAmount::setFrequency(), csl::Phased::setFrequency(), csl::Effect::setInput(), setOffset(), csl::Panner::setPosition(), csl::Abst_SoundFile::setRate(), setScale(), csl::NtoMPanner::setX(), csl::NtoMPanner::setY(), and csl::SpatialSource::SpatialSource().
|
protectedinherited |
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.
|
protectedinherited |
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().
|
protectedinherited |
Definition at line 727 of file CSL_Core.cpp.
References csl::UnitGenerator::nextBuffer().
|
protectedvirtualinherited |
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.
|
protectedinherited |
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(), csl::Phased::Phased(), csl::DistanceSimulator::positionChanged(), Scalable(), csl::BinaryOp::setOperand(), csl::Abst_SoundFile::setRate(), csl::Butter::setupCoeffs(), csl::Formant::setupCoeffs(), csl::Notch::setupCoeffs(), csl::Allpass::setupCoeffs(), csl::Moog::setupCoeffs(), trigger(), csl::Effect::trigger(), csl::Joiner::trigger(), and csl::Controllable::~Controllable().