public class DFT extends FourierTransform
timeSize and will throw and IllegalArgumentException if this
is not the case.FourierTransform,
FFT,
The Discrete Fourier Transformaverages, avgPerOctave, bandWidth, BARTLETT, BARTLETTHANN, BLACKMAN, COSINE, GAUSS, HAMMING, HANN, imag, LANCZOS, LINAVG, LOGAVG, NOAVG, NONE, octaves, real, sampleRate, spectrum, timeSize, TRIANGULAR, TWO_PI, whichAverage, windowFunction| Constructor and Description |
|---|
DFT(int timeSize,
float sampleRate)
Constructs a DFT that expects audio buffers of length
timeSize that
have been recorded with a sample rate of sampleRate. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
allocateArrays() |
void |
forward(float[] samples)
Performs a forward transform on
buffer. |
void |
inverse(float[] buffer)
Performs an inverse transform of the frequency spectrum and places the
result in
buffer. |
void |
scaleBand(int i,
float s)
Not currently implemented.
|
void |
setBand(int i,
float a)
Not currently implemented.
|
avgSize, calcAvg, doWindow, fillSpectrum, forward, forward, forward, freqToIndex, getAverageCenterFrequency, getAvg, getBand, getBandWidth, getFreq, getSpectrumImaginary, getSpectrumReal, indexToFreq, inverse, inverse, linAverages, logAverages, noAverages, scaleFreq, setComplex, setFreq, specSize, timeSize, windowpublic DFT(int timeSize,
float sampleRate)
timeSize that
have been recorded with a sample rate of sampleRate. Will throw an
IllegalArgumentException if timeSize is not even.timeSize - the length of the audio buffers you plan to analyzesampleRate - the sample rate of the audio samples you plan to analyzeprotected void allocateArrays()
allocateArrays in class FourierTransformpublic void scaleBand(int i,
float s)
scaleBand in class FourierTransformi - the frequency band to modifys - the scaling factorpublic void setBand(int i,
float a)
setBand in class FourierTransformi - the frequency band to modifya - the new amplitudepublic void forward(float[] samples)
FourierTransformbuffer.forward in class FourierTransformsamples - the buffer to analyzepublic void inverse(float[] buffer)
FourierTransformbuffer.inverse in class FourierTransformbuffer - the buffer to place the result of the inverse transform in