This is a processing object class that performs a sinusoidal resynthesis given a set of spectral peaks. More...
#include <SinusoidalSynthesis.hxx>
Public Member Functions | |
SinusoidalSynthesis (const Config &cfg=Config()) | |
~SinusoidalSynthesis () | |
const char * | GetClassName () const |
Override it in every subclass and retur the name of that class. | |
const ProcessingConfig & | GetConfig () 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 | |
FloatInControl | mCurrentTimeControl |
FloatInControl | mCurrentPitch |
Protected Member Functions | |
void | InitFrame (Frame &in) |
Protected Attributes | |
InPort< SpectralPeakArray > | mInputSinSpectralPeaks |
Ports. | |
OutPort< Spectrum > | mOutputSinSpectrum |
OutPort< Spectrum > | mOutputSpectrum |
AudioOutPort | mOutputAudio |
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.
Definition at line 63 of file SinusoidalSynthesis.hxx.
CLAM::SinusoidalSynthesis::~SinusoidalSynthesis | ( | ) |
Definition at line 52 of file SinusoidalSynthesis.cxx.
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 197 of file SinusoidalSynthesis.cxx.
bool CLAM::SinusoidalSynthesis::Do | ( | Frame & | in | ) |
non-supervised Do method: works on a CLAM::Frame
Definition at line 176 of file SinusoidalSynthesis.cxx.
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 124 of file SinusoidalSynthesis.cxx.
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 136 of file SinusoidalSynthesis.cxx.
bool CLAM::SinusoidalSynthesis::Do | ( | void | ) | [virtual] |
Supervised mode execution.
Implements CLAM::ProcessingComposite.
Definition at line 108 of file SinusoidalSynthesis.cxx.
Referenced by InitFrame().
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.
Implements CLAM::ProcessingComposite.
Definition at line 106 of file SinusoidalSynthesis.hxx.
void CLAM::SinusoidalSynthesis::InitFrame | ( | Frame & | in | ) | [protected] |
Definition at line 203 of file SinusoidalSynthesis.cxx.
References Do(), CLAM::Segment::GetFrame(), and CLAM::Segment::mCurrentFrameIndex.
Definition at line 142 of file SinusoidalSynthesis.hxx.
Definition at line 141 of file SinusoidalSynthesis.hxx.
Ports.
Definition at line 134 of file SinusoidalSynthesis.hxx.
AudioOutPort CLAM::SinusoidalSynthesis::mOutputAudio [protected] |
Definition at line 137 of file SinusoidalSynthesis.hxx.
OutPort<Spectrum> CLAM::SinusoidalSynthesis::mOutputSinSpectrum [protected] |
Definition at line 135 of file SinusoidalSynthesis.hxx.
OutPort<Spectrum> CLAM::SinusoidalSynthesis::mOutputSpectrum [protected] |
Definition at line 136 of file SinusoidalSynthesis.hxx.