iso::synth::WaveTableOscil Class Reference

wavetable oscillator More...

#include <iso_synth_wavetable_oscil.h>

Inherits iso::synth::InputUnit.

Inherited by iso::synth::BLPulseGen, and iso::synth::DCSPulseGen.

Inheritance diagram for iso::synth::WaveTableOscil:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 WaveTableOscil (String pWaveTableName, InterpolationType pInterpolationType=TRUNCATEINTERPOL)
 parameter based contructor
 WaveTableOscil (const String &pName, String pWaveTableName, InterpolationType pInterpolationType=TRUNCATEINTERPOL)
 parameter based contructor
 WaveTableOscil (unsigned int pChannelCount, String pWaveTableName, InterpolationType pInterpolationType=TRUNCATEINTERPOL)
 parameter based contructor
 WaveTableOscil (const String &pName, unsigned int pChannelCount, String pWaveTableName, InterpolationType pInterpolationType=TRUNCATEINTERPOL)
 parameter based contructor
 WaveTableOscil (String pWaveTableName, unsigned int pFrameCount, unsigned int pChannelCount, unsigned int pRate, InterpolationType pInterpolationType=TRUNCATEINTERPOL) throw (SynthException)
 parameter based contructor
 WaveTableOscil (const String &pName, String pWaveTableName, unsigned int pFrameCount, unsigned int pChannelCount, unsigned int pRate, InterpolationType pInterpolationType=TRUNCATEINTERPOL) throw (SynthException)
 name and parameter based contructor
 WaveTableOscil (const WaveTableOscil &pUnit)
 copy constructor
 WaveTableOscil (const String &pName, const WaveTableOscil &pUnit)
 name & copy constructor
 WaveTableOscil (const data::Values &pValues) throw (SynthException)
 values based constructor
 ~WaveTableOscil ()
 destructor
ChannelwaveTable ()
 returns wave table
void setWaveTable (String pWaveTableName) throw (SynthException)
 set wavetable
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

 WaveTableOscil ()
 default constructor
void init ()
 initializes wavetable and control ports

Protected Attributes

ControlPortmFrequency
 frequency control port
ControlPortmAmplitude
 amplitude control port
ControlPortmStartPhase
 phase control port
ControlPortmOffset
 offset control port
FramemPhaseOffsetBuffer
 current phase offsets with regard to start phases
String mWaveTableName
 wave table name
ChannelmWaveTable
 wave table buffer
sample mBaseFrequency
 frequency of wave in wave table at mRate
InterpolationType mInterpolationType
 interpolation type
sample mWaveTableSize
 wave table size
sample mFreqScale
sample mPhaseScale
 phase scale helper var needed in process() method

Static Protected Attributes

static unsigned int sUnitCount
 total number of units created so far

Friends

std::ostream & operator<< (std::ostream &pOstream, const WaveTableOscil &pUnit)
 print unit information

Detailed Description

wavetable oscillator

Unit that loops through a wavetable.
The content of the wavetable is retrieved from the wavetable manager and must be created in advance.
The only exception to this rule are wavetables that are automatically created by the wavetable manager.
These are: sinewave, squarewave, sawtoothwave


ControlPorts
name: frequency defaultValue: 440.0
name: amplitude defaultValue: 1.0
name: phase defaultValue: 0.0
name: offset defaultValue: 0.0

SwitchPorts:
name: active channelCount: 1 defaultValue: 1.0 resizable: false function: setActive


Created by Daniel Bisig on 9/03/06. Adapted by John Flury on 03/10/08 to a design by Beat Frei Copyright 2008 I.S.O. All rights reserved.


Constructor & Destructor Documentation

WaveTableOscil::WaveTableOscil ( String  pWaveTableName,
InterpolationType  pInterpolationType = TRUNCATEINTERPOL 
)

parameter based contructor

Parameters:
pWaveTableName name of wavetable or wavetable file
pInterpolationType wavetable interpolation type

WaveTableOscil::WaveTableOscil ( const String pName,
String  pWaveTableName,
InterpolationType  pInterpolationType = TRUNCATEINTERPOL 
)

parameter based contructor

Parameters:
pName unit name
pWaveTableName name of wavetable or wavetable file
pInterpolationType wavetable interpolation type

WaveTableOscil::WaveTableOscil ( unsigned int  pChannelCount,
String  pWaveTableName,
InterpolationType  pInterpolationType = TRUNCATEINTERPOL 
)

parameter based contructor

Parameters:
pChannelCount number of channels
pWaveTableName name of wavetable or wavetable file
pInterpolationType wavetable interpolation type

WaveTableOscil::WaveTableOscil ( const String pName,
unsigned int  pChannelCount,
String  pWaveTableName,
InterpolationType  pInterpolationType = TRUNCATEINTERPOL 
)

parameter based contructor

Parameters:
pName unit name
pChannelCount number of channels
pWaveTableName name of wavetable or wavetable file
pInterpolationType wavetable interpolation type

WaveTableOscil::WaveTableOscil ( String  pWaveTableName,
unsigned int  pFrameCount,
unsigned int  pChannelCount,
unsigned int  pRate,
InterpolationType  pInterpolationType = TRUNCATEINTERPOL 
) throw (SynthException)

parameter based contructor

Parameters:
pWaveTableName name of wavetable or wavetable file
pFrameCount number of frames
pChannelCount number of channels
pRate samping rate
pInterpolationType wavetable interpolation type

WaveTableOscil::WaveTableOscil ( const String pName,
String  pWaveTableName,
unsigned int  pFrameCount,
unsigned int  pChannelCount,
unsigned int  pRate,
InterpolationType  pInterpolationType = TRUNCATEINTERPOL 
) throw (SynthException)

name and parameter based contructor

Parameters:
pName unit name
pWaveTableName name of wavetable or wavetable file
pFrameCount number of frames
pChannelCount number of channels
pRate samping rate
pInterpolationType wavetable interpolation type

WaveTableOscil::WaveTableOscil ( const WaveTableOscil pUnit  ) 

copy constructor

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

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

name & copy constructor

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

WaveTableOscil::WaveTableOscil ( 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: String : name of wavetable or wavetable file 2: unsigned int : number of frames 3: unsigned int : number of channels 4: unsigned int : samping rate 5: InterpolationType : wavetable interpolation type

WaveTableOscil::~WaveTableOscil (  ) 

destructor

WaveTableOscil::WaveTableOscil (  )  [protected]

default constructor


Member Function Documentation

Channel * WaveTableOscil::waveTable (  ) 

returns wave table

Returns:
wave table

void WaveTableOscil::setWaveTable ( String  pWaveTableName  )  throw (SynthException)

set wavetable

Parameters:
pWavetableName wave table name
Exceptions:
SynthException failed to set wave table

void WaveTableOscil::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::InputUnit.

Reimplemented in iso::synth::BLPulseGen, and iso::synth::DCSPulseGen.

base::String WaveTableOscil::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::InputUnit.

Reimplemented in iso::synth::BLPulseGen, and iso::synth::DCSPulseGen.

void WaveTableOscil::init (  )  [protected]

initializes wavetable and control ports

Reimplemented in iso::synth::BLPulseGen, and iso::synth::DCSPulseGen.


Friends And Related Function Documentation

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

print unit information


Member Data Documentation

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

default name

Reimplemented from iso::synth::InputUnit.

Reimplemented in iso::synth::BLPulseGen, and iso::synth::DCSPulseGen.

unsigned int WaveTableOscil::sUnitCount [static, protected]

total number of units created so far

Reimplemented from iso::synth::InputUnit.

Reimplemented in iso::synth::BLPulseGen, and iso::synth::DCSPulseGen.

ControlPort* iso::synth::WaveTableOscil::mFrequency [protected]

frequency control port

ControlPort* iso::synth::WaveTableOscil::mAmplitude [protected]

amplitude control port

ControlPort* iso::synth::WaveTableOscil::mStartPhase [protected]

phase control port

ControlPort* iso::synth::WaveTableOscil::mOffset [protected]

offset control port

Frame* iso::synth::WaveTableOscil::mPhaseOffsetBuffer [protected]

current phase offsets with regard to start phases

String iso::synth::WaveTableOscil::mWaveTableName [protected]

wave table name

Channel* iso::synth::WaveTableOscil::mWaveTable [protected]

wave table buffer

sample iso::synth::WaveTableOscil::mBaseFrequency [protected]

frequency of wave in wave table at mRate

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

interpolation type

sample iso::synth::WaveTableOscil::mWaveTableSize [protected]

wave table size

sample iso::synth::WaveTableOscil::mFreqScale [protected]

sample iso::synth::WaveTableOscil::mPhaseScale [protected]

phase scale helper var needed in process() method


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