#include <iso_synth_pulse_to_value_unit.h>
Inherits iso::synth::ProcessUnit.
Inheritance diagram for iso::synth::PulseToValueUnit:
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 | |
ControlPort * | mValue |
value control port | |
ControlPort * | mHoldDuration |
value hold duration control port | |
ControlPort * | mFadeDuration |
value fade duration control port | |
ControlPort * | mScale |
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 |
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.
PulseToValueUnit::PulseToValueUnit | ( | ) |
default constructor
PulseToValueUnit::PulseToValueUnit | ( | const String & | pName | ) |
parameter based contructor
pName | unit name |
PulseToValueUnit::PulseToValueUnit | ( | unsigned int | pChannelCount | ) |
parameter based contructor
pChannelCount | number of channels |
PulseToValueUnit::PulseToValueUnit | ( | const String & | pName, | |
unsigned int | pChannelCount | |||
) |
parameter based contructor
pName | unit name | |
pChannelCount | number of channels |
PulseToValueUnit::PulseToValueUnit | ( | unsigned int | pFrameCount, | |
unsigned int | pChannelCount, | |||
unsigned int | pRate | |||
) | throw (SynthException) |
parameter based contructor
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
pName | unit name | |
pFrameCount | number of frames | |
pChannelCount | number of channels | |
pRate | samping rate |
PulseToValueUnit::PulseToValueUnit | ( | const PulseToValueUnit & | pUnit | ) |
copy constructor
pUnit | unit to copy properties from |
PulseToValueUnit::PulseToValueUnit | ( | const String & | pName, | |
const PulseToValueUnit & | pUnit | |||
) |
name & copy constructor
pName | unit name | |
pUnit | unit to copy properties from |
PulseToValueUnit::PulseToValueUnit | ( | const data::Values & | pValues | ) | throw (SynthException) |
values based constructor
pValues | unit values |
SynthException | failed to create unit |
PulseToValueUnit::~PulseToValueUnit | ( | ) |
destructor
void PulseToValueUnit::process | ( | Buffer * | pBuffer | ) | throw (SynthException) [virtual] |
String PulseToValueUnit::info | ( | bool | pPropagate = false , |
|
bool | pShowPorts = true | |||
) | const [virtual] |
obtain textual unit information
pPropagate | if true, the unit calls the info methods of its input ports | |
pShowPorts | print port information |
Reimplemented from iso::synth::ProcessUnit.
void PulseToValueUnit::init | ( | ) | [protected] |
initializes wavetable and control ports
std::ostream& operator<< | ( | std::ostream & | pOstream, | |
const PulseToValueUnit & | pUnit | |||
) | [friend] |
print unit information
const String PulseToValueUnit::sClassName [static] |
unsigned int PulseToValueUnit::sUnitCount [static, protected] |
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