|
CLAM-Development
1.3
|
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 | ( | const Config & | cfg = Config() | ) |
Definition at line 47 of file SinusoidalSynthesis.cxx.
References CLAM::Processing::Configure().
Definition at line 59 of file SinusoidalSynthesis.cxx.
| bool CLAM::SinusoidalSynthesis::Do | ( | void | ) | [virtual] |
Supervised mode execution.
Implements CLAM::ProcessingComposite.
Definition at line 115 of file SinusoidalSynthesis.cxx.
References CLAM::InPort< Token >::Consume(), CLAM::AudioOutPort::GetAudio(), CLAM::InPort< Token >::GetData(), CLAM::OutPort< Token >::GetData(), 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 143 of file SinusoidalSynthesis.cxx.
References CLAM::PhaseManagement::Do(), CLAM::SynthSineSpectrum::Do(), CLAM::OverlapAdd::Do(), CLAM::SpectralSynthesis::Do(), CLAM::InControl< ControlDataType >::DoControl(), CLAM::InControl< ControlDataType >::GetLastValue(), CLAM::SMSSynthesisConfig::GetSamplingRate(), CLAM::Audio::GetSize(), CLAM::SMSSynthesisConfig::GetSpectrumSize(), CLAM::PhaseManagement::mCurrentPitch, 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 131 of file SinusoidalSynthesis.cxx.
References Do().
| bool CLAM::SinusoidalSynthesis::Do | ( | Frame & | in | ) |
non-supervised Do method: works on a CLAM::Frame
Definition at line 183 of file SinusoidalSynthesis.cxx.
References Do(), CLAM::InControl< ControlDataType >::DoControl(), CLAM::SMSSynthesisConfig::GetSpectrumSize(), InitFrame(), and mCurrentPitch.
| 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 204 of file SinusoidalSynthesis.cxx.
References Do(), CLAM::Segment::GetFrame(), and CLAM::Segment::mCurrentFrameIndex.
| 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 210 of file SinusoidalSynthesis.cxx.
References CLAM::SMSSynthesisConfig::GetFrameSize(), and CLAM::DynamicType::UpdateData().
Referenced by Do().
Definition at line 142 of file SinusoidalSynthesis.hxx.
Referenced by Do().
Definition at line 141 of file SinusoidalSynthesis.hxx.
Referenced by Do().
AudioOutPort CLAM::SinusoidalSynthesis::mOutputAudio [protected] |
Definition at line 137 of file SinusoidalSynthesis.hxx.
Referenced by Do().
OutPort<Spectrum> CLAM::SinusoidalSynthesis::mOutputSinSpectrum [protected] |
Definition at line 135 of file SinusoidalSynthesis.hxx.
Referenced by Do().
OutPort<Spectrum> CLAM::SinusoidalSynthesis::mOutputSpectrum [protected] |
Definition at line 136 of file SinusoidalSynthesis.hxx.
Referenced by Do().
1.7.6.1