CSL  5.2
CSL_Core.h File Reference
#include "CSL_Types.h"
#include "CSL_Exceptions.h"
#include "CGestalt.h"

Go to the source code of this file.

Classes

class  csl::Buffer
 Buffer – the multi-channel sample buffer class (passed around between generators and IO guys). More...
class  csl::BufferCMap
 BufferCMap is a Sample buffer with channel map and count. The map is so that one can have (e.g.,) a buffer that stands for 3 channels within an 8-channel space. More...
class  csl::UnitGenerator
 forward declaration More...
class  csl::Port
 Port – used to represent constant, control-rate or signal inputs and outputs in named maps; holds a UnitGenerator and its buffer, OR a single floating-point value (in which case the UGen pointer is set to NULL and mPtrIncrement = 0). The nextValue() message is used to get the dynamic or static value. More...
class  csl::Controllable
 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...
class  csl::Scalable
 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...
class  csl::Effect
 Effect – mix-in for classes that have unit generators as inputs (like filters). Note that this always uses a separate buffer for the input. More...
class  csl::Phased
 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...
class  csl::Writeable
 Writeable – a mix-in for buffers and streams that one can write to. More...
class  csl::Seekable
 Seekable – a mix-in for positionable streams. More...
class  csl::Cacheable
 Cacheable – a mix-in for caching streams. More...
class  csl::FanOut
 A fan-out generator for DSP graphs with loops This takes a single input, and provides mNumFanOuts outputs; it only calls its input every mNumFanOuts frames. This behavior is now standard on UnitGenerators, using their mOutputs UGenVector (see UnitGenerators::nextBuffer). More...
class  csl::Splitter
 Splitter class – a de-multiplexer for multi-channel signals. More...
class  csl::Joiner
 Joiner class – a multiplexer for multi-channel signals. More...
class  csl::Interleaver
 Interleaver handles copying interleaved sample buffers (like sound files and inter-process sockets) to/from non-interleaved CSL-style Buffer objects. More...
class  csl::IO
 IO – the abstract I/O scheduling class; subclasses interface to specific I/O APIs. An IO object has a graph (a ptr to a UGen), and it registers itself with some call-back API (like PortAudio, CoreAudio, Jack, VST, JUCE), setting up a callback function that in turn calls the nextBuffer() method of its graph root. One creates an IO with the desired rate, block size (optional) I/O device keys, and the number of in and out channels; you then set its root to be your DSP graph and send it start/stop messages. More...
class  csl::IODevice
 IO Device class – a holder for a sound interface with name, id, # IO channels, etc. More...

Namespaces

namespace  csl
 AdditiveInstrument.h – Sum-of-sines synthesis instrument class.

Macros

#define DECLARE_SCALABLE_CONTROLS
 Macros for all the Scalable UnitGenerators (note that these don't end with ";") Note that these make some assumptions about variable names declared in the method;.
#define LOAD_SCALABLE_CONTROLS
 Load the scale/offset-related values at the start.
#define UPDATE_SCALABLE_CONTROLS
#define CHECK_UPDATE_SCALABLE_CONTROLS
#define IS_UNSCALED
#define DECLARE_PHASED_CONTROLS
 Macros for all the Phased UnitGenerators (note that these don't end with ";") These make some assumptions about variable names declared in the method; i.e., the number of frames to compute must be named "numFrames." Use this: unsigned numFrames = outputBuffer.mNumFrames;.
#define LOAD_PHASED_CONTROLS
 Load the freq-related values at the start of the callback; if the frequency is a dynamic UGen input, then pull its value, get the pointer to its buffer, and set the first value, otherwise store the constant value.
#define UPDATE_PHASED_CONTROLS   freqValue = freqPort->nextValue()
 Update the freq-related value in the loop.
#define CHECK_UPDATE_PHASED_CONTROLS

Enumerations

enum  csl::BufferContentType {
  csl::kSamples, csl::kSpectra, csl::kLPCCoeff, csl::kIRData,
  csl::kWavelet, csl::kGeometry, csl::kUnknown
}
 Sample buffer contents type (optional) One could argue that we should use subclasses for this, but they're not behaviorally different at present. More...
enum  csl::BufferCopyPolicy { csl::kCopy, csl::kExpand, csl::kIgnore }
 UnitGenerator buffer copy policy flags (for multi-channel expansion) More...
enum  csl::SeekPosition { csl::kPositionStart, csl::kPositionCurrent, csl::kPositionEnd }
 Enumeration for seek flags. More...
enum  csl::IO_Status {
  csl::kIONew, csl::kIOInit, csl::kIOOpen, csl::kIORunning,
  csl::kIOClosed, csl::kIOExit
}
 IO Status flag. More...

Macro Definition Documentation

#define DECLARE_SCALABLE_CONTROLS
Value:
Port * scalePort = mInputs[CSL_SCALE]; \
Port * offsetPort = mInputs[CSL_OFFSET]; \
float scaleValue, offsetValue

Macros for all the Scalable UnitGenerators (note that these don't end with ";") Note that these make some assumptions about variable names declared in the method;.

Declare the pointer to scale/offset buffers (if used) and current scale/offset values

Definition at line 400 of file CSL_Core.h.

Referenced by csl::KarplusString::nextBuffer(), csl::Mixer::nextBuffer(), csl::WhiteNoise::nextBuffer(), csl::SineAsScaled::nextBuffer(), csl::PinkNoise::nextBuffer(), csl::WavetableOscillator::nextBuffer(), csl::Panner::nextBuffer(), csl::LSoundFile::nextBuffer(), csl::Filter::nextBuffer(), csl::Sine::nextBuffer(), csl::Envelope::nextBuffer(), csl::NtoMPanner::nextBuffer(), csl::FSine::nextBuffer(), csl::Abst_SoundFile::nextBuffer(), csl::Sawtooth::nextBuffer(), csl::Square::nextBuffer(), csl::Impulse::nextBuffer(), csl::Moog::nextBuffer(), csl::RandEnvelope::nextBuffer(), and csl::SumOfSines::nextWaveInto().

#define CHECK_UPDATE_SCALABLE_CONTROLS
Value:
if (scalePort) \
scaleValue = scalePort->nextValue(); \
if (offsetPort) \
offsetValue = offsetPort->nextValue()

Definition at line 419 of file CSL_Core.h.

Referenced by csl::LineSegment::nextBuffer().

#define IS_UNSCALED
Value:
(scalePort->isFixed()) && (offsetPort->isFixed()) && \
(scaleValue == 1.0) && (offsetValue == 0.0)

Definition at line 425 of file CSL_Core.h.

Referenced by csl::LSoundFile::nextBuffer().

#define DECLARE_PHASED_CONTROLS
Value:
Port * freqPort = mInputs[CSL_FREQUENCY]; \
float freqValue

Macros for all the Phased UnitGenerators (note that these don't end with ";") These make some assumptions about variable names declared in the method; i.e., the number of frames to compute must be named "numFrames." Use this: unsigned numFrames = outputBuffer.mNumFrames;.

Declare the frequency port (accessing the mInputs map) and current value.

Definition at line 488 of file CSL_Core.h.

Referenced by csl::SineAsPhased::nextBuffer(), csl::SineAsScaled::nextBuffer(), csl::WavetableOscillator::nextBuffer(), csl::Sine::nextBuffer(), csl::FSine::nextBuffer(), csl::Sawtooth::nextBuffer(), csl::Square::nextBuffer(), csl::Impulse::nextBuffer(), and csl::SumOfSines::nextWaveInto().

#define LOAD_PHASED_CONTROLS
Value:
Controllable::pullInput(freqPort, numFrames); \
freqValue = freqPort->nextValue()

Load the freq-related values at the start of the callback; if the frequency is a dynamic UGen input, then pull its value, get the pointer to its buffer, and set the first value, otherwise store the constant value.

Definition at line 496 of file CSL_Core.h.

Referenced by csl::SineAsPhased::nextBuffer(), csl::SineAsScaled::nextBuffer(), csl::WavetableOscillator::nextBuffer(), csl::Sine::nextBuffer(), csl::FSine::nextBuffer(), csl::Sawtooth::nextBuffer(), csl::Square::nextBuffer(), csl::Impulse::nextBuffer(), and csl::SumOfSines::nextWaveInto().

#define UPDATE_PHASED_CONTROLS   freqValue = freqPort->nextValue()
#define CHECK_UPDATE_PHASED_CONTROLS
Value:
if (freqPort) \
freqValue = freqPort->nextValue()

Definition at line 505 of file CSL_Core.h.