#include <SMSSynthesis.hxx>
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 ProcessingConfig & | GetConfig () 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< SMSSynthesis > | mCurrentTimeControl |
InControlTmpl< SMSSynthesis > | mCurrentPitch |
Protected Member Functions | |
void | InitFrame (Frame &in) |
Protected Attributes | |
InPort< SpectralPeakArray > | mInputSinSpectralPeaks |
Ports. | |
InPort< Spectrum > | mInputResSpectrum |
OutPort< Spectrum > | mOutputSinSpectrum |
OutPort< Spectrum > | mOutputSpectrum |
AudioOutPort | mOutputAudio |
AudioOutPort | mOutputResAudio |
AudioOutPort | mOutputSinAudio |
CLAM::SMSSynthesis::SMSSynthesis | ( | const SMSSynthesisConfig & | cfg | ) |
CLAM::SMSSynthesis::SMSSynthesis | ( | ) |
CLAM::SMSSynthesis::~SMSSynthesis | ( | ) |
Definition at line 88 of file SMSSynthesis.cxx.
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.
Implements CLAM::ProcessingComposite.
Definition at line 108 of file SMSSynthesis.hxx.
bool CLAM::SMSSynthesis::Do | ( | void | ) | [virtual] |
Supervised mode execution.
Implements CLAM::ProcessingComposite.
Definition at line 184 of file SMSSynthesis.cxx.
References CLAM::AudioOutPort::GetAudio(), CLAM::OutPortBase::HasConnections(), mInputResSpectrum, mInputSinSpectralPeaks, mOutputAudio, mOutputResAudio, mOutputSinAudio, mOutputSinSpectrum, mOutputSpectrum, and CLAM::OutPort< Token >::Produce().
Referenced by Do().
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().
non-supervised Do method: works on a CLAM::Frame
Definition at line 344 of file SMSSynthesis.cxx.
References Do().
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.
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().
InPort<Spectrum> CLAM::SMSSynthesis::mInputResSpectrum [protected] |
OutPort<Spectrum> CLAM::SMSSynthesis::mOutputSinSpectrum [protected] |
OutPort<Spectrum> CLAM::SMSSynthesis::mOutputSpectrum [protected] |
AudioOutPort CLAM::SMSSynthesis::mOutputAudio [protected] |
AudioOutPort CLAM::SMSSynthesis::mOutputResAudio [protected] |
AudioOutPort CLAM::SMSSynthesis::mOutputSinAudio [protected] |