CSL  6.0
BinaryOp.h File Reference
#include "CSL_Core.h"

Go to the source code of this file.

Classes

class  csl::BinaryOp
 BinaryOp – An Effect that takes two input sources (UnitGenerators or scalars) and gives a single UnitGenerator as its output. BinaryOp is an abstract class who's nextBuffer method is to be implemented by subclasses. More...
 
class  csl::AddOp
 AddOp – A BinaryOp that adds two UnitGenerators or fixed constants together. More...
 
class  csl::MulOp
 MulOp – A BinaryOp that multiplies two UnitGenerators or fixed constants together, sample-by-sample. More...
 

Namespaces

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

Macros

#define DECLARE_OPERAND_CONTROLS
 Declare the operand port (accessing the mInputs map) and current value. More...
 
#define LOAD_OPERAND_CONTROLS
 Load the op-related values at the start of the callback; if the operand 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_OPERAND_CONTROLS
 Update the op-related value in the loop. More...
 

Macro Definition Documentation

#define DECLARE_OPERAND_CONTROLS
Value:
Port * opPort = mInputs[CSL_OPERAND]; \
SampleBuffer inValue; \
sample opValue
sample * SampleBuffer
1-channel buffer data type, vector of (sample)
Definition: CSL_Types.h:194
float sample
(could be changed to int, or double)
Definition: CSL_Types.h:191
#define CSL_OPERAND
Definition: CSL_Types.h:276

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

Definition at line 61 of file BinaryOp.h.

Referenced by csl::AddOp::nextBuffer(), and csl::MulOp::nextBuffer().

#define LOAD_OPERAND_CONTROLS
Value:
Controllable::pullInput(opPort, numFrames); \
Effect::pullInput(numFrames); \
inValue = mInputPtr; \
opValue = opPort->nextValue()

Load the op-related values at the start of the callback; if the operand 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 69 of file BinaryOp.h.

Referenced by csl::AddOp::nextBuffer(), and csl::MulOp::nextBuffer().

#define UPDATE_OPERAND_CONTROLS
Value:
opValue = opPort->nextValue() ; \
inValue++

Update the op-related value in the loop.

Definition at line 77 of file BinaryOp.h.

Referenced by csl::AddOp::nextBuffer(), and csl::MulOp::nextBuffer().