CLAM::SMSPitchShift Class Reference

Pitch shift with timbre preservation using the SMS model. More...

#include <SMSPitchShift.hxx>

List of all members.

Public Member Functions

 SMSPitchShift ()
 ~SMSPitchShift ()
bool ConcreteConfigure (const ProcessingConfig &config)
 Configuration method interface.
bool Do (const SpectralPeakArray &inPeaks, const Fundamental &inFund, const Spectrum &inRes, SpectralPeakArray &outPeaks, Fundamental &outFund, Spectrum &outRes)
bool Do (const Frame &in, Frame &out)
bool Do ()
 Supervised mode execution method (using ports).

Public Attributes

FloatInControl mIgnoreResidual
 In some cases, such as in the harmonizer it makes sense to ignore the residual spectrum in order to keep things manageable.

Detailed Description

Pitch shift with timbre preservation using the SMS model.

In order to preserve timbre, the original spectral shape is extracted and then applied back.

Definition at line 47 of file SMSPitchShift.hxx.


Constructor & Destructor Documentation

CLAM::SMSPitchShift::SMSPitchShift (  )  [inline]

Definition at line 61 of file SMSPitchShift.hxx.

References CLAM::Processing::Configure().

CLAM::SMSPitchShift::~SMSPitchShift (  )  [inline]

Definition at line 76 of file SMSPitchShift.hxx.


Member Function Documentation

bool CLAM::SMSPitchShift::ConcreteConfigure ( const ProcessingConfig  )  [inline, 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.

Definition at line 78 of file SMSPitchShift.hxx.

References CLAM::InControl< ControlDataType >::DoControl(), mIgnoreResidual, CLAM::InControlBase::SetBounds(), and CLAM::InControlBase::SetDefaultValue().

bool CLAM::SMSPitchShift::Do (  )  [inline, virtual]

Supervised mode execution method (using ports).

Returns:
A boolean telling whether it has been output

Implements CLAM::Processing.

Definition at line 99 of file SMSPitchShift.hxx.

References CLAM::InPort< Token >::Consume(), CLAM::OutPort< Token >::GetData(), CLAM::InPort< Token >::GetData(), and CLAM::OutPort< Token >::Produce().

Referenced by Do().

bool CLAM::SMSPitchShift::Do ( const Frame in,
Frame out 
) [virtual]

Implements CLAM::FrameTransformation.

Definition at line 111 of file SMSPitchShift.cxx.

References Do().

bool CLAM::SMSPitchShift::Do ( const SpectralPeakArray inPeaks,
const Fundamental inFund,
const Spectrum inRes,
SpectralPeakArray outPeaks,
Fundamental outFund,
Spectrum outRes 
)

Member Data Documentation

In some cases, such as in the harmonizer it makes sense to ignore the residual spectrum in order to keep things manageable.

This should if fact be a configuration param, but we don't want to introduce specific params that prevent us from using the generic one

Definition at line 128 of file SMSPitchShift.hxx.

Referenced by ConcreteConfigure(), Do(), CLAM::SMSHarmonizer::IgnoreResidual(), and CLAM::SegmentSMSHarmonizer::IgnoreResidual().


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