iso::synth::PulseToValueUnit Class Reference

PulseToValueUnit pulse to value unit class. More...

#include <iso_synth_pulse_to_value_unit.h>

Inherits iso::synth::ProcessUnit.

Inheritance diagram for iso::synth::PulseToValueUnit:

Inheritance graph
[legend]
Collaboration diagram for iso::synth::PulseToValueUnit:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PulseToValueUnit ()
 default constructor
 PulseToValueUnit (const String &pName)
 parameter based contructor
 PulseToValueUnit (unsigned int pChannelCount)
 parameter based contructor
 PulseToValueUnit (const String &pName, unsigned int pChannelCount)
 parameter based contructor
 PulseToValueUnit (unsigned int pFrameCount, unsigned int pChannelCount, unsigned int pRate) throw (SynthException)
 parameter based contructor
 PulseToValueUnit (const String &pName, unsigned int pFrameCount, unsigned int pChannelCount, unsigned int pRate) throw (SynthException)
 name and parameter based contructor
 PulseToValueUnit (const PulseToValueUnit &pUnit)
 copy constructor
 PulseToValueUnit (const String &pName, const PulseToValueUnit &pUnit)
 name & copy constructor
 PulseToValueUnit (const data::Values &pValues) throw (SynthException)
 values based constructor
 ~PulseToValueUnit ()
 destructor
virtual void process (Buffer *pBuffer) throw (SynthException)
 processes buffer
virtual String info (bool pPropagate=false, bool pShowPorts=true) const
 obtain textual unit information

Static Public Attributes

static const String sClassName
 default name

Protected Member Functions

void init ()
 initializes wavetable and control ports

Protected Attributes

ControlPortmValue
 value control port
ControlPortmHoldDuration
 value hold duration control port
ControlPortmFadeDuration
 value fade duration control port
ControlPortmScale
 value scale control port
Frame mTargetValue
 target value
Frame mFadeValueChange
 fade value change
Frame mFadeValue
 fade value
Frame mPulseAge
 time (in milisecs) since last pulse
sample frameDuration
 frame duration in milisecs

Static Protected Attributes

static unsigned int sUnitCount
 total number of units created so far

Friends

std::ostream & operator<< (std::ostream &pOstream, const PulseToValueUnit &pUnit)
 print unit information

Detailed Description

PulseToValueUnit pulse to value unit class.

value unit class

This unit transforms single sample pulses created by a pulse unit into continuous values.
These values may then be used to adjust control ports of other units.
The combination of pulse unit and pulse to value unit serves as a sample accurate complement of the normal event system.
The pulse to value unit can be configured in differed ways. Values can either be fixed or propertional to the pulse heigt, depending on the setting of the scale control port.
A scale value of < 0.0 means, values created by the pulse to value unit are fixed and independent of the pulse amplitudes received.
Scale values >= 0.0 cause the pulse values to scale in correspondence with the pulse amplitudes.
Values created by the pulse to value unit can linearly fade from previous values.
The duration of these fades is controlled by the fadeDuration control port.
In addition, values my be hold for a certain duration.
The holdDuration control port controls for how long values are hold.
A holdDuration value of -1.0 cases a value to be hold up to the next pulse.


ControlPorts
name: value defaultValue: 1.0
name: holdDuration defaultValue: 0.0
name: fadeDuration defaultValue: 0.0
name: scale defaultValue: -1.0

SwitchPorts:
name: active channelCount: 1 defaultValue: 1.0 resizable: false function: setActive


Created by Daniel Bisig on 6/8/07.


Constructor & Destructor Documentation

PulseToValueUnit::PulseToValueUnit (  ) 

default constructor

PulseToValueUnit::PulseToValueUnit ( const String pName  ) 

parameter based contructor

Parameters:
pName unit name

PulseToValueUnit::PulseToValueUnit ( unsigned int  pChannelCount  ) 

parameter based contructor

Parameters:
pChannelCount number of channels

PulseToValueUnit::PulseToValueUnit ( const String pName,
unsigned int  pChannelCount 
)

parameter based contructor

Parameters:
pName unit name
pChannelCount number of channels

PulseToValueUnit::PulseToValueUnit ( unsigned int  pFrameCount,
unsigned int  pChannelCount,
unsigned int  pRate 
) throw (SynthException)

parameter based contructor

Parameters:
pFrameCount number of frames
pChannelCount number of channels
pRate samping rate

PulseToValueUnit::PulseToValueUnit ( const String pName,
unsigned int  pFrameCount,
unsigned int  pChannelCount,
unsigned int  pRate 
) throw (SynthException)

name and parameter based contructor

Parameters:
pName unit name
pFrameCount number of frames
pChannelCount number of channels
pRate samping rate

PulseToValueUnit::PulseToValueUnit ( const PulseToValueUnit pUnit  ) 

copy constructor

Parameters:
pUnit unit to copy properties from
constructor copies frameCount, channelCount and rate but not unit name

PulseToValueUnit::PulseToValueUnit ( const String pName,
const PulseToValueUnit pUnit 
)

name & copy constructor

Parameters:
pName unit name
pUnit unit to copy properties from
constructor copies frameCount, channelCount and rate but not unit name

PulseToValueUnit::PulseToValueUnit ( const data::Values &  pValues  )  throw (SynthException)

values based constructor

Parameters:
pValues unit values
Exceptions:
SynthException failed to create unit
pValues structure & data types: 0: const String& : unit name 1: unsigned int : number of frames 2: unsigned int : number of channels 3: unsigned int : samping rate

PulseToValueUnit::~PulseToValueUnit (  ) 

destructor


Member Function Documentation

void PulseToValueUnit::process ( Buffer pBuffer  )  throw (SynthException) [virtual]

processes buffer

Parameters:
pBuffer buffer to process

Reimplemented from iso::synth::ProcessUnit.

String PulseToValueUnit::info ( bool  pPropagate = false,
bool  pShowPorts = true 
) const [virtual]

obtain textual unit information

Parameters:
pPropagate if true, the unit calls the info methods of its input ports
pShowPorts print port information
Returns:
String containing unit information

Reimplemented from iso::synth::ProcessUnit.

void PulseToValueUnit::init (  )  [protected]

initializes wavetable and control ports


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  pOstream,
const PulseToValueUnit pUnit 
) [friend]

print unit information


Member Data Documentation

const String PulseToValueUnit::sClassName [static]

default name

Reimplemented from iso::synth::ProcessUnit.

unsigned int PulseToValueUnit::sUnitCount [static, protected]

total number of units created so far

Reimplemented from iso::synth::ProcessUnit.

ControlPort* iso::synth::PulseToValueUnit::mValue [protected]

value control port

ControlPort* iso::synth::PulseToValueUnit::mHoldDuration [protected]

value hold duration control port

ControlPort* iso::synth::PulseToValueUnit::mFadeDuration [protected]

value fade duration control port

ControlPort* iso::synth::PulseToValueUnit::mScale [protected]

value scale control port

Frame iso::synth::PulseToValueUnit::mTargetValue [protected]

target value

Frame iso::synth::PulseToValueUnit::mFadeValueChange [protected]

fade value change

Frame iso::synth::PulseToValueUnit::mFadeValue [protected]

fade value

Frame iso::synth::PulseToValueUnit::mPulseAge [protected]

time (in milisecs) since last pulse

sample iso::synth::PulseToValueUnit::frameDuration [protected]

frame duration in milisecs


The documentation for this class was generated from the following files:
Generated on Fri Feb 25 14:18:46 2011 for synth by  doxygen 1.5.1