#include <iso_synth_fm_unit.h>
Inherits iso::synth::InputUnit.
Inheritance diagram for iso::synth::FMUnit:
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 | |
Channel * | carrierWaveTable () |
returns carrier wave table | |
Channel * | modulationWaveTable () |
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 | |
ControlPort * | mCarrierFrequency |
carrier frequency control port | |
ControlPort * | mCarrierAmplitude |
carrier amplitude control port | |
ControlPort * | mModulationFrequency |
modulation frequency control port | |
ControlPort * | mModulationIndex |
modulation index port | |
Frame * | mCarrierPhaseOffsetBuffer |
current carrier phase offsets | |
Frame * | mModulationPhaseOffsetBuffer |
current modulation phase offsets | |
String | mCarrierWaveTableName |
carrier wave table name | |
String | mModulationWaveTableName |
modulation wave table name | |
Channel * | mCarrierWaveTable |
carrier wave table buffer | |
Channel * | mModulationWaveTable |
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 |
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.
FMUnit::FMUnit | ( | String | pWaveTableName, | |
InterpolationType | pInterpolationType = TRUNCATEINTERPOL | |||
) |
parameter based contructor
pWaveTableName | name of wavetable or wavetable file | |
pInterpolationType | wavetable interpolation type |
FMUnit::FMUnit | ( | const String & | pName, | |
String | pWaveTableName, | |||
InterpolationType | pInterpolationType = TRUNCATEINTERPOL | |||
) |
parameter based contructor
pName | unit name | |
pWaveTableName | name of wavetable or wavetable file | |
pInterpolationType | wavetable interpolation type |
FMUnit::FMUnit | ( | unsigned int | pChannelCount, | |
String | pWaveTableName, | |||
InterpolationType | pInterpolationType = TRUNCATEINTERPOL | |||
) |
parameter based contructor
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
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
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
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
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, | |
String | pCarrierWaveTableName, | |||
String | pModulatorWaveTableName, | |||
InterpolationType | pInterpolationType = TRUNCATEINTERPOL | |||
) |
parameter based contructor
pName | unit name | |
pCarrierWaveTableName | name of carrier wavetable or wavetable file | |
pModulatorWaveTableName | name of modulation wavetable or wavetable file | |
pInterpolationType | wavetable interpolation type |
FMUnit::FMUnit | ( | unsigned int | pChannelCount, | |
String | pCarrierWaveTableName, | |||
String | pModulatorWaveTableName, | |||
InterpolationType | pInterpolationType = TRUNCATEINTERPOL | |||
) |
parameter based contructor
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
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
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
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
pUnit | unit to copy properties from |
name & copy constructor
pName | unit name | |
pUnit | unit to copy properties from |
FMUnit::FMUnit | ( | const data::Values & | pValues | ) | throw (SynthException) |
values based constructor
pValues | unit values |
SynthException | failed to create unit |
FMUnit::~FMUnit | ( | ) |
destructor
FMUnit::FMUnit | ( | ) | [protected] |
default constructor
Channel * FMUnit::carrierWaveTable | ( | ) |
returns carrier wave table
Channel * FMUnit::modulationWaveTable | ( | ) |
returns modulation wave table
void FMUnit::setWaveTable | ( | String | pWaveTableName | ) | throw (SynthException) |
set carrier and modulation wavetable
pWavetableName | wave table name |
SynthException | failed to set wave table |
void FMUnit::setCarrierWaveTable | ( | String | pWaveTableName | ) | throw (SynthException) |
set carrier wavetable
pWavetableName | wave table name |
SynthException | failed to set wave table |
void FMUnit::setModulationWaveTable | ( | String | pWaveTableName | ) | throw (SynthException) |
set modulation wavetable
pWavetableName | wave table name |
SynthException | failed to set wave table |
void FMUnit::process | ( | Buffer * | pBuffer | ) | throw (SynthException) [virtual] |
processes buffer
pBuffer | buffer to process |
Reimplemented from iso::synth::InputUnit.
base::String FMUnit::info | ( | bool | pPropagate = false , |
|
bool | pShowPorts = true | |||
) | const [virtual] |
obtain textual unit information
pPropagate | if true, the unit calls the info methods of its input ports | |
pShowPorts | print port information |
Reimplemented from iso::synth::InputUnit.
void FMUnit::init | ( | ) | [protected] |
initializes wavetable and control ports
std::ostream& operator<< | ( | std::ostream & | pOstream, | |
const FMUnit & | pUnit | |||
) | [friend] |
print unit information
const base::String FMUnit::sClassName [static] |
unsigned int FMUnit::sUnitCount [static, protected] |
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
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] |