CSL 5.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

Classes | Namespaces | Macros
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
namespace | 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.
#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.
#define | UPDATE_OPERAND_CONTROLS
| Update the op-related value in the loop.

## Macro Definition Documentation

#define DECLARE_OPERAND_CONTROLS

Value:
Port * opPort = mInputs[CSL_OPERAND]; \
SampleBuffer inValue; \
sample opValue

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