#include <iso_synth_point_envelope.h>
Inherits iso::synth::ProcessUnit.
Inheritance diagram for iso::synth::PointEnvelope:
Public Member Functions | |
PointEnvelope (PointList *pPointList, InterpolationType pInterpolationType=TRUNCATEINTERPOL, sample pControlParameter=0.5) | |
parameter based contructor | |
PointEnvelope (const String &pName, PointList *pPointList, InterpolationType pInterpolationType=TRUNCATEINTERPOL, sample pControlParameter=0.5) | |
parameter based contructor | |
PointEnvelope (unsigned int pChannelCount, PointList *pPointList, InterpolationType pInterpolationType=TRUNCATEINTERPOL, sample pControlParameter=0.5) | |
parameter based contructor | |
PointEnvelope (const String &pName, unsigned int pChannelCount, PointList *pPointList, InterpolationType pInterpolationType=TRUNCATEINTERPOL, sample pControlParameter=0.5) | |
parameter based contructor | |
PointEnvelope (unsigned int pFrameCount, unsigned int pChannelCount, unsigned int pRate, PointList *pPointList, InterpolationType pInterpolationType=TRUNCATEINTERPOL, sample pControlParameter=0.5) throw (SynthException) | |
parameter based contructor | |
PointEnvelope (const String &pName, unsigned int pFrameCount, unsigned int pChannelCount, unsigned int pRate, PointList *pPointList, InterpolationType pInterpolationType=TRUNCATEINTERPOL, sample pControlParameter=0.5) throw (SynthException) | |
name and parameter based contructor | |
PointEnvelope (const PointEnvelope &pUnit) | |
copy constructor | |
PointEnvelope (const String &pName, const PointEnvelope &pUnit) | |
name & copy constructor | |
PointEnvelope (const data::Values &pValues) throw (SynthException) | |
values based constructor | |
~PointEnvelope () | |
destructor | |
const PointList * | pointList () const |
returns wave table | |
void | play (bool pPlay) |
trigger envelope playback or stop | |
void | setLooping (bool pLooping) |
turn envelope looping on or off | |
void | setBlocking (bool pBlocking) |
turn envelope blocking on or off | |
void | setEnvelope (Frame pEnvelope) |
create new envelope | |
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 | |
PointEnvelope () | |
default constructor | |
void | init () |
initializes wavetable and control ports | |
void | processE (Buffer *pBuffer) throw (SynthException) |
event based envelope control | |
void | processS (Buffer *pBuffer) throw (SynthException) |
control stream envelope control | |
Protected Attributes | |
ControlPort * | mTrigger |
envelope trigger port | |
ControlPort * | mDuration |
duration control port | |
sample | mPreviousDuration |
previous envelope duration | |
ControlPort * | mAmplitude |
amplitude control port | |
ControlPort * | mOffset |
offset control port | |
bool | mPlaying |
flag whether envelope is currently playing | |
bool | mLooping |
flag whether envelope automatically loops | |
bool | mBlocking |
flag whether envelope can be triggered again before it stopped playing | |
PointList * | mPointList |
point list | |
PointList * | mNewPointList |
new point list | |
InterpolationType | mInterpolationType |
interpolation type | |
PointListInterpolStrategy * | mPointListInterpolStrategy |
pointList interpolation strategy | |
sample | mPrevTriggerValue |
previous trigger value | |
double | mEnvPlayPos |
envelope play pos (in milisecs) | |
double | mSampleDuration |
sample 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 PointEnvelope &pUnit) |
print unit information |
class
Created by Daniel Bisig on 8/5/06. Copyright 2006 Daniel Bisig All rights reserved.
PointEnvelope::PointEnvelope | ( | PointList * | pPointList, | |
InterpolationType | pInterpolationType = TRUNCATEINTERPOL , |
|||
sample | pControlParameter = 0.5 | |||
) |
parameter based contructor
pPointList | point list | |
pInterpolationType | wavetable interpolation type | |
pControlParameter | cardinal spline related tension parameter |
PointEnvelope::PointEnvelope | ( | const String & | pName, | |
PointList * | pPointList, | |||
InterpolationType | pInterpolationType = TRUNCATEINTERPOL , |
|||
sample | pControlParameter = 0.5 | |||
) |
parameter based contructor
pName | unit name | |
pPointList | point list | |
pInterpolationType | wavetable interpolation type | |
pControlParameter | cardinal spline related tension parameter |
PointEnvelope::PointEnvelope | ( | unsigned int | pChannelCount, | |
PointList * | pPointList, | |||
InterpolationType | pInterpolationType = TRUNCATEINTERPOL , |
|||
sample | pControlParameter = 0.5 | |||
) |
parameter based contructor
pChannelCount | number of channels | |
pPointList | point list | |
pInterpolationType | wavetable interpolation type | |
pControlParameter | cardinal spline related tension parameter |
PointEnvelope::PointEnvelope | ( | const String & | pName, | |
unsigned int | pChannelCount, | |||
PointList * | pPointList, | |||
InterpolationType | pInterpolationType = TRUNCATEINTERPOL , |
|||
sample | pControlParameter = 0.5 | |||
) |
parameter based contructor
pName | unit name | |
pChannelCount | number of channels | |
pPointList | point list | |
pInterpolationType | wavetable interpolation type | |
pControlParameter | cardinal spline related tension parameter |
PointEnvelope::PointEnvelope | ( | unsigned int | pFrameCount, | |
unsigned int | pChannelCount, | |||
unsigned int | pRate, | |||
PointList * | pPointList, | |||
InterpolationType | pInterpolationType = TRUNCATEINTERPOL , |
|||
sample | pControlParameter = 0.5 | |||
) | throw (SynthException) |
parameter based contructor
pFrameCount | number of frames | |
pChannelCount | number of channels | |
pRate | samping rate | |
pPointList | point list | |
pInterpolationType | wavetable interpolation type | |
pControlParameter | cardinal spline related tension parameter |
PointEnvelope::PointEnvelope | ( | const String & | pName, | |
unsigned int | pFrameCount, | |||
unsigned int | pChannelCount, | |||
unsigned int | pRate, | |||
PointList * | pPointList, | |||
InterpolationType | pInterpolationType = TRUNCATEINTERPOL , |
|||
sample | pControlParameter = 0.5 | |||
) | throw (SynthException) |
name and parameter based contructor
pName | unit name | |
pFrameCount | number of frames | |
pChannelCount | number of channels | |
pRate | samping rate | |
pPointList | point list | |
pInterpolationType | wavetable interpolation type | |
pControlParameter | cardinal spline related tension parameter |
PointEnvelope::PointEnvelope | ( | const PointEnvelope & | pUnit | ) |
copy constructor
pUnit | unit to copy properties from |
PointEnvelope::PointEnvelope | ( | const String & | pName, | |
const PointEnvelope & | pUnit | |||
) |
name & copy constructor
pName | unit name | |
pUnit | unit to copy properties from |
PointEnvelope::PointEnvelope | ( | const data::Values & | pValues | ) | throw (SynthException) |
values based constructor
pValues | unit values |
SynthException | failed to create unit |
PointEnvelope::~PointEnvelope | ( | ) |
destructor
PointEnvelope::PointEnvelope | ( | ) | [protected] |
default constructor
const PointList * PointEnvelope::pointList | ( | ) | const |
returns wave table
void PointEnvelope::play | ( | bool | pPlay | ) |
trigger envelope playback or stop
pPlay | ( true : play, false : stop ) |
void PointEnvelope::setLooping | ( | bool | pLooping | ) |
turn envelope looping on or off
pLooping | ( true: envelope looping on, false: envelope looping off ) |
void PointEnvelope::setBlocking | ( | bool | pBlocking | ) |
turn envelope blocking on or off
pBlocking | ( true: envelope blocking on, false: envelope blocking off ) |
void PointEnvelope::setEnvelope | ( | Frame | pEnvelope | ) |
create new envelope
pEnvelope | frame containing envelope data |
void PointEnvelope::process | ( | Buffer * | pBuffer | ) | throw (SynthException) [virtual] |
processes buffer
pBuffer | buffer to process |
Reimplemented from iso::synth::ProcessUnit.
base::String PointEnvelope::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 PointEnvelope::init | ( | ) | [protected] |
initializes wavetable and control ports
void PointEnvelope::processE | ( | Buffer * | pBuffer | ) | throw (SynthException) [protected] |
event based envelope control
void PointEnvelope::processS | ( | Buffer * | pBuffer | ) | throw (SynthException) [protected] |
control stream envelope control
std::ostream& operator<< | ( | std::ostream & | pOstream, | |
const PointEnvelope & | pUnit | |||
) | [friend] |
print unit information
const base::String PointEnvelope::sClassName [static] |
unsigned int PointEnvelope::sUnitCount [static, protected] |
ControlPort* iso::synth::PointEnvelope::mTrigger [protected] |
envelope trigger port
ControlPort* iso::synth::PointEnvelope::mDuration [protected] |
duration control port
sample iso::synth::PointEnvelope::mPreviousDuration [protected] |
previous envelope duration
ControlPort* iso::synth::PointEnvelope::mAmplitude [protected] |
amplitude control port
ControlPort* iso::synth::PointEnvelope::mOffset [protected] |
offset control port
bool iso::synth::PointEnvelope::mPlaying [protected] |
flag whether envelope is currently playing
bool iso::synth::PointEnvelope::mLooping [protected] |
flag whether envelope automatically loops
bool iso::synth::PointEnvelope::mBlocking [protected] |
flag whether envelope can be triggered again before it stopped playing
PointList* iso::synth::PointEnvelope::mPointList [protected] |
point list
PointList* iso::synth::PointEnvelope::mNewPointList [protected] |
new point list
new point list data is temporarily stored here, before the pointers are swapped at the beginning of the process call
interpolation type
pointList interpolation strategy
sample iso::synth::PointEnvelope::mPrevTriggerValue [protected] |
previous trigger value
helper for detecting when an envelope trigger just started
double iso::synth::PointEnvelope::mEnvPlayPos [protected] |
envelope play pos (in milisecs)
double iso::synth::PointEnvelope::mSampleDuration [protected] |
sample duration (in milisecs)