iso::synth::PointEnvelope Class Reference

point envelope class More...

#include <iso_synth_point_envelope.h>

Inherits iso::synth::ProcessUnit.

Inheritance diagram for iso::synth::PointEnvelope:

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

Collaboration graph
[legend]
List of all members.

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 PointListpointList () 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

ControlPortmTrigger
 envelope trigger port
ControlPortmDuration
 duration control port
sample mPreviousDuration
 previous envelope duration
ControlPortmAmplitude
 amplitude control port
ControlPortmOffset
 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
PointListmPointList
 point list
PointListmNewPointList
 new point list
InterpolationType mInterpolationType
 interpolation type
PointListInterpolStrategymPointListInterpolStrategy
 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

Detailed Description

point envelope class

class

Created by Daniel Bisig on 8/5/06. Copyright 2006 Daniel Bisig All rights reserved.


Constructor & Destructor Documentation

PointEnvelope::PointEnvelope ( PointList pPointList,
InterpolationType  pInterpolationType = TRUNCATEINTERPOL,
sample  pControlParameter = 0.5 
)

parameter based contructor

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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

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

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

name & copy constructor

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

PointEnvelope::PointEnvelope ( 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 4: PointList : point list 5: InterpolationType : wavetable interpolation type 6: sample : cardinal spline related tension parameter

PointEnvelope::~PointEnvelope (  ) 

destructor

PointEnvelope::PointEnvelope (  )  [protected]

default constructor


Member Function Documentation

const PointList * PointEnvelope::pointList (  )  const

returns wave table

Returns:
wave table

void PointEnvelope::play ( bool  pPlay  ) 

trigger envelope playback or stop

Parameters:
pPlay ( true : play, false : stop )

void PointEnvelope::setLooping ( bool  pLooping  ) 

turn envelope looping on or off

Parameters:
pLooping ( true: envelope looping on, false: envelope looping off )

void PointEnvelope::setBlocking ( bool  pBlocking  ) 

turn envelope blocking on or off

Parameters:
pBlocking ( true: envelope blocking on, false: envelope blocking off )

void PointEnvelope::setEnvelope ( Frame  pEnvelope  ) 

create new envelope

Parameters:
pEnvelope frame containing envelope data
the supplied frame defines the new envelope type by interpreting every pair of successing channels in the frame as a new point

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

processes buffer

Parameters:
pBuffer buffer to process
two step processing procedure:
1. calls process function of all it's input ports
2. as soon as these other processing functions return, it changes the buffer according to it's function

Reimplemented from iso::synth::ProcessUnit.

base::String PointEnvelope::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 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


Friends And Related Function Documentation

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

print unit information


Member Data Documentation

const base::String PointEnvelope::sClassName [static]

default name

Reimplemented from iso::synth::ProcessUnit.

unsigned int PointEnvelope::sUnitCount [static, protected]

total number of units created so far

Reimplemented from iso::synth::ProcessUnit.

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

InterpolationType iso::synth::PointEnvelope::mInterpolationType [protected]

interpolation type

PointListInterpolStrategy* iso::synth::PointEnvelope::mPointListInterpolStrategy [protected]

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)


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