iso::synth::FMUnit Class Reference

frequency modulation unit More...

#include <iso_synth_fm_unit.h>

Inherits iso::synth::InputUnit.

Inheritance diagram for iso::synth::FMUnit:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

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

Protected Attributes

ControlPortmCarrierFrequency
 carrier frequency control port
ControlPortmCarrierAmplitude
 carrier amplitude control port
ControlPortmModulationFrequency
 modulation frequency control port
ControlPortmModulationIndex
 modulation index port
FramemCarrierPhaseOffsetBuffer
 current carrier phase offsets
FramemModulationPhaseOffsetBuffer
 current modulation phase offsets
String mCarrierWaveTableName
 carrier wave table name
String mModulationWaveTableName
 modulation wave table name
ChannelmCarrierWaveTable
 carrier wave table buffer
ChannelmModulationWaveTable
 modulation wave table buffer
sample mCarrierBaseFrequency
 carrier frequency of wave in carrier wave table at mRate
sample mModulationBaseFrequency
 modulation frequency of wave in modulation wave table at mRate
InterpolationType mInterpolationType
 interpolation type
sample mCarrierWaveTableSize
 carrier wave table size
sample mModulationWaveTableSize
 modulation wave table size
sample mCarrierFreqScale
sample mModulationFreqScale

Static Protected Attributes

static unsigned int sUnitCount
 total number of units created so far

Friends

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

Detailed Description

frequency modulation unit

unit

A unit that combines a carrier and modulation oscillator and provides an modulation index control port.
The oscillator and the modulation both refer to their own wavetables.
The content of the wavetables 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: carrierFrequency defaultValue: 440.0
name: carrierAmplitude defaultValue: 1.0
name: modulationAmplitude defaultValue: 100.0
name: modulationIndex defaultValue: 1.0

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


Created by Daniel Bisig on 11/07/08. Copyright 2008 I.S.O. All rights reserved.


Constructor & Destructor Documentation

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

parameter based contructor

Parameters:
pWaveTableName name of wavetable or wavetable file
pInterpolationType wavetable interpolation type
same wavetable is used for carrier and modulation

FMUnit::FMUnit ( 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
same wavetable is used for carrier and modulation

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

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

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

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

FMUnit::FMUnit ( String  pCarrierWaveTableName,
String  pModulatorWaveTableName,
InterpolationType  pInterpolationType = TRUNCATEINTERPOL 
)

parameter based contructor

Parameters:
pCarrierWaveTableName name of carrier wavetable or wavetable file
pModulatorWaveTableName name of modulation wavetable or wavetable file
pInterpolationType wavetable interpolation type
same wavetable is used for carrier and modulation

FMUnit::FMUnit ( const String pName,
String  pCarrierWaveTableName,
String  pModulatorWaveTableName,
InterpolationType  pInterpolationType = TRUNCATEINTERPOL 
)

parameter based contructor

Parameters:
pName unit name
pCarrierWaveTableName name of carrier wavetable or wavetable file
pModulatorWaveTableName name of modulation wavetable or wavetable file
pInterpolationType wavetable interpolation type
same wavetable is used for carrier and modulation

FMUnit::FMUnit ( unsigned int  pChannelCount,
String  pCarrierWaveTableName,
String  pModulatorWaveTableName,
InterpolationType  pInterpolationType = TRUNCATEINTERPOL 
)

parameter based contructor

Parameters:
pChannelCount number of channels
pCarrierWaveTableName name of carrier wavetable or wavetable file
pModulatorWaveTableName name of modulation wavetable or wavetable file
pInterpolationType wavetable interpolation type

FMUnit::FMUnit ( const String pName,
unsigned int  pChannelCount,
String  pCarrierWaveTableName,
String  pModulatorWaveTableName,
InterpolationType  pInterpolationType = TRUNCATEINTERPOL 
)

parameter based contructor

Parameters:
pName unit name
pChannelCount number of channels
pCarrierWaveTableName name of carrier wavetable or wavetable file
pModulatorWaveTableName name of modulation wavetable or wavetable file
pInterpolationType wavetable interpolation type

FMUnit::FMUnit ( String  pCarrierWaveTableName,
String  pModulatorWaveTableName,
unsigned int  pFrameCount,
unsigned int  pChannelCount,
unsigned int  pRate,
InterpolationType  pInterpolationType = TRUNCATEINTERPOL 
) throw (SynthException)

parameter based contructor

Parameters:
pCarrierWaveTableName name of carrier wavetable or wavetable file
pModulatorWaveTableName name of modulation wavetable or wavetable file
pFrameCount number of frames
pChannelCount number of channels
pRate samping rate
pInterpolationType wavetable interpolation type

FMUnit::FMUnit ( const String pName,
String  pCarrierWaveTableName,
String  pModulatorWaveTableName,
unsigned int  pFrameCount,
unsigned int  pChannelCount,
unsigned int  pRate,
InterpolationType  pInterpolationType = TRUNCATEINTERPOL 
) throw (SynthException)

name and parameter based contructor

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

FMUnit::FMUnit ( const FMUnit pUnit  ) 

copy constructor

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

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

name & copy constructor

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

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

FMUnit::~FMUnit (  ) 

destructor

FMUnit::FMUnit (  )  [protected]

default constructor


Member Function Documentation

Channel * FMUnit::carrierWaveTable (  ) 

returns carrier wave table

Returns:
carrier wave table

Channel * FMUnit::modulationWaveTable (  ) 

returns modulation wave table

Returns:
modulation wave table

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

set carrier and modulation wavetable

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

void FMUnit::setCarrierWaveTable ( String  pWaveTableName  )  throw (SynthException)

set carrier wavetable

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

void FMUnit::setModulationWaveTable ( String  pWaveTableName  )  throw (SynthException)

set modulation wavetable

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

void FMUnit::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.

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

void FMUnit::init (  )  [protected]

initializes wavetable and control ports


Friends And Related Function Documentation

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

print unit information


Member Data Documentation

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

default name

Reimplemented from iso::synth::InputUnit.

unsigned int FMUnit::sUnitCount [static, protected]

total number of units created so far

Reimplemented from iso::synth::InputUnit.

ControlPort* iso::synth::FMUnit::mCarrierFrequency [protected]

carrier frequency control port

ControlPort* iso::synth::FMUnit::mCarrierAmplitude [protected]

carrier amplitude control port

ControlPort* iso::synth::FMUnit::mModulationFrequency [protected]

modulation frequency control port

ControlPort* iso::synth::FMUnit::mModulationIndex [protected]

modulation index port

Frame* iso::synth::FMUnit::mCarrierPhaseOffsetBuffer [protected]

current carrier phase offsets

Frame* iso::synth::FMUnit::mModulationPhaseOffsetBuffer [protected]

current modulation phase offsets

String iso::synth::FMUnit::mCarrierWaveTableName [protected]

carrier wave table name

String iso::synth::FMUnit::mModulationWaveTableName [protected]

modulation wave table name

Channel* iso::synth::FMUnit::mCarrierWaveTable [protected]

carrier wave table buffer

Channel* iso::synth::FMUnit::mModulationWaveTable [protected]

modulation wave table buffer

sample iso::synth::FMUnit::mCarrierBaseFrequency [protected]

carrier frequency of wave in carrier wave table at mRate

sample iso::synth::FMUnit::mModulationBaseFrequency [protected]

modulation frequency of wave in modulation wave table at mRate

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

interpolation type

sample iso::synth::FMUnit::mCarrierWaveTableSize [protected]

carrier wave table size

sample iso::synth::FMUnit::mModulationWaveTableSize [protected]

modulation wave table size

sample iso::synth::FMUnit::mCarrierFreqScale [protected]

sample iso::synth::FMUnit::mModulationFreqScale [protected]


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