#include <SinusoidalSynthesis.hxx>
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.
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 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 | |
InControlTmpl < SinusoidalSynthesis > | mCurrentTimeControl |
InControlTmpl < SinusoidalSynthesis > | mCurrentPitch |
Protected Member Functions | |
void | InitFrame (Frame &in) |
Protected Attributes | |
InPort< SpectralPeakArray > | mInputSinSpectralPeaks |
Ports. | |
OutPort< Spectrum > | mOutputSinSpectrum |
OutPort< Spectrum > | mOutputSpectrum |
AudioOutPort | mOutputAudio |
CLAM::SinusoidalSynthesis::SinusoidalSynthesis | ( | const SMSSynthesisConfig & | cfg | ) |
CLAM::SinusoidalSynthesis::SinusoidalSynthesis | ( | ) |
CLAM::SinusoidalSynthesis::~SinusoidalSynthesis | ( | ) |
Definition at line 71 of file SinusoidalSynthesis.cxx.
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.
bool CLAM::SinusoidalSynthesis::Do | ( | void | ) | [virtual] |
Supervised mode execution.
Implements CLAM::ProcessingComposite.
Definition at line 127 of file SinusoidalSynthesis.cxx.
References CLAM::AudioOutPort::GetAudio(), mInputSinSpectralPeaks, mOutputAudio, mOutputSinSpectrum, mOutputSpectrum, and CLAM::OutPort< Token >::Produce().
Referenced by Do().
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().
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.
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] |
Definition at line 222 of file SinusoidalSynthesis.cxx.
References CLAM::SMSSynthesisConfig::GetFrameSize(), and CLAM::DynamicType::UpdateData().
Referenced by Do().
OutPort<Spectrum> CLAM::SinusoidalSynthesis::mOutputSinSpectrum [protected] |
OutPort<Spectrum> CLAM::SinusoidalSynthesis::mOutputSpectrum [protected] |
AudioOutPort CLAM::SinusoidalSynthesis::mOutputAudio [protected] |