iso::synth::WaveTableManager Class Reference

wave table manager More...

#include <iso_synth_wavetable_manager.h>

Collaboration diagram for iso::synth::WaveTableManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual serialize::SerializeData serialize (const String &pSerialName=sClassName) const
 create serializeData for wavetable manager
ChannelwaveTable (String pWaveTableName) throw (SynthException)
 return wavetable
ChannelwaveTable (String pWaveTableName, FunctionList &pFunctionList)
 get wavetable
ChannelgetWaveTable (String pWaveTableName) throw (SynthException)
 return wavetable
ChannelgetWaveTable (String pWaveTableName, FunctionList &pFunctionList)
 get wavetable
ChannelloadWaveTable (String pWaveTableName, String pFileName, unsigned int pChannelIndex=0) throw (SynthException)
 load wavetable
ChannelcreateWaveTable (String pWaveTableName, String pFileName, unsigned int pChannelIndex) throw (SynthException)
 load wavetable
ChannelcreateWaveTable (String pWaveTableName, unsigned int pTableSize) throw (SynthException)
 create zero wavetable
ChannelcreateWaveTable (String pWaveTableName, unsigned int pTableSize, FunctionType pFunctionType, math::Vector< sample > &pControlPoints) throw (SynthException)
 create wavetable from function segments
ChannelcreateWaveTable (String pWaveTableName, unsigned int pTableSize, FunctionType pFunctionType, math::Vector< sample > &pControlPoints, sample pControlParameter) throw (SynthException)
 create wavetable from function segments
ChannelcreateWaveTable (String pWaveTableName, unsigned int pTableSize, FunctionType pFunctionType, math::Vector< sample > &pControlPoints, math::Vector< sample > &pControlParameters) throw (SynthException)
 create wavetable from function segments
ChannelcreateWaveTable (String pWaveTableName, FunctionList &pFunctionList) throw (SynthException)
 create wavetable
void createWaveTables (const serialize::SerializeData &pSerializeData) throw (serialize::SerializeException)
 create wavetables from configuration
String info (bool pPropagate=false) const
 obtain textual wavetable manager information

Static Public Member Functions

static WaveTableManagerget ()
 get singleton instance
static WaveTableManagerget (const serialize::SerializeData &pSerializeData) throw (serialize::SerializeException)
 get singleton instance
static void destroy ()
 destroy singleton instance
static serialize::Serializable * deSerialize (const serialize::SerializeData &pSerializeData) throw (serialize::SerializeException)
 create wavetable manager from SerializeData

Static Public Attributes

static const String sClassName
 default name

Protected Member Functions

 WaveTableManager (unsigned int pWaveTableSize=sWaveTableSize)
 parameter based constructor
 WaveTableManager (const serialize::SerializeData &pSerializeData) throw (serialize::SerializeException)
 serialization based constructor
virtual ~WaveTableManager ()
 destructor
void createStandardWaveTable (String pWaveTableName) throw (SynthException)
 creates wavetable

Protected Attributes

unsigned int mWaveTableSize
 wavetable size
QHash< String, Channel * > mWaveTables
 wavetable name / channel association

Static Protected Attributes

static WaveTableManagersWaveTableManager
 singleton instance
static unsigned int sWaveTableSize
 default wavetable size

Detailed Description

wave table manager

manager

Created by Daniel Bisig on 7/3/06. Copyright 2006 Daniel Bisig All rights reserved.


Constructor & Destructor Documentation

WaveTableManager::WaveTableManager ( unsigned int  pWaveTableSize = sWaveTableSize  )  [protected]

parameter based constructor

Parameters:
pWaveTableSize wave table size

WaveTableManager::WaveTableManager ( const serialize::SerializeData &  pSerializeData  )  throw (serialize::SerializeException) [protected]

serialization based constructor

Parameters:
pSerializeData serialization data
Exceptions:
SerializeException failed to create unit

WaveTableManager::~WaveTableManager (  )  [protected, virtual]

destructor


Member Function Documentation

WaveTableManager & WaveTableManager::get (  )  [static]

get singleton instance

Returns:
singleton instance

WaveTableManager & WaveTableManager::get ( const serialize::SerializeData &  pSerializeData  )  throw (serialize::SerializeException) [static]

get singleton instance

Parameters:
pSerializeData serialization data
Returns:
singleton instance
Exceptions:
SerializeException failed to create wavetable manager

void WaveTableManager::destroy (  )  [static]

destroy singleton instance

serialize::SerializeData WaveTableManager::serialize ( const String pSerialName = sClassName  )  const [virtual]

create serializeData for wavetable manager

Returns:
serializeData

serialize::Serializable * WaveTableManager::deSerialize ( const serialize::SerializeData &  pSerializeData  )  throw (serialize::SerializeException) [static]

create wavetable manager from SerializeData

Parameters:
pSerializeData SerializeData
Returns:
Serializable
Exceptions:
SerializeException incompatible SerializeData

Channel * WaveTableManager::waveTable ( String  pWaveTableName  )  throw (SynthException)

return wavetable

Parameters:
pWaveTableName name of wavetable
Returns:
channel containing wavetable
Exceptions:
SynthException unknown wavetable

Channel * WaveTableManager::waveTable ( String  pWaveTableName,
FunctionList pFunctionList 
)

get wavetable

Parameters:
pWaveTableName name under which the wavetable is stored
pFunctionList vector of function descriptors
either retreives an existing wavetable or creates a new one

Channel * WaveTableManager::getWaveTable ( String  pWaveTableName  )  throw (SynthException)

return wavetable

Parameters:
pWaveTableName name of wavetable
Returns:
channel containing wavetable
Exceptions:
SynthException unknown wavetable

Channel * WaveTableManager::getWaveTable ( String  pWaveTableName,
FunctionList pFunctionList 
)

get wavetable

Parameters:
pWaveTableName name under which the wavetable is stored
pFunctionList vector of function descriptors
either retreives an existing wavetable or creates a new one

Channel * WaveTableManager::loadWaveTable ( String  pWaveTableName,
String  pFileName,
unsigned int  pChannelIndex = 0 
) throw (SynthException)

load wavetable

Parameters:
pWaveTableName name under which the wavetable will be stored
pFileName audio file name
pChannelIndex channel index into audio file
Exceptions:
SynthException\n supplied name already used for other wavetable
Failed to open file
Channel Index exceeds bounds

Channel * WaveTableManager::createWaveTable ( String  pWaveTableName,
String  pFileName,
unsigned int  pChannelIndex 
) throw (SynthException)

load wavetable

Parameters:
pWaveTableName name under which the wavetable will be stored
pFileName audio file name
pChannelIndex channel index into audio file
Exceptions:
SynthException\n supplied name already used for other wavetable
Failed to open file
Channel Index exceeds bounds

Channel * WaveTableManager::createWaveTable ( String  pWaveTableName,
unsigned int  pTableSize 
) throw (SynthException)

create zero wavetable

Parameters:
pWaveTableName name under which the wavetable will be stored
pTableSize size of wave table
Exceptions:
SynthException supplied name already used for other wavetable

Channel * WaveTableManager::createWaveTable ( String  pWaveTableName,
unsigned int  pTableSize,
FunctionType  pFunctionType,
math::Vector< sample > &  pControlPoints 
) throw (SynthException)

create wavetable from function segments

Parameters:
pWaveTableName name under which the wavetable will be stored
pTableSize size of wave table
pFunctionType function type
pControlPoints function segment points
Exceptions:
SynthException supplied name already used for other wavetable or failed to create wavetable
employs default function control parameter

Channel * WaveTableManager::createWaveTable ( String  pWaveTableName,
unsigned int  pTableSize,
FunctionType  pFunctionType,
math::Vector< sample > &  pControlPoints,
sample  pControlParameter 
) throw (SynthException)

create wavetable from function segments

Parameters:
pWaveTableName name under which the wavetable will be stored
pTableSize size of wave table
pFunctionType function type
pControlPoints function segment start and end points
pControlParameter function control parameter
Exceptions:
SynthException supplied name already used for other wavetable or failed to create wavetable
employs the same function control parameter for all function segments

Channel * WaveTableManager::createWaveTable ( String  pWaveTableName,
unsigned int  pTableSize,
FunctionType  pFunctionType,
math::Vector< sample > &  pControlPoints,
math::Vector< sample > &  pControlParameters 
) throw (SynthException)

create wavetable from function segments

Parameters:
pWaveTableName name under which the wavetable will be stored
pTableSize size of wave table
pFunctionType function type
pControlPoints function segment start and end points
pControlParameters function control parameters
Exceptions:
SynthException supplied name already used for other wavetable or failed to create wavetable
employs individual function control parameters for each function segment

Channel * WaveTableManager::createWaveTable ( String  pWaveTableName,
FunctionList pFunctionList 
) throw (SynthException)

create wavetable

Parameters:
pWaveTableName name under which the wavetable will be stored
pFunctionList vector of function descriptors
Exceptions:
SynthException supplied name already used for other wavetable

void WaveTableManager::createWaveTables ( const serialize::SerializeData &  pSerializeData  )  throw (serialize::SerializeException)

create wavetables from configuration

Parameters:
pSerializeData Wavetablemanager serialization data
Exceptions:
SerializeException failed to create wavetables

base::String WaveTableManager::info ( bool  pPropagate = false  )  const

obtain textual wavetable manager information

Parameters:
pPropagate true: print content of wavetables
Returns:
String containing wavetable manager information

void WaveTableManager::createStandardWaveTable ( String  pWaveTableName  )  throw (SynthException) [protected]

creates wavetable

Parameters:
pWaveTableName name of standard wavetable
Exceptions:
SynthException unknown standard wavetable name
creates a wavetable containing a standard type of wave


Member Data Documentation

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

default name

WaveTableManager * WaveTableManager::sWaveTableManager [static, protected]

singleton instance

unsigned int WaveTableManager::sWaveTableSize [static, protected]

default wavetable size

unsigned int iso::synth::WaveTableManager::mWaveTableSize [protected]

wavetable size

QHash<String, Channel*> iso::synth::WaveTableManager::mWaveTables [protected]

wavetable name / channel association


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