CLAM::SMSSynthesis Class Reference

#include <SMSSynthesis.hxx>

Inheritance diagram for CLAM::SMSSynthesis:

CLAM::ProcessingComposite CLAM::Processing

List of all members.


Detailed Description

This is the processing object class we are using to group several other processing objects.

Definition at line 57 of file SMSSynthesis.hxx.


Public Member Functions

 SMSSynthesis (const SMSSynthesisConfig &cfg)
 SMSSynthesis ()
 ~SMSSynthesis ()
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 SinusoidalSynthesis (const SpectralPeakArray &in, Spectrum &outSpec, Audio &outAudio)
 Sinusoidal synthesis, gives also the output spectrum.
bool SinusoidalSynthesis (const SpectralPeakArray &in, Audio &out)
 Sinusoidal synthesis.
bool Do (SpectralPeakArray &inputSinusoidalPeaks, Spectrum &inputResidualSpectrum, Spectrum &outputSinusoidalSpectrum, Spectrum &outputSpectrum, Audio &outputAudio, Audio &outputSinusoidalAudio, Audio &outputResidualAudio)
 non-supervised Do method.
bool Do (SpectralPeakArray &inputSinusoidalPeaks, Spectrum &inputResidualSpectrum, Spectrum &outputSinusoidalSpectrum, Spectrum &outputSpectrum, Audio &outputAudio)
 non-supervised Do method.
bool Do (SpectralPeakArray &inputSinusoidal, Spectrum &inputSpectrum, Audio &outputAudio, Audio &outputSinusoidal, Audio &outputResidual)
 non-supervised Do method.
bool Do (Frame &in)
 non-supervised Do method: works on a CLAM::Frame
bool Do (Frame &in, bool isSynthesizeSinusoidsAndResidual)
 If isSynthesizeSinusoidsAndResidual is false, this method synthesizes only the mixdown of the sinusoids and residual rather than synthesizing each separately.
bool Do (Segment &in)
 non-supervised Do method: works on a CLAM::Segment.

Public Attributes

InControlTmpl< SMSSynthesismCurrentTimeControl
InControlTmpl< SMSSynthesismCurrentPitch

Protected Member Functions

void InitFrame (Frame &in)

Protected Attributes

InPort< SpectralPeakArraymInputSinSpectralPeaks
 Ports.
InPort< SpectrummInputResSpectrum
OutPort< SpectrummOutputSinSpectrum
OutPort< SpectrummOutputSpectrum
AudioOutPort mOutputAudio
AudioOutPort mOutputResAudio
AudioOutPort mOutputSinAudio

Constructor & Destructor Documentation

CLAM::SMSSynthesis::SMSSynthesis ( const SMSSynthesisConfig cfg  ) 

Definition at line 72 of file SMSSynthesis.cxx.

References CLAM::Processing::Configure().

CLAM::SMSSynthesis::SMSSynthesis (  ) 

Definition at line 56 of file SMSSynthesis.cxx.

References CLAM::Processing::Configure().

CLAM::SMSSynthesis::~SMSSynthesis (  ) 

Definition at line 88 of file SMSSynthesis.cxx.


Member Function Documentation

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

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

Reimplemented from CLAM::ProcessingComposite.

Definition at line 105 of file SMSSynthesis.hxx.

const ProcessingConfig& CLAM::SMSSynthesis::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 108 of file SMSSynthesis.hxx.

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

bool CLAM::SMSSynthesis::SinusoidalSynthesis ( const SpectralPeakArray in,
Spectrum outSpec,
Audio outAudio 
)

Sinusoidal synthesis, gives also the output spectrum.

Definition at line 171 of file SMSSynthesis.cxx.

References CLAM::OverlapAdd::Do(), CLAM::SpectralSynthesis::Do(), and CLAM::SynthSineSpectrum::Do().

Referenced by Do(), and SinusoidalSynthesis().

bool CLAM::SMSSynthesis::SinusoidalSynthesis ( const SpectralPeakArray in,
Audio out 
)

Sinusoidal synthesis.

Definition at line 161 of file SMSSynthesis.cxx.

References CLAM::EScale::eLinear, and SinusoidalSynthesis().

bool CLAM::SMSSynthesis::Do ( SpectralPeakArray inputSinusoidalPeaks,
Spectrum inputResidualSpectrum,
Spectrum outputSinusoidalSpectrum,
Spectrum outputSpectrum,
Audio outputAudio,
Audio outputSinusoidalAudio,
Audio outputResidualAudio 
)

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 231 of file SMSSynthesis.cxx.

References CLAM::OverlapAdd::Do(), CLAM::SpectralSynthesis::Do(), CLAM::SpectrumAdder2::Do(), CLAM::PhaseManagement::Do(), CLAM::Spectrum::GetSize(), CLAM::Audio::GetSize(), mCurrentPitch, CLAM::PhaseManagement::mCurrentPitch, CLAM::PhaseManagement::mCurrentTime, mCurrentTimeControl, CLAM::Spectrum::SetSize(), and SinusoidalSynthesis().

bool CLAM::SMSSynthesis::Do ( SpectralPeakArray inputSinusoidalPeaks,
Spectrum inputResidualSpectrum,
Spectrum outputSinusoidalSpectrum,
Spectrum outputSpectrum,
Audio outputAudio 
)

non-supervised Do method.

Produces as output the sinusoidal spectrum, the global spectrum. and the global 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 292 of file SMSSynthesis.cxx.

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

bool CLAM::SMSSynthesis::Do ( SpectralPeakArray inputSinusoidal,
Spectrum inputSpectrum,
Audio outputAudio,
Audio outputSinusoidal,
Audio outputResidual 
)

non-supervised Do method.

SMSSynthesis 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 213 of file SMSSynthesis.cxx.

References Do(), CLAM::Spectrum::GetSize(), and CLAM::Spectrum::SetSize().

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

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

Definition at line 344 of file SMSSynthesis.cxx.

References Do().

bool CLAM::SMSSynthesis::Do ( Frame in,
bool  isSynthesizeSinusoidsAndResidual 
)

If isSynthesizeSinusoidsAndResidual is false, this method synthesizes only the mixdown of the sinusoids and residual rather than synthesizing each separately.

If you don't need the separate audio representations of the sinusoid and residual, use this with isSynthesizeSinusoidsAndResidual set to false, because then this method only performs one IFFT rather than three which saves a considerable number of CPU cycles.

Definition at line 350 of file SMSSynthesis.cxx.

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

bool CLAM::SMSSynthesis::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 379 of file SMSSynthesis.cxx.

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

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

Definition at line 385 of file SMSSynthesis.cxx.

References CLAM::SMSSynthesisConfig::GetFrameSize(), and CLAM::DynamicType::UpdateData().

Referenced by Do().


Member Data Documentation

Ports.

Definition at line 158 of file SMSSynthesis.hxx.

Referenced by Do().

Definition at line 159 of file SMSSynthesis.hxx.

Referenced by Do().

Definition at line 160 of file SMSSynthesis.hxx.

Referenced by Do().

Definition at line 161 of file SMSSynthesis.hxx.

Referenced by Do().

Definition at line 162 of file SMSSynthesis.hxx.

Referenced by Do().

Definition at line 163 of file SMSSynthesis.hxx.

Referenced by Do().

Definition at line 164 of file SMSSynthesis.hxx.

Referenced by Do().

Definition at line 168 of file SMSSynthesis.hxx.

Referenced by Do().

Definition at line 169 of file SMSSynthesis.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