iso::synth::ATEUnit Class Reference

ATEUnit samples an audio stream at regular intervals and sends the sampled values as events
Since there is a brief time lapse between the start of the event target unit and the sending of events by ATEUnit,
it is adviced to set the EventTarget to a default value close to the estimated first event sent by ATEUnit, otherwise initial jumps will occur.
. More...

#include <iso_synth_ate_unit.h>

Inherits iso::synth::OutputUnit.

Inherited by iso::synth::ATEAverageUnit, iso::synth::ATEConditionalUnit, iso::synth::ATEMaxAmpUnit, iso::synth::ATEMaxUnit, iso::synth::ATEMinAmpUnit, and iso::synth::ATEMinUnit.

Inheritance diagram for iso::synth::ATEUnit:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ATEUnit ()
 constructor
 ATEUnit (const String &pName)
 name constructor
 ATEUnit (unsigned int pChannelCount)
 parameter based contructor
 ATEUnit (const String &pName, unsigned int pChannelCount)
 parameter based contructor
 ATEUnit (unsigned int pFrameCount, unsigned int pChannelCount, unsigned int pRate) throw (SynthException)
 parameter based contructor
 ATEUnit (const String &pName, unsigned int pFrameCount, unsigned int pChannelCount, unsigned int pRate) throw (SynthException)
 name and parameter based contructor
 ATEUnit (const Unit &pUnit)
 copy constructor
 ATEUnit (const String &pName, const Unit &pUnit)
 name & copy constructor
virtual ~ATEUnit ()
 destructor
void registerEvent (const event::Event &pEvent)
 register event
void setInterval (Frame pInterval)
 set sampling interval in ms
void setInterpolationTime (Frame pInterpolationTime)
 set interpolation time
virtual void process (Buffer *pBuffer=NULL) 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 unit
virtual void triggerEvents ()
 trigger events
virtual void processEvents ()
 process alrealdy running events

Protected Attributes

unsigned int * mInterval
 sampling intervals (1 per channel)
unsigned int * mICount
 interval counters (per channel)
Frame mInterpolationTime
 event interpolation time in ms (handled by the event target itself)
Frame mEventValFrame
 prototype of a frame to be sent, that holds only NAN values. This frame doesn't have to be cloned, the event manager will clone it later.
data::TypedValue< FramemEventValue
QVector< event::Event * > mEventRegistry

Static Protected Attributes

static unsigned int sUnitCount
 total number of units created so far

Detailed Description

ATEUnit samples an audio stream at regular intervals and sends the sampled values as events
Since there is a brief time lapse between the start of the event target unit and the sending of events by ATEUnit,
it is adviced to set the EventTarget to a default value close to the estimated first event sent by ATEUnit, otherwise initial jumps will occur.
.

audio stream at regular intervals and sends the sampled values as events

switch ports:
interval : sampling interval (max interval = 26 hours) interpolation: interpolation time in ms per channel (used when creating the Event)

Created by John Flury on 03/12/08. Copyright 2006 I.S.O. All rights reserved.


Constructor & Destructor Documentation

ATEUnit::ATEUnit (  ) 

constructor

ATEUnit::ATEUnit ( const String pName  ) 

name constructor

Parameters:
pName unit name

ATEUnit::ATEUnit ( unsigned int  pChannelCount  ) 

parameter based contructor

Parameters:
pChannelCount number of channels

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

parameter based contructor

Parameters:
pName unit name
pChannelCount number of channels

ATEUnit::ATEUnit ( 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

ATEUnit::ATEUnit ( 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

ATEUnit::ATEUnit ( const Unit pUnit  ) 

copy constructor

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

ATEUnit::ATEUnit ( const String pName,
const Unit pUnit 
)

name & copy constructor

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

ATEUnit::~ATEUnit (  )  [virtual]

destructor


Member Function Documentation

void ATEUnit::registerEvent ( const event::Event &  pEvent  ) 

register event

Parameters:
pEvent event

void ATEUnit::setInterval ( Frame  pInterval  ) 

set sampling interval in ms

Parameters:
pInterval ( sampling internal in ms )

void ATEUnit::setInterpolationTime ( Frame  pInterpolationTime  ) 

set interpolation time

Parameters:
pInterpolationTime ( interpolation time in ms )

void ATEUnit::process ( Buffer pBuffer = NULL  )  throw (SynthException) [virtual]

processes buffer

Parameters:
pBuffer buffer to process

Reimplemented from iso::synth::OutputUnit.

Reimplemented in iso::synth::ATEAverageUnit, iso::synth::ATEConditionalUnit, iso::synth::ATEMaxAmpUnit, iso::synth::ATEMaxUnit, iso::synth::ATEMinAmpUnit, and iso::synth::ATEMinUnit.

base::String ATEUnit::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::OutputUnit.

Reimplemented in iso::synth::ATEAverageUnit, iso::synth::ATEConditionalUnit, iso::synth::ATEMaxAmpUnit, iso::synth::ATEMaxUnit, iso::synth::ATEMinAmpUnit, and iso::synth::ATEMinUnit.

void ATEUnit::init (  )  [protected]

initializes unit

Reimplemented in iso::synth::ATEAverageUnit, iso::synth::ATEConditionalUnit, iso::synth::ATEMaxAmpUnit, iso::synth::ATEMaxUnit, iso::synth::ATEMinAmpUnit, and iso::synth::ATEMinUnit.

void ATEUnit::triggerEvents (  )  [protected, virtual]

trigger events

void ATEUnit::processEvents (  )  [protected, virtual]

process alrealdy running events


Member Data Documentation

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

default name

Reimplemented from iso::synth::OutputUnit.

Reimplemented in iso::synth::ATEAverageUnit, iso::synth::ATEConditionalUnit, iso::synth::ATEMaxAmpUnit, iso::synth::ATEMaxUnit, iso::synth::ATEMinAmpUnit, and iso::synth::ATEMinUnit.

unsigned int ATEUnit::sUnitCount [static, protected]

total number of units created so far

Reimplemented from iso::synth::OutputUnit.

Reimplemented in iso::synth::ATEAverageUnit, iso::synth::ATEConditionalUnit, iso::synth::ATEMaxAmpUnit, iso::synth::ATEMaxUnit, iso::synth::ATEMinAmpUnit, and iso::synth::ATEMinUnit.

unsigned int* iso::synth::ATEUnit::mInterval [protected]

sampling intervals (1 per channel)

unsigned int* iso::synth::ATEUnit::mICount [protected]

interval counters (per channel)

Frame iso::synth::ATEUnit::mInterpolationTime [protected]

event interpolation time in ms (handled by the event target itself)

Frame iso::synth::ATEUnit::mEventValFrame [protected]

prototype of a frame to be sent, that holds only NAN values. This frame doesn't have to be cloned, the event manager will clone it later.

data::TypedValue<Frame> iso::synth::ATEUnit::mEventValue [protected]

QVector< event::Event* > iso::synth::ATEUnit::mEventRegistry [protected]


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