Retrives the spectrum using FFT.
More...
#include <spectrum.h>
List of all members.
Public Types |
| enum | FTWindow { WINDOW_RECTANGULAR,
WINDOW_TRIANGULAR,
WINDOW_HAMMING,
WINDOW_BH
} |
|
typedef enum FTWindow | FTWindow |
Public Member Functions |
| | SpectrumExtr (int chunkSize=0) |
| | Memory management.
|
| void | reallocate () |
| | Reallocate buffers based on the new size (plus butterfly computation)
|
|
| ~SpectrumExtr () |
| | Cleans everything up.
|
| bool | extract (std::deque< uint16_t > data, int size) |
| | Algorithm.
|
|
void | normalize (int bound) |
| | Normalize the values (so that the values go from 0 to bound)
|
| float | value (int index) |
| | Accessors.
|
|
uint16_t * | spectrum () |
| | Retrieve the entire array.
|
|
int | size () |
| | Get the number of available values.
|
|
float | min () |
| | Lower bound on outputted values.
|
|
float | max () |
| | Upper bound on outputted values.
|
|
void | setFloat (string key, float value) |
| | Set a double parameter (available : none)
|
|
void | setInt (string key, int value) |
| | Set a int parameter (available : "bound")
|
|
float | getFloat (string key) |
| | Get a double parameter (available : none)
|
|
int | getInt (string key) |
| | Get a int parameter (available : "bound")
|
|
void | setWindow (FTWindow win) |
| | Change the window (the default is WINDOW_RECTANGULAR)
|
|
void | watch () |
| | Watching thread.
|
Detailed Description
Retrives the spectrum using FFT.
- Todo:
- Implement overlapping : the results would be better if the frames were overlapping a bit (2/3) See http://oxygene.sk/lukas/2011/01/how-does-chromaprint-work/
Constructor & Destructor Documentation
| SpectrumExtr::SpectrumExtr |
( |
int |
chunkSize = 0 | ) |
|
Memory management.
Inits the FFT algorithm
Member Function Documentation
| bool SpectrumExtr::extract |
( |
std::deque< uint16_t > |
data, |
|
|
int |
size |
|
) |
| |
|
virtual |
| void SpectrumExtr::reallocate |
( |
| ) |
|
Reallocate buffers based on the new size (plus butterfly computation)
Create a new window cache
| float SpectrumExtr::value |
( |
int |
index | ) |
|
|
virtual |
The documentation for this class was generated from the following files:
- include/features/spectrum.h
- src/features/spectrum.cpp