iso::synth::Patch Class Reference

#include <iso_synth_patch.h>

Inherits iso::synth::PortOwner.

Inherited by iso::synth::AdditiveSynthesisPatch, iso::synth::BandPassFilterPatch, iso::synth::DelayBandPassPatch, iso::synth::DelayLinesPatch, iso::synth::ModulationPatch, iso::synth::ModulationPatch, iso::synth::SamplePatch, iso::synth::StringsPatch, RhythmPatchCross, and RhythmPatchNeighbor.

Inheritance diagram for iso::synth::Patch:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Patch () throw (SynthException)
 create patch
Exceptions:
SynthException failed to create patch

 Patch (const base::String &pPatchName) throw (SynthException)
 create patch
Exceptions:
SynthException failed to create patch

virtual ~Patch ()
 destructor
void setActive (const data::Values &pValues)
 activate or deactivate patch
Unitunit (const base::String &pUnitName) throw (SynthException)
 return unit
SwitchPortsswitchPorts ()
 return switch ports
bool checkSwitchPort (const String &pPortName)
 check existence of switch port
SwitchPortswitchPort (const String &pPortName) throw (SynthException)
 return switch port
void set (const String &pPortName, const data::Values &pValues, sample pDuration=-1) throw (SynthException)
 set port to fixed values
void notify (const com::Message &pMessage)
 message notification

Protected Member Functions

void setName (const base::String &pName)
 set patch name
template<class FunctionDataType>
SwitchPortcreateSwitchPort (const String &pName, const data::Values &pValues, void(PortOwner::*pSetFunction)(FunctionDataType))
 create a switch port
template<class FunctionDataType>
SwitchPortcreateSwitchPort (const serialize::SerializeData &pSerializeData, void(PortOwner::*pSetFunction)(FunctionDataType)) throw (serialize::SerializeException)
 create a switch port
template<class FunctionDataType>
SwitchPortcreateSwitchPort (const String &pName, const serialize::SerializeData &pSerializeData, void(PortOwner::*pSetFunction)(FunctionDataType)) throw (serialize::SerializeException)
 create a switch port
template<class DataType, class FunctionType>
SwitchPortcreateFadingSwitchPort (const String &pName, FunctionType pFunctionPointer)
template<class DataType1, class DataType2, class FunctionType>
SwitchPortcreateFadingSwitchPort (const String &pName, FunctionType pFunctionPointer)
template<class DataType, class FunctionType>
SwitchPortcreateDataSwitchPort (const String &pName, FunctionType pFunctionPointer)
template<class DataType1, class DataType2, class FunctionType>
SwitchPortcreateDataSwitchPort (const String &pName, FunctionType pFunctionPointer)
virtual void construct ()=0 throw (SynthException)
 function to create patch
Exceptions:
SynthException failed to create patch


Protected Attributes

QVector< Unit * > mUnits
SwitchPorts mSwitches
 all patch units
long mPreviousMessageId
 switch ports
bool mActive
 previous message id

Constructor & Destructor Documentation

Patch::Patch (  )  throw (SynthException)

create patch

Exceptions:
SynthException failed to create patch

Patch::Patch ( const base::String &  pPatchName  )  throw (SynthException)

create patch

Exceptions:
SynthException failed to create patch

Patch::~Patch (  )  [virtual]

destructor


Member Function Documentation

void Patch::setActive ( const data::Values &  pValues  ) 

activate or deactivate patch

Parameters:
pValues element 0 true : activate , element 0 false : deactivate
turns activates or deactivates all units in patch

Unit * Patch::unit ( const base::String &  pUnitName  )  throw (SynthException)

return unit

Parameters:
pUnitName unit name
Returns:
Unit
Exceptions:
SynthException unit not found

SwitchPorts & Patch::switchPorts (  ) 

return switch ports

Returns:
switch ports

bool Patch::checkSwitchPort ( const String pPortName  ) 

check existence of switch port

Parameters:
pPortName name of switch port
Returns:
true switch port exists, false otherwise

SwitchPort * Patch::switchPort ( const String pPortName  )  throw (SynthException)

return switch port

Parameters:
pPortName name of switch port
Returns:
SwitchPort
Exceptions:
SynthException no switch port with supplied name exists

void Patch::set ( const String pPortName,
const data::Values &  pValues,
sample  pDuration = -1 
) throw (SynthException)

set port to fixed values

Parameters:
pPortName port name
pValues fixed port values
pDuration duration (in milisecs) till the control port should reach fixed value
Exceptions:
SynthException failed to set port

void Patch::notify ( const com::Message &  pMessage  ) 

message notification

Parameters:
pMessage message

Reimplemented in RhythmPatchCross, RhythmPatchNeighbor, iso::synth::AdditiveSynthesisPatch, iso::synth::ModulationPatch, and iso::synth::StringsPatch.

void Patch::setName ( const base::String &  pName  )  [protected]

set patch name

Parameters:
pName patch name

template<class FunctionDataType>
SwitchPort * iso::synth::Patch::createSwitchPort ( const String pName,
const data::Values &  pValues,
void(PortOwner::*)(FunctionDataType)  pSetFunction 
) [protected]

create a switch port

Parameters:
pName name of switch port
pValues switch port values
pSetFunction set function called by switch port
Returns:
pointer to switch port
warning: this function does not check whether a switch port of the same name already exists

template<class FunctionDataType>
SwitchPort * iso::synth::Patch::createSwitchPort ( const serialize::SerializeData &  pSerializeData,
void(PortOwner::*)(FunctionDataType)  pSetFunction 
) throw (serialize::SerializeException) [protected]

create a switch port

Parameters:
pSerializeData switch port serialization data
pSetFunction set function called by switch port
Returns:
pointer to switch port
Exceptions:
SerializeException failed to create switch port
warning: this function does not check whether a switch port of the same name already exists

template<class FunctionDataType>
SwitchPort * iso::synth::Patch::createSwitchPort ( const String pName,
const serialize::SerializeData &  pSerializeData,
void(PortOwner::*)(FunctionDataType)  pSetFunction 
) throw (serialize::SerializeException) [protected]

create a switch port

Parameters:
pName name of Switch Port
pSerializeData switch port serialization data
pSetFunction set function called by switch port
Returns:
pointer to switch port
Exceptions:
SerializeException switchport creation failed

template<class DataType, class FunctionType>
SwitchPort * iso::synth::Patch::createFadingSwitchPort ( const String pName,
FunctionType  pFunctionPointer 
) [protected]

template<class DataType1, class DataType2, class FunctionType>
SwitchPort * iso::synth::Patch::createFadingSwitchPort ( const String pName,
FunctionType  pFunctionPointer 
) [protected]

template<class DataType, class FunctionType>
SwitchPort * iso::synth::Patch::createDataSwitchPort ( const String pName,
FunctionType  pFunctionPointer 
) [protected]

template<class DataType1, class DataType2, class FunctionType>
SwitchPort * iso::synth::Patch::createDataSwitchPort ( const String pName,
FunctionType  pFunctionPointer 
) [protected]

virtual void iso::synth::Patch::construct (  )  throw (SynthException) [protected, pure virtual]

function to create patch

Exceptions:
SynthException failed to create patch

Implemented in iso::synth::ModulationPatch, RhythmPatchCross, RhythmPatchNeighbor, iso::synth::AdditiveSynthesisPatch, iso::synth::BandPassFilterPatch, iso::synth::DelayBandPassPatch, iso::synth::DelayLinesPatch, iso::synth::ModulationPatch, iso::synth::SamplePatch, and iso::synth::StringsPatch.


Member Data Documentation

QVector<Unit*> iso::synth::Patch::mUnits [protected]

SwitchPorts iso::synth::Patch::mSwitches [protected]

all patch units

long iso::synth::Patch::mPreviousMessageId [protected]

switch ports

bool iso::synth::Patch::mActive [protected]

previous message id


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