|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.beadsproject.beads.core.Bead
net.beadsproject.beads.analysis.FeatureExtractor<float[][],float[]>
net.beadsproject.beads.analysis.featureextractors.FFT
public class FFT
FFT performs a Fast Fourier Transform and forwards the complex data to any listeners. The complex data is a float of the form float[2][frameSize], with real and imaginary parts stored respectively.
Field Summary | |
---|---|
protected float[] |
fftImag
The imaginary part. |
protected float[] |
fftReal
The real part. |
Fields inherited from class net.beadsproject.beads.analysis.FeatureExtractor |
---|
featureDescriptions, features, name, numFeatures |
Constructor Summary | |
---|---|
FFT()
Instantiates a new FFT. |
Method Summary | |
---|---|
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). |
Methods inherited from class net.beadsproject.beads.analysis.FeatureExtractor |
---|
addListener, forward, getFeatureDescriptions, getFeatures, getName, getNumberOfFeatures, removeListener, setName, setNumberOfFeatures |
Methods inherited from class net.beadsproject.beads.core.Bead |
---|
getKillListener, isDeleted, isPaused, kill, message, messageReceived, pause, setKillListener, start, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected float[] fftReal
protected float[] fftImag
Constructor Detail |
---|
public FFT()
Method Detail |
---|
public void process(TimeStamp startTime, TimeStamp endTime, float[] data)
FeatureExtractor
process
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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |