CLAM::SimpleOscillator Class Reference

#include <SimpleOscillator.hxx>

List of all members.

Public Member Functions

 SimpleOscillator (const SimpleOscillatorConfig &c=Config())
virtual ~SimpleOscillator ()
const char * GetClassName () const
 Override it in every subclass and retur the name of that class.
virtual const ProcessingConfigGetConfig () const
 Configuration getter.
virtual bool ConcreteConfigure (const ProcessingConfig &c)
 Configuration method interface.
virtual bool Do (void)
 Supervised mode execution method (using ports).
bool Do (Audio &out)
bool Do (TData &out)
 Do for generating one sample at a time: useful to use the oscillator as a LFO.

Protected Types

typedef SimpleOscillatorConfig Config

Protected Member Functions

void ApplyFreqAndAmpControls ()
void UpdateFreq (TControlData)
void UpdateAmp (TControlData)

Protected Attributes

AudioOutPort mOutput
SimpleOscillatorConfig mConfig
TData mAmp
TData mPhase
TData mDeltaPhase
TData mSamplingRate
bool mFreqUpdated
bool mAmpUpdated
FloatInControl mFreqCtl
FloatInControl mAmpCtl
FloatInControl mSamplesBetweenCallsCtl

Detailed Description

Definition at line 84 of file SimpleOscillator.hxx.


Member Typedef Documentation

Reimplemented from CLAM::Processing.

Definition at line 87 of file SimpleOscillator.hxx.


Constructor & Destructor Documentation

CLAM::SimpleOscillator::SimpleOscillator ( const SimpleOscillatorConfig c = Config()  ) 

Definition at line 56 of file SimpleOscillator.cxx.

References CLAM::Processing::Configure().

CLAM::SimpleOscillator::~SimpleOscillator (  )  [virtual]

Definition at line 67 of file SimpleOscillator.cxx.


Member Function Documentation

void CLAM::SimpleOscillator::ApplyFreqAndAmpControls (  )  [inline, protected]
bool CLAM::SimpleOscillator::ConcreteConfigure ( const ProcessingConfig  )  [virtual]

Configuration method interface.

The Processing base class forces all the concrete classes derived from it to implement this method, which must actually perform the specific configuration tasks.

Note that the user can not call this method directly. He will use Configure instead. The argument is expected to be an object of the necesary concrete configuration class.

Parameters:
Reference to the configuration object.
Returns:
false if the object is not yet fully configured. (For example, if some important configuration attribute such as number of ports was set to zero in the config object)

true if the processing object is left in a consistent state, and can be executed.

Exceptions:
This method must throw a bad_cast exception if the argument is not an object of the expected configuration class.

Reimplemented from CLAM::Processing.

Reimplemented in CLAM::Oscillator.

Definition at line 71 of file SimpleOscillator.cxx.

References CLAM::Processing::CopyAsConcreteConfig(), CLAM::InControl< ControlDataType >::DoControl(), mAmp, mConfig, mDeltaPhase, mPhase, mSamplesBetweenCallsCtl, mSamplingRate, and PI.

bool CLAM::SimpleOscillator::Do ( TData out  ) 

Do for generating one sample at a time: useful to use the oscillator as a LFO.

Definition at line 113 of file SimpleOscillator.cxx.

References CLAM::Processing::AbleToExecute(), ApplyFreqAndAmpControls(), CLAM::InControl< ControlDataType >::GetLastValue(), mAmp, mDeltaPhase, mPhase, mSamplesBetweenCallsCtl, and PI.

bool CLAM::SimpleOscillator::Do ( Audio out  ) 
bool CLAM::SimpleOscillator::Do ( void   )  [virtual]

Supervised mode execution method (using ports).

Returns:
A boolean telling whether it has been output

Implements CLAM::Processing.

Reimplemented in CLAM::Oscillator.

Definition at line 85 of file SimpleOscillator.cxx.

References CLAM::AudioOutPort::GetAudio(), mOutput, and CLAM::OutPort< Token >::Produce().

Referenced by CLAM::SpectralPhaseModulation::Do().

const char* CLAM::SimpleOscillator::GetClassName (  )  const [inline, virtual]

Override it in every subclass and retur the name of that class.

Implements CLAM::Processing.

Reimplemented in CLAM::Oscillator.

Definition at line 127 of file SimpleOscillator.hxx.

virtual const ProcessingConfig& CLAM::SimpleOscillator::GetConfig (  )  const [inline, virtual]

Configuration getter.

Gets the configuration parameters used to create the object.

Returns:
Const reference to the configuration object. The usual way to perform a configuration change in the processing object is to take a copy of this reference, to change it and to send it with the Configure method. If not overriden, it returns a NullProcessingConfig.

Reimplemented from CLAM::Processing.

Reimplemented in CLAM::Oscillator.

Definition at line 129 of file SimpleOscillator.hxx.

References mConfig.

void CLAM::SimpleOscillator::UpdateAmp ( TControlData  value  )  [protected]

Definition at line 134 of file SimpleOscillator.cxx.

References mAmpUpdated.

void CLAM::SimpleOscillator::UpdateFreq ( TControlData  value  )  [protected]

Definition at line 129 of file SimpleOscillator.cxx.

References mFreqUpdated.


Member Data Documentation

Definition at line 98 of file SimpleOscillator.hxx.

Referenced by ApplyFreqAndAmpControls().

Definition at line 96 of file SimpleOscillator.hxx.

Referenced by ApplyFreqAndAmpControls(), and UpdateAmp().

Definition at line 89 of file SimpleOscillator.hxx.

Referenced by ConcreteConfigure(), and GetConfig().

Definition at line 97 of file SimpleOscillator.hxx.

Referenced by ApplyFreqAndAmpControls().

Definition at line 95 of file SimpleOscillator.hxx.

Referenced by ApplyFreqAndAmpControls(), and UpdateFreq().

Definition at line 88 of file SimpleOscillator.hxx.

Referenced by Do(), and CLAM::Oscillator::Do().

Definition at line 100 of file SimpleOscillator.hxx.

Referenced by ConcreteConfigure(), and Do().


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.3