#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:
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 | |
Channel * | waveTable () |
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 | |
ControlPort * | mFrequency |
frequency control port | |
ControlPort * | mAmplitude |
amplitude control port | |
ControlPort * | mStartPhase |
phase control port | |
ControlPort * | mOffset |
offset control port | |
Frame * | mPhaseOffsetBuffer |
current phase offsets with regard to start phases | |
String | mWaveTableName |
wave table name | |
Channel * | mWaveTable |
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 |
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.
WaveTableOscil::WaveTableOscil | ( | String | pWaveTableName, | |
InterpolationType | pInterpolationType = TRUNCATEINTERPOL | |||
) |
parameter based contructor
pWaveTableName | name of wavetable or wavetable file | |
pInterpolationType | wavetable interpolation type |
WaveTableOscil::WaveTableOscil | ( | 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 |
WaveTableOscil::WaveTableOscil | ( | 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 |
WaveTableOscil::WaveTableOscil | ( | 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 |
WaveTableOscil::WaveTableOscil | ( | 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 |
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
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
pUnit | unit to copy properties from |
WaveTableOscil::WaveTableOscil | ( | const String & | pName, | |
const WaveTableOscil & | pUnit | |||
) |
name & copy constructor
pName | unit name | |
pUnit | unit to copy properties from |
WaveTableOscil::WaveTableOscil | ( | const data::Values & | pValues | ) | throw (SynthException) |
values based constructor
pValues | unit values |
SynthException | failed to create unit |
WaveTableOscil::~WaveTableOscil | ( | ) |
destructor
WaveTableOscil::WaveTableOscil | ( | ) | [protected] |
default constructor
Channel * WaveTableOscil::waveTable | ( | ) |
returns wave table
void WaveTableOscil::setWaveTable | ( | String | pWaveTableName | ) | throw (SynthException) |
set wavetable
pWavetableName | wave table name |
SynthException | failed to set wave table |
void WaveTableOscil::process | ( | Buffer * | pBuffer | ) | throw (SynthException) [virtual] |
processes buffer
pBuffer | buffer to process |
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
pPropagate | if true, the unit calls the info methods of its input ports | |
pShowPorts | print port 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.
std::ostream& operator<< | ( | std::ostream & | pOstream, | |
const WaveTableOscil & | pUnit | |||
) | [friend] |
print unit information
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
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