csl::BinaryOp Class Reference

#include <BinaryOp.h>

Inheritance diagram for csl::BinaryOp:

csl::Effect csl::UnitGenerator csl::Controllable csl::Model csl::AddOp csl::MulOp

List of all members.

Public Member Functions

 BinaryOp (UnitGenerator &op1, UnitGenerator &op2)
 The constructor for dual-UnitGenerator operation.
 BinaryOp (UnitGenerator &op1, float op2)
 Constructuctor for operating a UnitGenerator and a fixed float.
 BinaryOp (float op1, UnitGenerator &op2)
 The same constructor, but with UGen and float inputs.
virtual ~BinaryOp ()
 The destructor.
void dump ()
 Finds out if the buffer changes over the given bufferLength range.

Protected Member Functions

virtual void nextBuffer (Buffer &outputBuffer, unsigned outBufNum)=0 throw (CException)
 Set the operand from a fixed float.
bool isFixed ()
 Is the input fixed or a dynamic UnitGenerator?
bool inputIsFixed ()
bool operandIsFixed ()
 Is the operand fixed or a dynamic UnitGenerator?
sample operandFixedValue (Buffer &outputBuffer)
 Convert the dynamic operand to a fixed sample (if operand is fixed).


Detailed Description

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

Constructor & Destructor Documentation

BinaryOp::BinaryOp ( UnitGenerator op1,
UnitGenerator op2 
)

The constructor for dual-UnitGenerator operation.

References csl::Controllable::addInput(), CSL_OPERAND, and csl::logMsg().

BinaryOp::BinaryOp ( UnitGenerator op1,
float  op2 
)

Constructuctor for operating a UnitGenerator and a fixed float.

References csl::Controllable::addInput(), CSL_OPERAND, and csl::logMsg().

BinaryOp::BinaryOp ( float  op1,
UnitGenerator op2 
)

The same constructor, but with UGen and float inputs.

References csl::Controllable::addInput(), CSL_OPERAND, and csl::logMsg().

BinaryOp::~BinaryOp (  )  [virtual]

The destructor.


Member Function Documentation

void BinaryOp::dump ( void   )  [virtual]

Finds out if the buffer changes over the given bufferLength range.

Prints instance info

Reimplemented from csl::UnitGenerator.

References CSL_OPERAND, csl::Port::dump(), csl::Effect::inPort(), and csl::Controllable::mInputs.

virtual void csl::BinaryOp::nextBuffer ( Buffer outputBuffer,
unsigned  outBufNum 
) throw (CException) [protected, pure virtual]

Set the operand from a fixed float.

Abstract function that will do the processing for each buffer

Reimplemented from csl::UnitGenerator.

Implemented in csl::AddOp, and csl::MulOp.

bool BinaryOp::isFixed (  )  [inline, protected, virtual]

Is the input fixed or a dynamic UnitGenerator?

Reimplemented from csl::UnitGenerator.

References inputIsFixed(), and operandIsFixed().

bool BinaryOp::inputIsFixed (  )  [inline, protected]

References csl::Effect::inPort().

Referenced by isFixed().

bool BinaryOp::operandIsFixed (  )  [inline, protected]

Is the operand fixed or a dynamic UnitGenerator?

References CSL_OPERAND, and csl::Controllable::mInputs.

Referenced by isFixed().

sample csl::BinaryOp::operandFixedValue ( Buffer outputBuffer  )  [inline, protected]

Convert the dynamic operand to a fixed sample (if operand is fixed).


The documentation for this class was generated from the following files:

Generated on Thu Sep 17 23:14:17 2009 for CSL by  doxygen 1.5.8