CSL  6.0
CSL_Core.h File Reference
#include "CSL_Types.h"
#include "CSL_Exceptions.h"
#include "CGestalt.h"
#include <sys/time.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. 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). 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). More...
 
class  csl::Effect
 Effect – mix-in for classes that have unit generators as inputs (like filters). More...
 
class  csl::Phased
 Phased – a mix-in for objects with phase accumulators (local float) and frequency controls (an input port). 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. 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. More...
 
class  csl::IODevice
 IO Device class – a holder for a sound interface with name, id, # IO channels, etc. More...
 

Namespaces

 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 ";") More...
 
#define LOAD_SCALABLE_CONTROLS
 Load the scale/offset-related values at the start. More...
 
#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;. More...
 
#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. More...
 
#define UPDATE_PHASED_CONTROLS   freqValue = freqPort->nextValue()
 Update the freq-related value in the loop. More...
 
#define CHECK_UPDATE_PHASED_CONTROLS
 
#define GET_TIME(val)   if (gettimeofday(val, 0) != 0) logMsg(kLogError, "Output: Error reading current time");
 
#define SUB_TIMES(t1, t2)   (((t1->tv_sec - t2->tv_sec) * 1000000) + (t1->tv_usec - t2->tv_usec))
 

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
#define CSL_OFFSET
Definition: CSL_Types.h:274
#define CSL_SCALE
Definition: CSL_Types.h:273

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 429 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::Sine::nextBuffer(), csl::Filter::nextBuffer(), csl::Envelope::nextBuffer(), csl::NtoMPanner::nextBuffer(), csl::FSine::nextBuffer(), csl::Sawtooth::nextBuffer(), csl::Abst_SoundFile::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 448 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 454 of file CSL_Core.h.

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

#define DECLARE_PHASED_CONTROLS
Value:
Port * freqPort = mInputs[CSL_FREQUENCY]; \
float freqValue
#define CSL_FREQUENCY
Definition: CSL_Types.h:278

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 520 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 528 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 537 of file CSL_Core.h.

#define GET_TIME (   val)    if (gettimeofday(val, 0) != 0) logMsg(kLogError, "Output: Error reading current time");
#define SUB_TIMES (   t1,
  t2 
)    (((t1->tv_sec - t2->tv_sec) * 1000000) + (t1->tv_usec - t2->tv_usec))

Definition at line 701 of file CSL_Core.h.

Referenced by PME::manage_sources(), and csl::IO::printTimeStatistics().