pl-nk v0.4.5
Plonk|Plink|Plank are a set of cross-platform C/C++ frameworks for audio software development
Public Member Functions | Static Public Member Functions
UnitBase< SampleType > Class Template Reference

A Unit is effectively an array of Channel objects. More...

Inherits NumericalArray< ChannelBase< SampleType > >.

List of all members.

Public Member Functions

 UnitBase () throw ()
 Default constructor.
 UnitBase (ChannelType const &channel) throw ()
 This creates a Unit with a single Channel.
template<class ValueType >
 UnitBase (ValueType const &valueInit) throw ()
 Constant Unit constructor.
template<class ValueType >
 UnitBase (NumericalArray< ValueType > const &values) throw ()
 Multichannel Constant Unit constructor.
 UnitBase (UnitBase const &copy) throw ()
 Copy constructor from the base array type.
UnitBaseoperator= (UnitBase const &other) throw ()
 Assignment operator.
UnitBaseoperator= (ChannelType const &other) throw ()
 Assignment operator from a single channel.
UnitBaseoperator= (UnitType const &other) throw ()
 Assignment operator from the base array type.
UnitBaseoperator= (ObjectArray< ChannelType > const &other) throw ()
 Assignment operator from an array of channels.
 operator const ChannelType & () const throw ()
 Cast to a single channel.
 operator ChannelType & () throw ()
 Cast to a single channel.
UnitBase ar (const Interp::TypeCode interpType, BlockSize const &preferredBlockSize=BlockSize::getDefault(), SampleRate const &preferredSampleRate=SampleRate::getDefault()) const throw ()
 Resamples this unit to a different sample rate and/or block size.
UnitBase ar () const throw ()
 Resamples this unit to a different sample rate and/or block size.
UnitBase kr (const Interp::TypeCode interpType) const throw ()
 Resamples this unit to the default control rate sample rate and block size.
UnitBase kr () const throw ()
 Resamples this unit to the default control rate sample rate and block size.
UnitBase mix () const throw ()
 Mixes this unit down to a single channel.
UnitBase mixBarrier () const throw ()
 Mixes this unit down to a single channel with and auto-deletion prevention barrier.
UnitBase overlapMake (DoubleVariable const &overlap=Math< DoubleVariable >::get0_5(), const bool zeroPad=false) const throw ()
 Create an overlapping process from this unit's contrinuous stream.
UnitBase overlapZeroPad (DoubleVariable const &overlap=Math< DoubleVariable >::get0_5()) const throw ()
 Create an overlapping process from this unit's contrinuous stream, zero-padding the overlapping sections.
UnitBase overlapMix (DoubleVariable const &overlap=Math< DoubleVariable >::get0_5()) const throw ()
 Mix down overlapping process to a continuous stream.
template<SampleType(*)(SampleTypeconst &, SampleTypeconst &) op>
UnitBase binary (UnitBase const &rightOperand) const throw ()
 Templated binary operator Unit creator.
template<SampleType(*)(SampleTypeconst &) op>
UnitBase unary () const throw ()
 Templated unary operator Unit creator.
UnitBase addop (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'addop' function to this one and the right argument.
UnitBase subop (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'subop' function to this one and the right argument.
UnitBase mulop (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'mulop' function to this one and the right argument.
UnitBase divop (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'divop' function to this one and the right argument.
UnitBase modop (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'modop' function to this one and the right argument.
UnitBase isEqualTo (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'isEqualTo' function to this one and the right argument.
UnitBase isNotEqualTo (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'isNotEqualTo' function to this one and the right argument.
UnitBase isGreaterThan (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'isGreaterThan' function to this one and the right argument.
UnitBase isGreaterThanOrEqualTo (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'isGreaterThanOrEqualTo' function to this one and the right argument.
UnitBase isLessThan (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'isLessThan' function to this one and the right argument.
UnitBase isLessThanOrEqualTo (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'isLessThanOrEqualTo' function to this one and the right argument.
UnitBase hypot (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'hypot' function to this one and the right argument.
UnitBase pow (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'pow' function to this one and the right argument.
UnitBase atan2 (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'atan2' function to this one and the right argument.
UnitBase min (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'min' function to this one and the right argument.
UnitBase max (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'max' function to this one and the right argument.
UnitBase sumsqr (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'sumsqr' function to this one and the right argument.
UnitBase difsqr (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'difsqr' function to this one and the right argument.
UnitBase sqrsum (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'sqrsum' function to this one and the right argument.
UnitBase sqrdif (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'sqrdif' function to this one and the right argument.
UnitBase absdif (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'absdif' function to this one and the right argument.
UnitBase thresh (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'thresh' function to this one and the right argument.
UnitBase round (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'round' function to this one and the right argument.
UnitBase trunc (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'trunc' function to this one and the right argument.
UnitBase clip2 (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'clip2' function to this one and the right argument.
UnitBase decayFeedback (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary 'decayFeedback' function to this one and the right argument.
UnitBase operator+ (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary '+' operator to this and the right argument.
UnitBase operator- (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary '-' operator to this and the right argument.
UnitBase operator* (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary '*' operator to this and the right argument.
UnitBase operator/ (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary '/' operator to this and the right argument.
UnitBase operator% (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary '%' operator to this and the right argument.
UnitBase operator< (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary '<' operator to this and the right argument.
UnitBase operator<= (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary '<=' operator to this and the right argument.
UnitBase operator> (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary '>' operator to this and the right argument.
UnitBase operator>= (UnitBase const &right) const throw ()
 Create a new UnitBase by applying the binary '>=' operator to this and the right argument.
template<class RightType >
UnitBase operator+ (RightType const &right) const throw ()
 Create a new UnitBase by applying the binary '+' operator to this and the right argument.
template<class RightType >
UnitBase operator- (RightType const &right) const throw ()
 Create a new UnitBase by applying the binary '-' operator to this and the right argument.
template<class RightType >
UnitBase operator* (RightType const &right) const throw ()
 Create a new UnitBase by applying the binary '*' operator to this and the right argument.
template<class RightType >
UnitBase operator/ (RightType const &right) const throw ()
 Create a new UnitBase by applying the binary '/' operator to this and the right argument.
template<class RightType >
UnitBase operator% (RightType const &right) const throw ()
 Create a new UnitBase by applying the binary '%' operator to this and the right argument.
template<class RightType >
UnitBaseoperator+= (RightType const &right) throw ()
 Create a new UnitBase and assign it to this one by applying the binary '+' operator to this and the right argument.
template<class RightType >
UnitBaseoperator-= (RightType const &right) throw ()
 Create a new UnitBase and assign it to this one by applying the binary '-' operator to this and the right argument.
template<class RightType >
UnitBaseoperator*= (RightType const &right) throw ()
 Create a new UnitBase and assign it to this one by applying the binary '*' operator to this and the right argument.
template<class RightType >
UnitBaseoperator/= (RightType const &right) throw ()
 Create a new UnitBase and assign it to this one by applying the binary '/' operator to this and the right argument.
template<class RightType >
UnitBaseoperator%= (RightType const &right) throw ()
 Create a new UnitBase and assign it to this one by applying the binary '%' operator to this and the right argument.
template<class RightType >
UnitBase operator< (RightType const &right) const throw ()
 Create a new UnitBase by applying the binary '<' operator to this and the right argument.
template<class RightType >
UnitBase operator<= (RightType const &right) const throw ()
 Create a new UnitBase by applying the binary '<=' operator to this and the right argument.
template<class RightType >
UnitBase operator> (RightType const &right) const throw ()
 Create a new UnitBase by applying the binary '>' operator to this and the right argument.
template<class RightType >
UnitBase operator>= (RightType const &right) const throw ()
 Create a new UnitBase by applying the binary '>=' operator to this and the right argument.
UnitBase move () const throw ()
 Create a new UnitBase by applying the unary 'move' function to this one.
UnitBase inc () const throw ()
 Create a new UnitBase by applying the unary 'inc' function to this one.
UnitBase dec () const throw ()
 Create a new UnitBase by applying the unary 'dec' function to this one.
UnitBase abs () const throw ()
 Create a new UnitBase by applying the unary 'abs' function to this one.
UnitBase log2 () const throw ()
 Create a new UnitBase by applying the unary 'log2' function to this one.
UnitBase neg () const throw ()
 Create a new UnitBase by applying the unary 'neg' function to this one.
UnitBase reciprocal () const throw ()
 Create a new UnitBase by applying the unary 'reciprocal' function to this one.
UnitBase sin () const throw ()
 Create a new UnitBase by applying the unary 'sin' function to this one.
UnitBase cos () const throw ()
 Create a new UnitBase by applying the unary 'cos' function to this one.
UnitBase tan () const throw ()
 Create a new UnitBase by applying the unary 'tan' function to this one.
UnitBase asin () const throw ()
 Create a new UnitBase by applying the unary 'asin' function to this one.
UnitBase acos () const throw ()
 Create a new UnitBase by applying the unary 'acos' function to this one.
UnitBase atan () const throw ()
 Create a new UnitBase by applying the unary 'atan' function to this one.
UnitBase sinh () const throw ()
 Create a new UnitBase by applying the unary 'sinh' function to this one.
UnitBase cosh () const throw ()
 Create a new UnitBase by applying the unary 'cosh' function to this one.
UnitBase tanh () const throw ()
 Create a new UnitBase by applying the unary 'tanh' function to this one.
UnitBase sqrt () const throw ()
 Create a new UnitBase by applying the unary 'sqrt' function to this one.
UnitBase log () const throw ()
 Create a new UnitBase by applying the unary 'log' function to this one.
UnitBase log10 () const throw ()
 Create a new UnitBase by applying the unary 'log10' function to this one.
UnitBase exp () const throw ()
 Create a new UnitBase by applying the unary 'exp' function to this one.
UnitBase squared () const throw ()
 Create a new UnitBase by applying the unary 'squared' function to this one.
UnitBase cubed () const throw ()
 Create a new UnitBase by applying the unary 'cubed' function to this one.
UnitBase ceil () const throw ()
 Create a new UnitBase by applying the unary 'ceil' function to this one.
UnitBase floor () const throw ()
 Create a new UnitBase by applying the unary 'floor' function to this one.
UnitBase frac () const throw ()
 Create a new UnitBase by applying the unary 'frac' function to this one.
UnitBase sign () const throw ()
 Create a new UnitBase by applying the unary 'sign' function to this one.
UnitBase m2f () const throw ()
 Create a new UnitBase by applying the unary 'm2f' function to this one.
UnitBase f2m () const throw ()
 Create a new UnitBase by applying the unary 'f2m' function to this one.
UnitBase a2dB () const throw ()
 Create a new UnitBase by applying the unary 'a2dB' function to this one.
UnitBase dB2a () const throw ()
 Create a new UnitBase by applying the unary 'dB2a' function to this one.
UnitBase d2r () const throw ()
 Create a new UnitBase by applying the unary 'd2r' function to this one.
UnitBase r2d () const throw ()
 Create a new UnitBase by applying the unary 'r2d' function to this one.
UnitBase distort () const throw ()
 Create a new UnitBase by applying the unary 'distort' function to this one.
UnitBase zap () const throw ()
 Create a new UnitBase by applying the unary 'zap' function to this one.
UnitBase operator- () const throw ()
 Create a new UnitBase by applying the unary '-' operator to this one.
UnitBase operator++ () const throw ()
 Create a new UnitBase by applying the unary '++' operator to this one.
UnitBase operator++ (int) const throw ()
 Create a new UnitBase by applying the unary '++' operator to this one.
UnitBase linlin (UnitBase const &inLow, UnitBase const &inHigh, UnitBase const &outLow, UnitBase const &outHigh) const throw ()
 Linear to linear mapping.
UnitBase linlin (UnitBase const &outLow, UnitBase const &outHigh) const throw ()
 Linear to linear mapping assuming the input is in the range -1...+1.
UnitBase linexp (UnitBase const &inLow, UnitBase const &inHigh, UnitBase const &outLow, UnitBase const &outHigh) const throw ()
 Linear to exponential mapping.
UnitBase linexp (UnitBase const &outLow, UnitBase const &outHigh) const throw ()
 Linear to exponential mapping assuming the input is in the range -1...+1.
UnitBase linsin (UnitBase const &inLow, UnitBase const &inHigh, UnitBase const &outLow, UnitBase const &outHigh) const throw ()
 Linear to sinusoidal mapping.
UnitBase linsin (UnitBase const &outLow, UnitBase const &outHigh) const throw ()
 Linear to sinusoidal mapping assuming the input is in the range -1...+1.
UnitBase linwelch (UnitBase const &inLow, UnitBase const &inHigh, UnitBase const &outLow, UnitBase const &outHigh) const throw ()
 Linear to Welch curve mapping.
UnitBase linwelch (UnitBase const &outLow, UnitBase const &outHigh) const throw ()
 Linear to Welch curve mapping assuming the input is in the range -1...+1.
UnitBase explin (UnitBase const &inLow, UnitBase const &inHigh, UnitBase const &outLow, UnitBase const &outHigh) const throw ()
 Exponential to linear mapping.
UnitBase operator, (UnitType const &other) const throw ()
 Create a array of units by concatenation.
UnitBasesetLabel (Text const &unitId) throw ()
 Enables a custom name to be set.
int getNumChannels () const throw ()
 Gets the number of channels in this unit.
UnitBase getChannel (const int index) throw ()
 Returns a unit with the single channel specified.
UnitBase getChannel (const int index) const throw ()
 Returns a unit with the single channel specified.
ChannelType getChannelObject (const int index) throw ()
 Returns a single channel object.
ChannelType getChannelObject (const int index) const throw ()
 Returns a single channel object.
UnitBase operator[] (const int index) throw ()
 Returns a unit with the single channel specified.
UnitBase operator[] (const int index) const throw ()
 Returns a unit with the single channel specified.
UnitBaseput (const int index, UnitBase const &channel) throw ()
 Set a particular channel.
UnitArray group (const int groupSize) const throw ()
 Group this array into a 2D array with a particular group size.
BlockSize getMinBlockSize () const throw ()
 Get the minimum block size in the array of channels in this unit.
BlockSize getMaxBlockSize () const throw ()
 Get the maximum block size in the array of channels in this unit.
BlockSize getBlockSize (const int index) const throw ()
 Get the block size of a specific channel in this unit.
void setBlockSize (BlockSize const &newBlockSize) throw ()
 Set the block size of all channels in this unit.
BlockSizes getBlockSizes () const throw ()
 Get an array of block sizes for the channels in the unit.
SampleRate getMinSampleRate () const throw ()
 Get the minimum sample rate in the array of channels in this unit.
SampleRate getMaxSampleRate () const throw ()
 Get the maximum sample rate in the array of channels in this unit.
SampleRate getSampleRate (const int index) const throw ()
 Get the sample rate of a specific channel in this unit.
void setSampleRate (SampleRate const &newSampleRate) throw ()
 Set the sample rate of all channels in this unit.
SampleRates getSampleRates () const throw ()
 Get an array of sample rates for the channels in the unit.
const BuffergetOutputBuffer (const int index) const throw ()
 Get the output buffer of a specific channel.
const SampleType * getOutputSamples (const int index) const throw ()
 Get the output buffer of a specific channel.
SampleType * getOutputSamples (const int index) throw ()
 Get a pointer to the raw samples of a specific channel.
void setOutputBuffer (const int index, Buffer const &externalBuffer) throw ()
 Set the output buffer of a specific channel to use an external buffer.
void setOutputBuffer (BufferArrayType const &externalBuffer) throw ()
 Set the output buffers of this unit's channels to use external buffers.
const SampleType & getValue (const int index) const throw ()
 Get the current value of a specific channel in this unit.
bool isNull () const throw ()
 Returns true if this unit contains only a single null channel.
bool isNotNull () const throw ()
 Returns false if this unit contains only a single null channel.
bool isConstant () const throw ()
 Returns true if this unit contains only a single constant channel.
bool isNotConstant () const throw ()
 Returns false if this unit contains only a single constant channel.
bool needsToProcess (ProcessInfo const &info, const int channel) const throw ()
 Returns true if this unit needs to process for the given timestamp.
bool shouldBeDeletedNow (ProcessInfo const &info) const throw ()
 Returns true if this unit (i.e., all of its channels) needs to be deleted becasue they have expired.
const Bufferprocess (ProcessInfo &info, const int channel) throw ()
 Process a specific channel in this unit.
void process (ProcessInfo &info) throw ()
 Process all channels in this unit.

Static Public Member Functions

static UnitBase fromWeak (Weak const &weak) throw ()
 Get a weakly linked copy of this object.
template<class ChannelInternalClassType >
static UnitBase createFromInputs (Inputs const &inputs, typename ChannelInternalClassType::Data const &data, BlockSize const &preferredBlockSize, SampleRate const &preferredSampleRate) throw ()
 Primary means of creating Unit objects.
template<class ProxyOwnerChannelInternalClassType >
static UnitBase proxiesFromInputs (Inputs const &inputs, typename ProxyOwnerChannelInternalClassType::Data const &data, BlockSize const &preferredBlockSize, SampleRate const &preferredSampleRate) throw ()
 Primary means of creating Unit objects with proxies.
static UnitBase applyMulAdd (UnitBase const &mainUnit, UnitBase const &mul, UnitBase const &add) throw ()
 Apply multiply and addition operators to another unit.

Detailed Description

template<class SampleType>
class UnitBase< SampleType >

A Unit is effectively an array of Channel objects.

A Unit effective IS a Unit graph since each Channel of each Unit may be in turn connected to more Unit objects via its inputs.

Inherits from ObjectArray and is specifically designed to hold an array of ChannelBase objects. The is perhaps the most important class at the user end of the code. The user deals with UnitBase objects and combines them into a graph to produce audio processing algorithms. In fact a UnitBase object is a graph. There are two primary static (factory) functions for creating UnitBase objects from specific channel types: createFromDictionary() and proxiesFromDictionary(). The latter will be discussed below, createFromDictionary() is passed a dictionary containing the desired inputs to the new Unit and it allocates a number of channels of a specified ChannelInternal type. These are passed a 'data' structure to initialise themselves. In many cases this might just be the default ChannelInternalCore::Data where the sample rate information can be transmitted up the graph. The UnitBase that is created will have a number of channels equal to the the maximum number of channels found in the provided inputs i.e., if a stereo unit is passed as the frequency input to the SawUnit then two channels of the SawUnit will be created - at render time the appropriate channel of the input unit will be passed to the appropriate channel of the destination unit. There is no concept of 'wire' or 'connections' in Plonk - the graph connections are implied by the layering of units to form a chain (and by implication the 'graph' is constructed by how the channels in these layers transmit to the next layer). UnitBase objects repsond to most of the standard unary and binary operators (including symbols +, -, * etc). These create units that apply this operator at render time.

See also:
ChannelBase, ProcessInfo

Constructor & Destructor Documentation

template<class SampleType>
UnitBase< SampleType >::UnitBase ( ) throw () [inline]

Default constructor.

This creates a Unit with a single null Channel.

template<class SampleType>
UnitBase< SampleType >::UnitBase ( ChannelType const &  channel) throw () [inline]

This creates a Unit with a single Channel.

template<class SampleType>
template<class ValueType >
UnitBase< SampleType >::UnitBase ( ValueType const &  valueInit) throw () [inline]

Constant Unit constructor.

This creates a Unit with a single constant Channel. Ideally you could/should cache frequently used constants (e.g., 1, pi, etc).

template<class SampleType>
template<class ValueType >
UnitBase< SampleType >::UnitBase ( NumericalArray< ValueType > const &  values) throw () [inline]

Multichannel Constant Unit constructor.

This creates a Unit with a multiple constant Channel objects derived from an array of numerical values.

template<class SampleType>
UnitBase< SampleType >::UnitBase ( UnitBase< SampleType > const &  copy) throw () [inline]

Copy constructor from the base array type.


Member Function Documentation

template<class SampleType>
UnitBase UnitBase< SampleType >::a2dB ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'a2dB' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::abs ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'abs' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::absdif ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'absdif' function to this one and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::acos ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'acos' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::addop ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'addop' function to this one and the right argument.

template<class SampleType>
static UnitBase UnitBase< SampleType >::applyMulAdd ( UnitBase< SampleType > const &  mainUnit,
UnitBase< SampleType > const &  mul,
UnitBase< SampleType > const &  add 
) throw () [inline, static]

Apply multiply and addition operators to another unit.

Here mul will be ignored (not applied) if the value is a single channel constant equal to 1 (or null rather than just a constant 0). And add will be ignored (not applied) if it is a single channel constant equal to 0 (or null). On some platforms this might be implemented as a single multiply-and-add operation.

template<class SampleType>
UnitBase UnitBase< SampleType >::ar ( const Interp::TypeCode  interpType,
BlockSize const &  preferredBlockSize = BlockSize::getDefault(),
SampleRate const &  preferredSampleRate = SampleRate::getDefault() 
) const throw () [inline]

Resamples this unit to a different sample rate and/or block size.

By default the default sample rate and default block size are used.

template<class SampleType>
UnitBase UnitBase< SampleType >::ar ( ) const throw () [inline]

Resamples this unit to a different sample rate and/or block size.

By default the default sample rate and default block size are used.

template<class SampleType>
UnitBase UnitBase< SampleType >::asin ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'asin' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::atan ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'atan' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::atan2 ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'atan2' function to this one and the right argument.

template<class SampleType>
template<SampleType(*)(SampleTypeconst &, SampleTypeconst &) op>
UnitBase UnitBase< SampleType >::binary ( UnitBase< SampleType > const &  rightOperand) const throw () [inline]

Templated binary operator Unit creator.

template<class SampleType>
UnitBase UnitBase< SampleType >::ceil ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'ceil' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::clip2 ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'clip2' function to this one and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::cos ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'cos' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::cosh ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'cosh' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
template<class ChannelInternalClassType >
static UnitBase UnitBase< SampleType >::createFromInputs ( Inputs const &  inputs,
typename ChannelInternalClassType::Data const &  data,
BlockSize const &  preferredBlockSize,
SampleRate const &  preferredSampleRate 
) throw () [inline, static]

Primary means of creating Unit objects.

Used with most non-proxy-owning ChannelInternal classes.

template<class SampleType>
UnitBase UnitBase< SampleType >::cubed ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'cubed' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::d2r ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'd2r' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::dB2a ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'dB2a' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::dec ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'dec' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::decayFeedback ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'decayFeedback' function to this one and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::difsqr ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'difsqr' function to this one and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::distort ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'distort' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::divop ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'divop' function to this one and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::exp ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'exp' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::explin ( UnitBase< SampleType > const &  inLow,
UnitBase< SampleType > const &  inHigh,
UnitBase< SampleType > const &  outLow,
UnitBase< SampleType > const &  outHigh 
) const throw () [inline]

Exponential to linear mapping.

Note that the intput range must not cross or meet zero.

template<class SampleType>
UnitBase UnitBase< SampleType >::f2m ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'f2m' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::floor ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'floor' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::frac ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'frac' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
static UnitBase UnitBase< SampleType >::fromWeak ( Weak const &  weak) throw () [inline, static]

Get a weakly linked copy of this object.

This will return a blank/empty/null object of this type if the original has already been deleted.

Reimplemented from ObjectArray< ChannelBase< SampleType > >.

template<class SampleType>
BlockSize UnitBase< SampleType >::getBlockSize ( const int  index) const throw () [inline]

Get the block size of a specific channel in this unit.

template<class SampleType>
BlockSizes UnitBase< SampleType >::getBlockSizes ( ) const throw () [inline]

Get an array of block sizes for the channels in the unit.

template<class SampleType>
UnitBase UnitBase< SampleType >::getChannel ( const int  index) const throw () [inline]

Returns a unit with the single channel specified.

This wraps the index so that it is always in range. It is also recursive such that the returned channel has in turn stripped out the other multiple channels during the process.

template<class SampleType>
UnitBase UnitBase< SampleType >::getChannel ( const int  index) throw () [inline]

Returns a unit with the single channel specified.

This wraps the index so that it is always in range. It is also recursive such that the returned channel has in turn stripped out the other multiple channels during the process.

template<class SampleType>
ChannelType UnitBase< SampleType >::getChannelObject ( const int  index) throw () [inline]

Returns a single channel object.

This wraps the index so that it is always in range. It is also recursive such that the returned channel has in turn stripped out the other multiple channels during the process.

template<class SampleType>
ChannelType UnitBase< SampleType >::getChannelObject ( const int  index) const throw () [inline]

Returns a single channel object.

This wraps the index so that it is always in range. It is also recursive such that the returned channel has in turn stripped out the other multiple channels during the process.

template<class SampleType >
BlockSize UnitBase< SampleType >::getMaxBlockSize ( ) const throw ()

Get the maximum block size in the array of channels in this unit.

template<class SampleType >
SampleRate UnitBase< SampleType >::getMaxSampleRate ( ) const throw ()

Get the maximum sample rate in the array of channels in this unit.

template<class SampleType >
BlockSize UnitBase< SampleType >::getMinBlockSize ( ) const throw ()

Get the minimum block size in the array of channels in this unit.

template<class SampleType >
SampleRate UnitBase< SampleType >::getMinSampleRate ( ) const throw ()

Get the minimum sample rate in the array of channels in this unit.

template<class SampleType>
int UnitBase< SampleType >::getNumChannels ( ) const throw () [inline]

Gets the number of channels in this unit.

template<class SampleType>
const Buffer& UnitBase< SampleType >::getOutputBuffer ( const int  index) const throw () [inline]

Get the output buffer of a specific channel.

Indices out of range will be wrapped to the available channels.

template<class SampleType>
const SampleType* UnitBase< SampleType >::getOutputSamples ( const int  index) const throw () [inline]

Get the output buffer of a specific channel.

Indices out of range will be wrapped to the available channels. Get a pointer to the raw samples of a specific channel. Indices out of range will be wrapped to the available channels.

template<class SampleType>
SampleType* UnitBase< SampleType >::getOutputSamples ( const int  index) throw () [inline]

Get a pointer to the raw samples of a specific channel.

Indices out of range will be wrapped to the available channels.

template<class SampleType>
SampleRate UnitBase< SampleType >::getSampleRate ( const int  index) const throw () [inline]

Get the sample rate of a specific channel in this unit.

Indices out of range will be wrapped to the available channels.

template<class SampleType>
SampleRates UnitBase< SampleType >::getSampleRates ( ) const throw () [inline]

Get an array of sample rates for the channels in the unit.

template<class SampleType>
const SampleType& UnitBase< SampleType >::getValue ( const int  index) const throw () [inline]

Get the current value of a specific channel in this unit.

Indices out of range will be wrapped to the available channels.

template<class SampleType>
UnitArray UnitBase< SampleType >::group ( const int  groupSize) const throw () [inline]

Group this array into a 2D array with a particular group size.

Reimplemented from ObjectArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::hypot ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'hypot' function to this one and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::inc ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'inc' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
bool UnitBase< SampleType >::isConstant ( ) const throw () [inline]

Returns true if this unit contains only a single constant channel.

template<class SampleType>
UnitBase UnitBase< SampleType >::isEqualTo ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'isEqualTo' function to this one and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::isGreaterThan ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'isGreaterThan' function to this one and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::isGreaterThanOrEqualTo ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'isGreaterThanOrEqualTo' function to this one and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::isLessThan ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'isLessThan' function to this one and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::isLessThanOrEqualTo ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'isLessThanOrEqualTo' function to this one and the right argument.

template<class SampleType>
bool UnitBase< SampleType >::isNotConstant ( ) const throw () [inline]

Returns false if this unit contains only a single constant channel.

template<class SampleType>
UnitBase UnitBase< SampleType >::isNotEqualTo ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'isNotEqualTo' function to this one and the right argument.

template<class SampleType>
bool UnitBase< SampleType >::isNotNull ( ) const throw () [inline]

Returns false if this unit contains only a single null channel.

Reimplemented from SmartPointerContainerBase< SmartPointerType >.

template<class SampleType>
bool UnitBase< SampleType >::isNull ( ) const throw () [inline]

Returns true if this unit contains only a single null channel.

Reimplemented from SmartPointerContainerBase< SmartPointerType >.

template<class SampleType>
UnitBase UnitBase< SampleType >::kr ( ) const throw () [inline]

Resamples this unit to the default control rate sample rate and block size.

template<class SampleType>
UnitBase UnitBase< SampleType >::kr ( const Interp::TypeCode  interpType) const throw () [inline]

Resamples this unit to the default control rate sample rate and block size.

template<class SampleType>
UnitBase UnitBase< SampleType >::linexp ( UnitBase< SampleType > const &  inLow,
UnitBase< SampleType > const &  inHigh,
UnitBase< SampleType > const &  outLow,
UnitBase< SampleType > const &  outHigh 
) const throw () [inline]

Linear to exponential mapping.

Note that the output range must not cross or meet zero.

template<class SampleType>
UnitBase UnitBase< SampleType >::linexp ( UnitBase< SampleType > const &  outLow,
UnitBase< SampleType > const &  outHigh 
) const throw () [inline]

Linear to exponential mapping assuming the input is in the range -1...+1.

Note that the output range must not cross or meet zero.

template<class SampleType>
UnitBase UnitBase< SampleType >::linlin ( UnitBase< SampleType > const &  outLow,
UnitBase< SampleType > const &  outHigh 
) const throw () [inline]

Linear to linear mapping assuming the input is in the range -1...+1.

template<class SampleType>
UnitBase UnitBase< SampleType >::linlin ( UnitBase< SampleType > const &  inLow,
UnitBase< SampleType > const &  inHigh,
UnitBase< SampleType > const &  outLow,
UnitBase< SampleType > const &  outHigh 
) const throw () [inline]

Linear to linear mapping.

template<class SampleType>
UnitBase UnitBase< SampleType >::linsin ( UnitBase< SampleType > const &  inLow,
UnitBase< SampleType > const &  inHigh,
UnitBase< SampleType > const &  outLow,
UnitBase< SampleType > const &  outHigh 
) const throw () [inline]

Linear to sinusoidal mapping.

template<class SampleType>
UnitBase UnitBase< SampleType >::linsin ( UnitBase< SampleType > const &  outLow,
UnitBase< SampleType > const &  outHigh 
) const throw () [inline]

Linear to sinusoidal mapping assuming the input is in the range -1...+1.

template<class SampleType>
UnitBase UnitBase< SampleType >::linwelch ( UnitBase< SampleType > const &  outLow,
UnitBase< SampleType > const &  outHigh 
) const throw () [inline]

Linear to Welch curve mapping assuming the input is in the range -1...+1.

template<class SampleType>
UnitBase UnitBase< SampleType >::linwelch ( UnitBase< SampleType > const &  inLow,
UnitBase< SampleType > const &  inHigh,
UnitBase< SampleType > const &  outLow,
UnitBase< SampleType > const &  outHigh 
) const throw () [inline]

Linear to Welch curve mapping.

template<class SampleType>
UnitBase UnitBase< SampleType >::log ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'log' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::log10 ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'log10' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::log2 ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'log2' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::m2f ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'm2f' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::max ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'max' function to this one and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::min ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'min' function to this one and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::mix ( ) const throw () [inline]

Mixes this unit down to a single channel.

template<class SampleType>
UnitBase UnitBase< SampleType >::mixBarrier ( ) const throw () [inline]

Mixes this unit down to a single channel with and auto-deletion prevention barrier.

This prevents things like envelopes from releasing the mixer that contains this unit.

template<class SampleType>
UnitBase UnitBase< SampleType >::modop ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'modop' function to this one and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::move ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'move' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::mulop ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'mulop' function to this one and the right argument.

template<class SampleType>
bool UnitBase< SampleType >::needsToProcess ( ProcessInfo const &  info,
const int  channel 
) const throw () [inline]

Returns true if this unit needs to process for the given timestamp.

template<class SampleType>
UnitBase UnitBase< SampleType >::neg ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'neg' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase< SampleType >::operator ChannelType & ( ) throw () [inline]

Cast to a single channel.

template<class SampleType>
UnitBase< SampleType >::operator const ChannelType & ( ) const throw () [inline]

Cast to a single channel.

template<class SampleType>
template<class RightType >
UnitBase UnitBase< SampleType >::operator% ( RightType const &  right) const throw () [inline]

Create a new UnitBase by applying the binary '%' operator to this and the right argument.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::operator% ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary '%' operator to this and the right argument.

template<class SampleType>
template<class RightType >
UnitBase& UnitBase< SampleType >::operator%= ( RightType const &  right) throw () [inline]

Create a new UnitBase and assign it to this one by applying the binary '%' operator to this and the right argument.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
template<class RightType >
UnitBase UnitBase< SampleType >::operator* ( RightType const &  right) const throw () [inline]

Create a new UnitBase by applying the binary '*' operator to this and the right argument.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::operator* ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary '*' operator to this and the right argument.

template<class SampleType>
template<class RightType >
UnitBase& UnitBase< SampleType >::operator*= ( RightType const &  right) throw () [inline]

Create a new UnitBase and assign it to this one by applying the binary '*' operator to this and the right argument.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
template<class RightType >
UnitBase UnitBase< SampleType >::operator+ ( RightType const &  right) const throw () [inline]

Create a new UnitBase by applying the binary '+' operator to this and the right argument.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::operator+ ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary '+' operator to this and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::operator++ ( int  ) const throw () [inline]

Create a new UnitBase by applying the unary '++' operator to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::operator++ ( ) const throw () [inline]

Create a new UnitBase by applying the unary '++' operator to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
template<class RightType >
UnitBase& UnitBase< SampleType >::operator+= ( RightType const &  right) throw () [inline]

Create a new UnitBase and assign it to this one by applying the binary '+' operator to this and the right argument.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType >
UnitBase< SampleType > UnitBase< SampleType >::operator, ( UnitType const &  other) const throw ()

Create a array of units by concatenation.

Create a array of units by concatenation. Concatenate.

template<class SampleType>
template<class RightType >
UnitBase UnitBase< SampleType >::operator- ( RightType const &  right) const throw () [inline]

Create a new UnitBase by applying the binary '-' operator to this and the right argument.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::operator- ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary '-' operator to this and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::operator- ( ) const throw () [inline]

Create a new UnitBase by applying the unary '-' operator to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
template<class RightType >
UnitBase& UnitBase< SampleType >::operator-= ( RightType const &  right) throw () [inline]

Create a new UnitBase and assign it to this one by applying the binary '-' operator to this and the right argument.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
template<class RightType >
UnitBase UnitBase< SampleType >::operator/ ( RightType const &  right) const throw () [inline]

Create a new UnitBase by applying the binary '/' operator to this and the right argument.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::operator/ ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary '/' operator to this and the right argument.

template<class SampleType>
template<class RightType >
UnitBase& UnitBase< SampleType >::operator/= ( RightType const &  right) throw () [inline]

Create a new UnitBase and assign it to this one by applying the binary '/' operator to this and the right argument.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::operator< ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary '<' operator to this and the right argument.

template<class SampleType>
template<class RightType >
UnitBase UnitBase< SampleType >::operator< ( RightType const &  right) const throw () [inline]

Create a new UnitBase by applying the binary '<' operator to this and the right argument.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
template<class RightType >
UnitBase UnitBase< SampleType >::operator<= ( RightType const &  right) const throw () [inline]

Create a new UnitBase by applying the binary '<=' operator to this and the right argument.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::operator<= ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary '<=' operator to this and the right argument.

template<class SampleType>
UnitBase& UnitBase< SampleType >::operator= ( UnitBase< SampleType > const &  other) throw () [inline]

Assignment operator.

template<class SampleType>
UnitBase& UnitBase< SampleType >::operator= ( ChannelType const &  other) throw () [inline]

Assignment operator from a single channel.

template<class SampleType>
UnitBase& UnitBase< SampleType >::operator= ( ObjectArray< ChannelType > const &  other) throw () [inline]

Assignment operator from an array of channels.

template<class SampleType>
UnitBase& UnitBase< SampleType >::operator= ( UnitType const &  other) throw () [inline]

Assignment operator from the base array type.

template<class SampleType>
UnitBase UnitBase< SampleType >::operator> ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary '>' operator to this and the right argument.

template<class SampleType>
template<class RightType >
UnitBase UnitBase< SampleType >::operator> ( RightType const &  right) const throw () [inline]

Create a new UnitBase by applying the binary '>' operator to this and the right argument.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
template<class RightType >
UnitBase UnitBase< SampleType >::operator>= ( RightType const &  right) const throw () [inline]

Create a new UnitBase by applying the binary '>=' operator to this and the right argument.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::operator>= ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary '>=' operator to this and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::operator[] ( const int  index) throw () [inline]

Returns a unit with the single channel specified.

This wraps the index so that it is always in range. It is also recursive such that the returned channel has in turn stripped out the other multiple channels during the process.

Reimplemented from ObjectArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::operator[] ( const int  index) const throw () [inline]

Returns a unit with the single channel specified.

This wraps the index so that it is always in range. It is also recursive such that the returned channel has in turn stripped out the other multiple channels during the process.

Reimplemented from ObjectArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::overlapMake ( DoubleVariable const &  overlap = Math<DoubleVariable>::get0_5(),
const bool  zeroPad = false 
) const throw () [inline]

Create an overlapping process from this unit's contrinuous stream.

template<class SampleType>
UnitBase UnitBase< SampleType >::overlapMix ( DoubleVariable const &  overlap = Math<DoubleVariable>::get0_5()) const throw () [inline]

Mix down overlapping process to a continuous stream.

template<class SampleType>
UnitBase UnitBase< SampleType >::overlapZeroPad ( DoubleVariable const &  overlap = Math<DoubleVariable>::get0_5()) const throw () [inline]

Create an overlapping process from this unit's contrinuous stream, zero-padding the overlapping sections.

template<class SampleType>
UnitBase UnitBase< SampleType >::pow ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'pow' function to this one and the right argument.

template<class SampleType>
const Buffer& UnitBase< SampleType >::process ( ProcessInfo info,
const int  channel 
) throw () [inline]

Process a specific channel in this unit.

The host should prepare a ProcessInfo which is passed to this function for each required block of data. This is generally used by ChannelInternal subclasses when obtaining input data.

Returns:
The buffer from the requested channel. Process a specific channel in this unit. The host should prepare a ProcessInfo which is passed to this function for each required block of data. This is generally used by ChannelInternal subclasses when obtaining input data.
The buffer from the requested channel.
template<class SampleType>
void UnitBase< SampleType >::process ( ProcessInfo info) throw () [inline]

Process all channels in this unit.

The host should prepare a ProcessInfo which is passed to this function for each required block of data. Process all channels in this unit. The host should prepare a ProcessInfo which is passed to this function for each required block of data. Process all channels in this unit. The host should prepare a ProcessInfo which is passed to this function for each required block of data.

template<class SampleType>
template<class ProxyOwnerChannelInternalClassType >
static UnitBase UnitBase< SampleType >::proxiesFromInputs ( Inputs const &  inputs,
typename ProxyOwnerChannelInternalClassType::Data const &  data,
BlockSize const &  preferredBlockSize,
SampleRate const &  preferredSampleRate 
) throw () [inline, static]

Primary means of creating Unit objects with proxies.

Used with most proxy-owning ChannelInternal classes.

template<class SampleType>
UnitBase& UnitBase< SampleType >::put ( const int  index,
UnitBase< SampleType > const &  channel 
) throw () [inline]

Set a particular channel.

Note that the input channel here must contain only one channel.

template<class SampleType>
UnitBase UnitBase< SampleType >::r2d ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'r2d' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::reciprocal ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'reciprocal' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::round ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'round' function to this one and the right argument.

template<class SampleType>
void UnitBase< SampleType >::setBlockSize ( BlockSize const &  newBlockSize) throw () [inline]

Set the block size of all channels in this unit.

template<class SampleType>
UnitBase& UnitBase< SampleType >::setLabel ( Text const &  unitId) throw () [inline]

Enables a custom name to be set.

This conventiently returns this unit so it can be used in nested graph construction functions.

template<class SampleType>
void UnitBase< SampleType >::setOutputBuffer ( const int  index,
Buffer const &  externalBuffer 
) throw () [inline]

Set the output buffer of a specific channel to use an external buffer.

template<class SampleType>
void UnitBase< SampleType >::setOutputBuffer ( BufferArrayType const &  externalBuffer) throw () [inline]

Set the output buffers of this unit's channels to use external buffers.

template<class SampleType>
void UnitBase< SampleType >::setSampleRate ( SampleRate const &  newSampleRate) throw () [inline]

Set the sample rate of all channels in this unit.

template<class SampleType>
bool UnitBase< SampleType >::shouldBeDeletedNow ( ProcessInfo const &  info) const throw () [inline]

Returns true if this unit (i.e., all of its channels) needs to be deleted becasue they have expired.

template<class SampleType>
UnitBase UnitBase< SampleType >::sign ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'sign' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::sin ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'sin' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::sinh ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'sinh' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::sqrdif ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'sqrdif' function to this one and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::sqrsum ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'sqrsum' function to this one and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::sqrt ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'sqrt' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::squared ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'squared' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::subop ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'subop' function to this one and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::sumsqr ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'sumsqr' function to this one and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::tan ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'tan' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::tanh ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'tanh' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::thresh ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'thresh' function to this one and the right argument.

template<class SampleType>
UnitBase UnitBase< SampleType >::trunc ( UnitBase< SampleType > const &  right) const throw () [inline]

Create a new UnitBase by applying the binary 'trunc' function to this one and the right argument.

template<class SampleType>
template<SampleType(*)(SampleTypeconst &) op>
UnitBase UnitBase< SampleType >::unary ( ) const throw () [inline]

Templated unary operator Unit creator.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.

template<class SampleType>
UnitBase UnitBase< SampleType >::zap ( ) const throw () [inline]

Create a new UnitBase by applying the unary 'zap' function to this one.

Reimplemented from NumericalArray< ChannelBase< SampleType > >.


The documentation for this class was generated from the following file:
 All Classes Functions Typedefs Enumerations Enumerator Properties