CLAM::SinusoidalSynthesis Class Reference

#include <SinusoidalSynthesis.hxx>

Inheritance diagram for CLAM::SinusoidalSynthesis:

CLAM::ProcessingComposite CLAM::Processing

List of all members.


Detailed Description

This is a processing object class that performs a sinusoidal resynthesis given a set of spectral peaks.

Because it performs only one IFFT rather than the three performed by SMSSynthesis and it does not have process the residual, it requires approximately half the CPU cycles needed by SMSSynthesis, and it uses a lot less memory.

Author:
greg kellum [gkellum@iua.upf.edu] 08/02/2007
Since:
CLAM v1.2

Definition at line 63 of file SinusoidalSynthesis.hxx.


Public Member Functions

 SinusoidalSynthesis (const SMSSynthesisConfig &cfg)
 SinusoidalSynthesis ()
 ~SinusoidalSynthesis ()
const char * GetClassName () const
 Override it in every subclass and retur the name of that class.
const ProcessingConfigGetConfig () const
 Configuration getter.
bool Do (void)
 Supervised mode execution.
bool Do (SpectralPeakArray &inputSinusoidalPeaks, Spectrum &outputSpectrum, Audio &outputAudio)
 non-supervised Do method.
bool Do (SpectralPeakArray &inputSinusoidal, Audio &outputAudio)
 non-supervised Do method.
bool Do (Frame &in)
 non-supervised Do method: works on a CLAM::Frame
bool Do (Segment &in)
 non-supervised Do method: works on a CLAM::Segment.

Public Attributes

InControlTmpl
< SinusoidalSynthesis
mCurrentTimeControl
InControlTmpl
< SinusoidalSynthesis
mCurrentPitch

Protected Member Functions

void InitFrame (Frame &in)

Protected Attributes

InPort< SpectralPeakArraymInputSinSpectralPeaks
 Ports.
OutPort< SpectrummOutputSinSpectrum
OutPort< SpectrummOutputSpectrum
AudioOutPort mOutputAudio

Constructor & Destructor Documentation

CLAM::SinusoidalSynthesis::SinusoidalSynthesis ( const SMSSynthesisConfig cfg  ) 

Definition at line 59 of file SinusoidalSynthesis.cxx.

References CLAM::Processing::Configure().

CLAM::SinusoidalSynthesis::SinusoidalSynthesis (  ) 

Definition at line 47 of file SinusoidalSynthesis.cxx.

References CLAM::Processing::Configure().

CLAM::SinusoidalSynthesis::~SinusoidalSynthesis (  ) 

Definition at line 71 of file SinusoidalSynthesis.cxx.


Member Function Documentation

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

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

Reimplemented from CLAM::ProcessingComposite.

Definition at line 103 of file SinusoidalSynthesis.hxx.

const ProcessingConfig& CLAM::SinusoidalSynthesis::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.

Implements CLAM::ProcessingComposite.

Definition at line 106 of file SinusoidalSynthesis.hxx.

bool CLAM::SinusoidalSynthesis::Do ( void   )  [virtual]

bool CLAM::SinusoidalSynthesis::Do ( SpectralPeakArray inputSinusoidalPeaks,
Spectrum outputSpectrum,
Audio outputAudio 
)

non-supervised Do method.

Produces as output the sinusoidal spectrum, the global spectrum. and the sinusoidal, residual and globar audio frames. If this overload is used directly you must set the controls for current time and current pitch from the outside.

Definition at line 155 of file SinusoidalSynthesis.cxx.

References CLAM::OverlapAdd::Do(), CLAM::SpectralSynthesis::Do(), CLAM::SynthSineSpectrum::Do(), CLAM::PhaseManagement::Do(), CLAM::SMSSynthesisConfig::GetSamplingRate(), CLAM::Audio::GetSize(), CLAM::SMSSynthesisConfig::GetSpectrumSize(), mCurrentPitch, CLAM::PhaseManagement::mCurrentPitch, CLAM::PhaseManagement::mCurrentTime, mCurrentTimeControl, and CLAM::Spectrum::SetSize().

bool CLAM::SinusoidalSynthesis::Do ( SpectralPeakArray inputSinusoidal,
Audio outputAudio 
)

non-supervised Do method.

SinusoidalSynthesis produces, as side effect, also some output Spectrums. Use this overload if you do not care about these spectrums and just need the output audio. If this overload is used directly you must set the controls for current time and current pitch from the outside.

Definition at line 143 of file SinusoidalSynthesis.cxx.

References Do().

bool CLAM::SinusoidalSynthesis::Do ( Frame in  ) 

non-supervised Do method: works on a CLAM::Frame

Definition at line 195 of file SinusoidalSynthesis.cxx.

References Do(), CLAM::SMSSynthesisConfig::GetSpectrumSize(), InitFrame(), and mCurrentPitch.

bool CLAM::SinusoidalSynthesis::Do ( Segment in  ) 

non-supervised Do method: works on a CLAM::Segment.

Processes current frame in the segment and increments segment internal counter.

Definition at line 216 of file SinusoidalSynthesis.cxx.

References Do(), CLAM::Segment::GetFrame(), and CLAM::Segment::mCurrentFrameIndex.

void CLAM::SinusoidalSynthesis::InitFrame ( Frame in  )  [protected]


Member Data Documentation

Ports.

Definition at line 134 of file SinusoidalSynthesis.hxx.

Referenced by Do().

Definition at line 135 of file SinusoidalSynthesis.hxx.

Referenced by Do().

Definition at line 136 of file SinusoidalSynthesis.hxx.

Referenced by Do().

Definition at line 137 of file SinusoidalSynthesis.hxx.

Referenced by Do().

Definition at line 141 of file SinusoidalSynthesis.hxx.

Referenced by Do().

Definition at line 142 of file SinusoidalSynthesis.hxx.

Referenced by Do().


The documentation for this class was generated from the following files:

Generated on Tue Aug 12 22:33:49 2008 for CLAM by  doxygen 1.5.5