GestureRecognitionToolkit  Version: 0.1.0
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
FFT Class Reference

#include <FFT.h>

Inheritance diagram for FFT:
FeatureExtraction MLBase GRTBase Observer< TrainingResult > Observer< TestInstanceResult >

Public Types

enum  FFTWindowFunctionOptions { RECTANGULAR_WINDOW =0, BARTLETT_WINDOW, HAMMING_WINDOW, HANNING_WINDOW }
 
- Public Types inherited from FeatureExtraction
typedef std::map< std::string, FeatureExtraction *(*)() > StringFeatureExtractionMap
 
- Public Types inherited from MLBase
enum  BaseTypes { BASE_TYPE_NOT_SET =0, CLASSIFIER, REGRESSIFIER, CLUSTERER }
 

Public Member Functions

 FFT (UINT fftWindowSize=512, UINT hopSize=1, UINT numDimensions=1, UINT fftWindowFunction=RECTANGULAR_WINDOW, bool computeMagnitude=true, bool computePhase=true)
 
 FFT (const FFT &rhs)
 
virtual ~FFT (void)
 
FFToperator= (const FFT &rhs)
 
virtual bool deepCopyFrom (const FeatureExtraction *featureExtraction)
 
virtual bool computeFeatures (const VectorFloat &inputVector)
 
virtual bool computeFeatures (const MatrixFloat &inputMatrix)
 
virtual bool clear ()
 
virtual bool reset ()
 
virtual bool saveModelToFile (std::fstream &file) const
 
virtual bool loadModelFromFile (std::fstream &file)
 
bool init (UINT fftWindowSize, UINT hopSize, UINT numDimensions, UINT windowFunction, bool computeMagnitude, bool computePhase, DataType inputType=DATA_TYPE_VECTOR, DataType outputType=DATA_TYPE_VECTOR)
 
bool update (const Float x)
 
bool update (const VectorFloat &x)
 
bool update (const MatrixFloat &x)
 
UINT getHopSize ()
 
UINT getDataBufferSize ()
 
UINT getFFTWindowSize ()
 
UINT getFFTWindowFunction ()
 
UINT getHopCounter ()
 
bool getComputeMagnitude ()
 
bool getComputePhase ()
 
Vector< FastFourierTransformgetFFTResults ()
 
Vector< FastFourierTransform > & getFFTResultsPtr ()
 
VectorFloat getFrequencyBins (const unsigned int sampleRate)
 
bool setHopSize (UINT hopSize)
 
bool setFFTWindowSize (UINT fftWindowSize)
 
bool setFFTWindowFunction (UINT fftWindowFunction)
 
bool setComputeMagnitude (bool computeMagnitude)
 
bool setComputePhase (bool computePhase)
 
- Public Member Functions inherited from FeatureExtraction
 FeatureExtraction ()
 
virtual ~FeatureExtraction ()
 
bool copyBaseVariables (const FeatureExtraction *featureExtractionModule)
 
std::string getFeatureExtractionType () const
 
UINT getNumInputDimensions () const
 
UINT getNumOutputDimensions () const
 
bool getInitialized () const
 
bool getFeatureDataReady () const
 
const VectorFloatgetFeatureVector () const
 
const MatrixFloatgetFeatureMatrix () const
 
FeatureExtractioncreateNewInstance () const
 
- Public Member Functions inherited from MLBase
 MLBase (void)
 
virtual ~MLBase (void)
 
bool copyMLBaseVariables (const MLBase *mlBase)
 
virtual bool train (ClassificationData trainingData)
 
virtual bool train_ (ClassificationData &trainingData)
 
virtual bool train (RegressionData trainingData)
 
virtual bool train_ (RegressionData &trainingData)
 
virtual bool train (TimeSeriesClassificationData trainingData)
 
virtual bool train_ (TimeSeriesClassificationData &trainingData)
 
virtual bool train (ClassificationDataStream trainingData)
 
virtual bool train_ (ClassificationDataStream &trainingData)
 
virtual bool train (UnlabelledData trainingData)
 
virtual bool train_ (UnlabelledData &trainingData)
 
virtual bool train (MatrixFloat data)
 
virtual bool train_ (MatrixFloat &data)
 
virtual bool predict (VectorFloat inputVector)
 
virtual bool predict_ (VectorFloat &inputVector)
 
virtual bool predict (MatrixFloat inputMatrix)
 
virtual bool predict_ (MatrixFloat &inputMatrix)
 
virtual bool map (VectorFloat inputVector)
 
virtual bool map_ (VectorFloat &inputVector)
 
virtual bool print () const
 
virtual bool save (const std::string filename) const
 
virtual bool load (const std::string filename)
 
virtual bool saveModelToFile (std::string filename) const
 
virtual bool loadModelFromFile (std::string filename)
 
virtual bool getModel (std::ostream &stream) const
 
Float scale (const Float &x, const Float &minSource, const Float &maxSource, const Float &minTarget, const Float &maxTarget, const bool constrain=false)
 
virtual std::string getModelAsString () const
 
DataType getInputType () const
 
DataType getOutputType () const
 
UINT getBaseType () const
 
UINT getNumInputFeatures () const
 
UINT getNumInputDimensions () const
 
UINT getNumOutputDimensions () const
 
UINT getMinNumEpochs () const
 
UINT getMaxNumEpochs () const
 
UINT getValidationSetSize () const
 
UINT getNumTrainingIterationsToConverge () const
 
Float getMinChange () const
 
Float getLearningRate () const
 
Float getRootMeanSquaredTrainingError () const
 
Float getTotalSquaredTrainingError () const
 
Float getValidationSetAccuracy () const
 
VectorFloat getValidationSetPrecision () const
 
VectorFloat getValidationSetRecall () const
 
bool getUseValidationSet () const
 
bool getRandomiseTrainingOrder () const
 
bool getTrained () const
 
bool getModelTrained () const
 
bool getScalingEnabled () const
 
bool getIsBaseTypeClassifier () const
 
bool getIsBaseTypeRegressifier () const
 
bool getIsBaseTypeClusterer () const
 
bool enableScaling (const bool useScaling)
 
bool setMaxNumEpochs (const UINT maxNumEpochs)
 
bool setMinNumEpochs (const UINT minNumEpochs)
 
bool setMinChange (const Float minChange)
 
bool setLearningRate (const Float learningRate)
 
bool setUseValidationSet (const bool useValidationSet)
 
bool setValidationSetSize (const UINT validationSetSize)
 
bool setRandomiseTrainingOrder (const bool randomiseTrainingOrder)
 
bool setTrainingLoggingEnabled (const bool loggingEnabled)
 
bool registerTrainingResultsObserver (Observer< TrainingResult > &observer)
 
bool registerTestResultsObserver (Observer< TestInstanceResult > &observer)
 
bool removeTrainingResultsObserver (const Observer< TrainingResult > &observer)
 
bool removeTestResultsObserver (const Observer< TestInstanceResult > &observer)
 
bool removeAllTrainingObservers ()
 
bool removeAllTestObservers ()
 
bool notifyTrainingResultsObservers (const TrainingResult &data)
 
bool notifyTestResultsObservers (const TestInstanceResult &data)
 
MLBasegetMLBasePointer ()
 
const MLBasegetMLBasePointer () const
 
Vector< TrainingResult > getTrainingResults () const
 
- Public Member Functions inherited from GRTBase
 GRTBase (void)
 
virtual ~GRTBase (void)
 
bool copyGRTBaseVariables (const GRTBase *GRTBase)
 
std::string getClassType () const
 
std::string getLastWarningMessage () const
 
std::string getLastErrorMessage () const
 
std::string getLastInfoMessage () const
 
bool setInfoLoggingEnabled (const bool loggingEnabled)
 
bool setWarningLoggingEnabled (const bool loggingEnabled)
 
bool setErrorLoggingEnabled (const bool loggingEnabled)
 
GRTBasegetGRTBasePointer ()
 
const GRTBasegetGRTBasePointer () const
 
- Public Member Functions inherited from Observer< TrainingResult >
virtual void notify (const TrainingResult &data)
 
- Public Member Functions inherited from Observer< TestInstanceResult >
virtual void notify (const TestInstanceResult &data)
 

Protected Member Functions

bool isPowerOfTwo (UINT x)
 A helper function to compute if the input is a power of two.
 
bool validateFFTWindowFunction (UINT fftWindowFunction)
 
- Protected Member Functions inherited from FeatureExtraction
bool init ()
 
bool saveFeatureExtractionSettingsToFile (std::fstream &file) const
 
bool loadFeatureExtractionSettingsFromFile (std::fstream &file)
 
- Protected Member Functions inherited from MLBase
bool saveBaseSettingsToFile (std::fstream &file) const
 
bool loadBaseSettingsFromFile (std::fstream &file)
 
- Protected Member Functions inherited from GRTBase
Float SQR (const Float &x) const
 

Protected Attributes

UINT hopSize
 The current hopSize, this sets how often the fft should be computed.
 
UINT dataBufferSize
 Stores how much previous input data is stored in the dataBuffer.
 
UINT fftWindowSize
 Stores the size of the fft (and also the dataBuffer)
 
UINT fftWindowFunction
 The current windowFunction used for the FFT.
 
UINT hopCounter
 Keeps track of how many input samples the FFT has seen.
 
bool computeMagnitude
 Tracks if the magnitude (and power) of the FFT need to be computed.
 
bool computePhase
 Tracks if the phase of the FFT needs to be computed.
 
VectorFloat tempBuffer
 A temporary buffer used to store the input data for the FFT.
 
CircularBuffer< VectorFloatdataBuffer
 A circular buffer used to store the previous M inputs.
 
Vector< FastFourierTransformfft
 A buffer used to store the FFT results.
 
std::map< unsigned int, unsigned int > windowSizeMap
 A map to relate the FFTWindowSize enumerations to actual values.
 
- Protected Attributes inherited from FeatureExtraction
std::string featureExtractionType
 
bool initialized
 
bool featureDataReady
 
VectorFloat featureVector
 
MatrixFloat featureMatrix
 
- Protected Attributes inherited from MLBase
bool trained
 
bool useScaling
 
DataType inputType
 
DataType outputType
 
UINT baseType
 
UINT numInputDimensions
 
UINT numOutputDimensions
 
UINT numTrainingIterationsToConverge
 
UINT minNumEpochs
 
UINT maxNumEpochs
 
UINT validationSetSize
 
Float learningRate
 
Float minChange
 
Float rootMeanSquaredTrainingError
 
Float totalSquaredTrainingError
 
Float validationSetAccuracy
 
bool useValidationSet
 
bool randomiseTrainingOrder
 
VectorFloat validationSetPrecision
 
VectorFloat validationSetRecall
 
Random random
 
std::vector< TrainingResult > trainingResults
 
TrainingResultsObserverManager trainingResultsObserverManager
 
TestResultsObserverManager testResultsObserverManager
 
- Protected Attributes inherited from GRTBase
std::string classType
 
DebugLog debugLog
 
ErrorLog errorLog
 
InfoLog infoLog
 
TrainingLog trainingLog
 
TestingLog testingLog
 
WarningLog warningLog
 

Static Protected Attributes

static RegisterFeatureExtractionModule< FFTregisterModule
 

Additional Inherited Members

- Static Public Member Functions inherited from FeatureExtraction
static FeatureExtractioncreateInstanceFromString (const std::string &featureExtractionType)
 
- Static Public Member Functions inherited from GRTBase
static std::string getGRTVersion (bool returnRevision=true)
 
static std::string getGRTRevison ()
 
- Static Protected Member Functions inherited from FeatureExtraction
static StringFeatureExtractionMapgetMap ()
 

Detailed Description

GRT MIT License Copyright (c) <2012> <Nicholas Gillian, Media Lab, MIT>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Definition at line 56 of file FFT.h.

Constructor & Destructor Documentation

FFT::FFT ( UINT  fftWindowSize = 512,
UINT  hopSize = 1,
UINT  numDimensions = 1,
UINT  fftWindowFunction = RECTANGULAR_WINDOW,
bool  computeMagnitude = true,
bool  computePhase = true 
)

Constructor, sets the fftWindowSize, hopSize, fftWindowFunction, if the magnitude and phase should be computed during the FFT and the number of dimensions in the input signal.

Parameters
fftWindowSizesets the size of the fft, this should be a power of two. Default fftWindowSize=512
hopSizesets how often the fft should be computed. If the hopSize parameter is set to 1 then the FFT will be computed everytime the classes computeFeatures(...) or computeFFT(...) functions are called. You may not want to compute the FFT of the input signal for every sample however, if this is the case then set the hopSize parameter to N, in which case the FFT will only be computed every N samples on the previous M values, where M is equal to the fftWindowSize. Default hopSize=1
numDimensionsthe dimensionality of the input data to the FFT. Default numDimensions = 1
fftWindowFunctionsets the window function of the FFT. This should be one of the FFTWindowFunctionOptions enumeration values. Default windowFunction=RECTANGULAR_WINDOW
computeMagnitudesets if the magnitude (and power) of the spectrum should be computed on the results of the FFT. Default computeMagnitude=true
computePhasesets if the phase of the spectrum should be computed on the results of the FFT. Default computePhase=true

Definition at line 28 of file FFT.cpp.

FFT::FFT ( const FFT rhs)

Copy Constructor, copies the FFT from the rhs instance to this instance

Parameters
rhsanother instance of the FFT class from which the data will be copied to this instance

Definition at line 47 of file FFT.cpp.

FFT::~FFT ( void  )
virtual

Default Destructor

Definition at line 56 of file FFT.cpp.

Member Function Documentation

bool FFT::clear ( )
virtual

Sets the FeatureExtraction clear function, overwriting the base FeatureExtraction function. This function is called by the GestureRecognitionPipeline when the pipelines main clear() function is called. This function completely clears the FFT setup, you will need to initialize the instance again before you can use it.

Returns
true if the FFT was reset, false otherwise

Reimplemented from FeatureExtraction.

Definition at line 391 of file FFT.cpp.

bool FFT::computeFeatures ( const VectorFloat inputVector)
virtual

Sets the FeatureExtraction computeFeatures function, overwriting the base FeatureExtraction function. This function is called by the GestureRecognitionPipeline when any new input data needs to be processed (during the prediction phase for example). This function calls the FFT's computeFFT(...) function.

Parameters
inputVectorthe inputVector that should be processed. Must have the same dimensionality as the FeatureExtraction module
Returns
true if the data was processed, false otherwise

Reimplemented from FeatureExtraction.

Definition at line 249 of file FFT.cpp.

bool FFT::computeFeatures ( const MatrixFloat inputMatrix)
virtual

Sets the FeatureExtraction computeFeatures function, overwriting the base FeatureExtraction function. This function is called by the GestureRecognitionPipeline when any new input data needs to be processed (during the prediction phase for example). This function calls the FFT's computeFFT(...) function.

Parameters
inputMatrixthe inputMatrix that should be processed. Must have the same dimensionality as the FeatureExtraction module
Returns
true if the data was processed, false otherwise

Reimplemented from FeatureExtraction.

Definition at line 253 of file FFT.cpp.

bool FFT::deepCopyFrom ( const FeatureExtraction featureExtraction)
virtual

Sets the FeatureExtraction deepCopyFrom function, overwriting the base FeatureExtraction function. This function is used to deep copy the values from the input pointer to this instance of the FeatureExtraction module. This function is called by the GestureRecognitionPipeline when the user adds a new FeatureExtraction module to the pipeline.

Parameters
featureExtractiona pointer to another instance of an FFT, the values of that instance will be cloned to this instance
Returns
true if the deep copy was successful, false otherwise

Reimplemented from FeatureExtraction.

Definition at line 84 of file FFT.cpp.

bool FFT::getComputeMagnitude ( )
inline

Returns if the magnitude (and power) of the FFT spectrum is being computed.

Returns
true if the magnitude (and power) of the FFT spectrum is being computed and if the FFT has been initialized, otherwise false will be returned

Definition at line 249 of file FFT.h.

bool FFT::getComputePhase ( )
inline

Returns if the phase of the FFT spectrum is being computed.

Returns
true if the phase of the FFT spectrum is being computed and if the FFT has been initialized, otherwise false will be returned

Definition at line 256 of file FFT.h.

UINT FFT::getDataBufferSize ( )

Returns the current dataBufferSize, which is the same as the FFT window size.

Returns
returns the current dataBufferSize value if the FFT has been initialized, otherwise zero will be returned

Definition at line 414 of file FFT.cpp.

Vector< FastFourierTransform > FFT::getFFTResults ( )
inline

Returns the FFT results computed from the last FFT of the input signal.

Returns
returns a vector of FastFourierTransform (where the size of the vector is equal to the number of input dimensions for the FFT). An empty vector will be returned if the FFT was not computed

Definition at line 263 of file FFT.h.

Vector< FastFourierTransform >& FFT::getFFTResultsPtr ( )
inline

Returns a pointer to the FFT results computed from the last FFT of the input signal.

Returns
returns a pointer to the vector of FastFourierTransform (where the size of the vector is equal to the number of input dimensions for the FFT). An empty vector will be returned if the FFT was not computed

Definition at line 270 of file FFT.h.

UINT FFT::getFFTWindowFunction ( )

Returns the current FFT window function enumeration value.

Returns
returns the current FFT window function value if the FFT has been initialized, otherwise zero will be returned

Definition at line 425 of file FFT.cpp.

UINT FFT::getFFTWindowSize ( )

Returns the FFT window size.

Returns
returns the current FFT window size value if the FFT has been initialized, otherwise zero will be returned

Definition at line 419 of file FFT.cpp.

UINT FFT::getHopCounter ( )

Returns the current hop counter value.

Returns
returns the current hop counter value if the FFT has been initialized, otherwise zero will be returned

Definition at line 430 of file FFT.cpp.

UINT FFT::getHopSize ( )

Returns the current hopSize.

Returns
returns the current hopSize value if the FFT has been initialized, otherwise zero will be returned

Definition at line 409 of file FFT.cpp.

bool FFT::init ( UINT  fftWindowSize,
UINT  hopSize,
UINT  numDimensions,
UINT  windowFunction,
bool  computeMagnitude,
bool  computePhase,
DataType  inputType = DATA_TYPE_VECTOR,
DataType  outputType = DATA_TYPE_VECTOR 
)

Initializes the FFT. Should be called before calling the computeFFT(...) or computeFeatures(...) methods. This function is automatically called by the constructor.

Parameters
fftWindowSizesets the size of the fft, this must be a power of two
hopSizesets how often the fft should be computed. If the hopSize parameter is set to 1 then the FFT will be computed everytime the classes computeFeatures(...) or computeFFT(...) functions are called. You may not want to compute the FFT of the input signal for every sample however, if this is the case then set the hopSize parameter to N, in which case the FFT will only be computed every N samples on the previous M values, where M is equal to the fftWindowSize
numDimensionsthe dimensionality of the input data to the FFT
windowFunctionsets the window function of the FFT. This should be one of the WindowFunctionOptions enumeration values
computeMagnitudesets if the magnitude (and power) of the spectrum should be computed on the results of the FFT
computePhasesets if the phase of the spectrum should be computed on the results of the FFT
inputTypethe input type expected, defaults to DATA_TYPE_VECTOR
outputTypethe output type that can be accessed by users of the module, defaults to DATA_TYPE_VECTOR
Returns
true if the FTT was initialized, false otherwise

Definition at line 188 of file FFT.cpp.

bool FFT::loadModelFromFile ( std::fstream &  file)
virtual

This loads the feature extraction settings from a file. This overrides the loadSettingsFromFile function in the FeatureExtraction base class.

Parameters
filea reference to the file to load the settings from
Returns
returns true if the settings were loaded successfully, false otherwise

Reimplemented from FeatureExtraction.

Definition at line 127 of file FFT.cpp.

FFT & FFT::operator= ( const FFT rhs)

Sets the equals operator, copies the data from the rhs instance to this instance

Parameters
rhsanother instance of the FFT class from which the data will be copied to this instance
Returns
a reference to this instance of FFT

Definition at line 59 of file FFT.cpp.

bool FFT::reset ( )
virtual

Sets the FeatureExtraction reset function, overwriting the base FeatureExtraction function. This function is called by the GestureRecognitionPipeline when the pipelines main reset() function is called. This function resets the FFT by re-initiliazing the instance.

Returns
true if the FFT was reset, false otherwise

Reimplemented from FeatureExtraction.

Definition at line 404 of file FFT.cpp.

bool FFT::saveModelToFile ( std::fstream &  file) const
virtual

This saves the feature extraction settings to a file. This overrides the saveSettingsToFile function in the FeatureExtraction base class.

Parameters
filea reference to the file to save the settings to
Returns
returns true if the settings were saved successfully, false otherwise

Reimplemented from FeatureExtraction.

Definition at line 101 of file FFT.cpp.

bool FFT::setComputeMagnitude ( bool  computeMagnitude)

Sets if the magnitude (and power) of the FFT spectrum should be computed.

Parameters
computeMagnitudethe new computeMagnitude parameter
Returns
returns true if the computeMagnitude parameter was successfully updated, false otherwise

Definition at line 474 of file FFT.cpp.

bool FFT::setComputePhase ( bool  computePhase)

Sets if the phase of the FFT spectrum should be computed.

Parameters
computePhasethe new computeMagnitude parameter
Returns
returns true if the computePhase parameter was successfully updated, false otherwise

Definition at line 480 of file FFT.cpp.

bool FFT::setFFTWindowFunction ( UINT  fftWindowFunction)

Sets the fftWindowFunction parameter, this should be one of the FFTWindowFunctionOptions enumeration values.

Parameters
fftWindowFunctionthe new fftWindowFunction parameter, must be one of the FFTWindowFunctionOptions enumeration values
Returns
returns true if the fftWindowFunction parameter was successfully updated, false otherwise

Definition at line 466 of file FFT.cpp.

bool FFT::setFFTWindowSize ( UINT  fftWindowSize)

Sets the fftWindowSize parameter, this sets the size of the fft, this must be a power of two. Setting this value will also re-initialize the FFT.

Parameters
fftWindowSizethe new fftWindowSize parameter, this must be a power of two.
Returns
returns true if the fftWindowSize parameter was successfully updated, false otherwise

Definition at line 455 of file FFT.cpp.

bool FFT::setHopSize ( UINT  hopSize)

Sets the hopSize parameter, this sets how often the fft should be computed. If the hopSize parameter is set to 1 then the FFT will be computed everytime the classes' computeFeatures(...) or computeFFT(...) functions are called. You may not want to compute the FFT of the input signal for every sample however, if this is the case then set the hopSize parameter to N, in which case the FFT will only be computed every N samples on the previous M values, where M is equal to the fftWindowSize. The hopSize must be greater than zero. Setting the hopSize will also reset the hop counter.

Parameters
hopSizethe new hopSize parameter, must be greater than zero
Returns
returns true if the hopSize parameter was successfully updated, false otherwise

Definition at line 445 of file FFT.cpp.

bool FFT::update ( const Float  x)

Computes the FFT of the previous M input samples, where M is the size of the fft window set by the constructor. The FFT of the input will only be computed if the current hop counter value matches the hopSize. This function should only be used if the dimensionality of the FFT has been set to 1.

Parameters
xthe new sample, this will be added to a buffer and the FFT will be computed for the data in the buffer
Returns
true if the FTT was updated successfully, false otherwise

Definition at line 257 of file FFT.cpp.

bool FFT::update ( const VectorFloat x)

Computes the FFT of the previous M input samples, where M is the size of the fft window set by the constructor. The FFT of the input will only be computed if the current hop counter value matches the hopSize. The dimensionality of the input vector must match the number of dimensions for the FFT.

Parameters
xthe new N-dimensional sample, this will be added to a buffer and the FFT will be computed for the data in the buffer
Returns
true if the FTT was updated successfully, false otherwise

Definition at line 272 of file FFT.cpp.

bool FFT::update ( const MatrixFloat x)

Computes the FFT of the previous M input samples, where M is the size of the fft window set by the constructor. The FFT of the input will only be computed if the current hop counter value matches the hopSize. The number of columns in the input matrix must match the number of dimensions for the FFT.

Parameters
xa [M N] matrix, this will be added to a buffer and the FFT will be computed for the data in the buffer
Returns
true if the FTT was updated successfully, false otherwise

Definition at line 330 of file FFT.cpp.


The documentation for this class was generated from the following files: