12 #ifndef CSL_BINARYOP_H
13 #define CSL_BINARYOP_H
61 #define DECLARE_OPERAND_CONTROLS \
62 Port * opPort = mInputs[CSL_OPERAND]; \
63 SampleBuffer inValue; \
69 #define LOAD_OPERAND_CONTROLS \
70 Controllable::pullInput(opPort, numFrames); \
71 Effect::pullInput(numFrames); \
72 inValue = mInputPtr; \
73 opValue = opPort->nextValue()
77 #define UPDATE_OPERAND_CONTROLS \
78 opValue = opPort->nextValue() ; \
123 #endif // CSL_BINARYOP_H
void dump()
Prints instance info.
AdditiveInstrument.h – Sum-of-sines synthesis instrument class.
Effect – mix-in for classes that have unit generators as inputs (like filters).
bool isFixed()
Is the input fixed or a dynamic UnitGenerator?
BinaryOp(UnitGenerator &op1, UnitGenerator &op2)
The constructor for dual-UnitGenerator operation.
virtual void nextBuffer(Buffer &outputBuffer, unsigned outBufNum)=0
Abstract function that will do the processing for each buffer.
AddOp(UnitGenerator &op1, UnitGenerator &op2)
The constructor for dual-UnitGenerator operation.
virtual ~BinaryOp()
The destructor.
sample operandFixedValue(Buffer &outputBuffer)
Convert the dynamic operand to a fixed sample (if operand is fixed)
float sample
(could be changed to int, or double)
MulOp(UnitGenerator &op1, UnitGenerator &op2)
The constructor for dual-UnitGenerator operation.
void setOperand(float op)
Set the operand from a fixed float.
void nextBuffer(Buffer &outputBuffer, unsigned outBufNum)
Returns the next individual frame (for fixed values)
MulOp – A BinaryOp that multiplies two UnitGenerators or fixed constants together, sample-by-sample.
BinaryOp – An Effect that takes two input sources (UnitGenerators or scalars) and gives a single Uni...
void nextBuffer(Buffer &outputBuffer, unsigned outBufNum)
Function that implements the adding routine.
Buffer – the multi-channel sample buffer class (passed around between generators and IO guys)...
PortMap mInputs
the map of my inputs or controls (used by the mix-in classes)
AddOp – A BinaryOp that adds two UnitGenerators or fixed constants together.
bool operandIsFixed()
Is the operand fixed or a dynamic UnitGenerator?
Base class of CSL exceptions (written upper-case). Has a string message.