public class FFT extends FeatureExtractor<float[][],float[]>
| Modifier and Type | Field and Description |
|---|---|
protected float[] |
fftImag
The imaginary part.
|
protected float[] |
fftReal
The real part.
|
featureDescriptions, features, name, numFeatures| Constructor and Description |
|---|
FFT()
Instantiates a new FFT.
|
| Modifier and Type | Method and Description |
|---|---|
static float |
binFrequency(float samplingFrequency,
int blockSize,
float binNumber)
The frequency corresponding to a specific bin
|
static float |
binNumber(float samplingFrequency,
int blockSize,
float freq)
Returns the average bin number corresponding to a particular frequency.
|
protected static float[] |
calculateImaginary(float[] spectrum,
int length)
Gets the imaginary part from the complex spectrum.
|
protected static float[] |
calculateReal(float[] spectrum,
int length)
Gets the real part from the complex spectrum.
|
protected static void |
fft(float[] data,
int n,
boolean isign) |
static float |
nyquist(float samplingFrequency)
The nyquist frequency for this samplingFrequency
|
void |
process(TimeStamp startTime,
TimeStamp endTime,
float[] data)
Process some data of type P (specified by the class def).
|
addListener, forward, getFeatureDescriptions, getFeatures, getName, getNumberOfFeatures, removeListener, setName, setNumberOfFeaturesgetKillListener, isDeleted, isPaused, kill, message, messageReceived, pause, setKillListener, start, toStringprotected float[] fftReal
protected float[] fftImag
public void process(TimeStamp startTime, TimeStamp endTime, float[] data)
FeatureExtractorprocess in class FeatureExtractor<float[][],float[]>data - the data.public static float binFrequency(float samplingFrequency,
int blockSize,
float binNumber)
samplingFrequency - The Sampling Frequency of the AudioContextblockSize - The size of the block analysedbinNumber - public static float binNumber(float samplingFrequency,
int blockSize,
float freq)
samplingFrequency - The Sampling Frequency of the AudioContextblockSize - The size of the fft blockfreq - The frequencypublic static float nyquist(float samplingFrequency)
protected static float[] calculateReal(float[] spectrum,
int length)
spectrum - complex spectrum.length - length of data to use.protected static float[] calculateImaginary(float[] spectrum,
int length)
spectrum - complex spectrum.length - length of data to use.protected static void fft(float[] data,
int n,
boolean isign)