Processing class for performing a STFT. More...
#include <SpectralAnalysis.hxx>
Public Member Functions | |
const char * | GetClassName () const |
Override it in every subclass and retur the name of that class. | |
SpectralAnalysis (SpectralAnalysisConfig &config) | |
SpectralAnalysis () | |
~SpectralAnalysis () | |
const ProcessingConfig & | GetConfig () const |
Configuration getter. | |
bool | Do (void) |
Supervised mode execution. | |
bool | Do (const Audio &in, Spectrum &outSp) |
Basic unsupervised Do method. | |
bool | Do (Frame &in) |
Unsupervised Do method that uses a CLAM Frame as input and output. | |
bool | Do (Segment &in) |
Unsupervised Do method that uses an incoming CLAM Segment as input and output. |
Processing class for performing a STFT.
Its main functionality is to obtain a spectrum out of an incoming audio signal, applying windowing, circular shift and zero padding. Its different
Definition at line 51 of file SpectralAnalysis.hxx.
CLAM::SpectralAnalysis::SpectralAnalysis | ( | SpectralAnalysisConfig & | config | ) |
Definition at line 50 of file SpectralAnalysis.cxx.
References CLAM::Processing::Configure().
CLAM::SpectralAnalysis::SpectralAnalysis | ( | ) |
Definition at line 42 of file SpectralAnalysis.cxx.
References CLAM::Processing::Configure().
CLAM::SpectralAnalysis::~SpectralAnalysis | ( | ) |
Definition at line 58 of file SpectralAnalysis.cxx.
bool CLAM::SpectralAnalysis::Do | ( | Segment & | in | ) |
Unsupervised Do method that uses an incoming CLAM Segment as input and output.
It processes the frame that is indicated by the current frame index in the segment and increments that index.
Definition at line 165 of file SpectralAnalysis.cxx.
References Do(), CLAM::Segment::GetFrame(), and CLAM::Segment::mCurrentFrameIndex.
bool CLAM::SpectralAnalysis::Do | ( | Frame & | in | ) |
Basic unsupervised Do method.
It returns an output spectrum using an input audio frame
Definition at line 134 of file SpectralAnalysis.cxx.
References CLAM::CircularShift::Do(), CLAM::BinaryAudioOp< BinOp >::Do(), CLAM::Audio::GetAudioChunk(), CLAM::Audio::GetSize(), CLAM::SpectralAnalysisConfig::GetWindowSize(), and CLAM::Audio::SetSize().
bool CLAM::SpectralAnalysis::Do | ( | void | ) | [virtual] |
Supervised mode execution.
Implements CLAM::ProcessingComposite.
Definition at line 121 of file SpectralAnalysis.cxx.
References CLAM::InPort< Token >::Consume(), CLAM::AudioInPort::GetAudio(), CLAM::OutPort< Token >::GetData(), CLAM::OutPort< Token >::Produce(), and CLAM::Spectrum::SetSize().
Referenced by Do(), and CLAM::SMSAnalysisCore::Do().
const char* CLAM::SpectralAnalysis::GetClassName | ( | ) | const [inline, virtual] |
Override it in every subclass and retur the name of that class.
Reimplemented from CLAM::ProcessingComposite.
Definition at line 58 of file SpectralAnalysis.hxx.
const ProcessingConfig& CLAM::SpectralAnalysis::GetConfig | ( | ) | const [inline, virtual] |
Configuration getter.
Gets the configuration parameters used to create the object.
Implements CLAM::ProcessingComposite.
Definition at line 66 of file SpectralAnalysis.hxx.