Marsyas  0.5.0-beta1
Public Member Functions
Spectrum Class Reference

Compute the complex spectrum of input window. More...

#include <Spectrum.h>

Inherits MarSystem.

Public Member Functions

MarSystemclone () const
void myProcess (realvec &in, realvec &out)
 Processes data.
 Spectrum (std::string name)
 Spectrum (const Spectrum &)
 ~Spectrum ()

Detailed Description

Compute the complex spectrum of input window.

Computes the complex spectrum (N/2+1 points) of the input window using the Fast Fourier Transform (FFT). The output is a N-sized column vector (where N is the size of the input audio vector), using the following format:

[Re(0), Re(N/2), Re(1), Im(1), Re(2), Im(2), ..., Re(N/2-1), Im(N/2-1)]

Note that the DC and Nyquist frequencies only have real part, and are output as the two first coefficients in the vector. Overall, the output spectrum has N/2+1 unique points, corresponding to the positive half of the complex spectrum.

Note:
Only the first observation input channel is processed, the rest (if any) is ignored.
See also:
PowerSpectrum, fft

Definition at line 50 of file Spectrum.h.


Constructor & Destructor Documentation

Spectrum ( std::string  name)

Definition at line 34 of file Spectrum.cpp.

Spectrum ( const Spectrum a)

Definition at line 51 of file Spectrum.cpp.

~Spectrum ( )

Definition at line 47 of file Spectrum.cpp.


Member Function Documentation

MarSystem * clone ( ) const [virtual]

Implements MarSystem.

Definition at line 75 of file Spectrum.cpp.

void myProcess ( realvec in,
realvec out 
) [virtual]

Processes data.

Parameters:
inInput data to read.
outOutput data to write.

Implement this method in subclass to define specific data processing.

Implements MarSystem.

Definition at line 150 of file Spectrum.cpp.


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