

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object jAudioFeatureExtractor.jAudioTools.FFT
public class FFT
This class performs a complex to complex Fast Fourier Transform. Forward and inverse transforms may both be performed. The transforms may be performed with or without the application of a Hanning window.
The FFT is performed by this class' constructor. The real and imaginary results are both stored, and the magnitude spectrum, power spectrum and phase angles may also be accessed (along with appropriate frequency bin labels for the magnitude and power spectra).
Constructor Summary  

FFT(double[] real_input,
double[] imaginary_input,
boolean inverse_transform,
boolean use_hanning_window)
Performs the Fourier transform and stores the real and imaginary results. 
Method Summary  

double[] 
getBinLabels(double sampling_rate)
Returns the frequency bin labels for each bin referred to by the real values, imaginary values, magnitudes and phase angles as determined by the given sampling rate. 
double[] 
getImaginaryValues()
Returns the real values as calculated by the FFT. 
double[] 
getMagnitudeSpectrum()
Returns the magnitudes spectrum. 
double[] 
getPhaseAngles()
Returns the phase angle for each frequency bin. 
double[] 
getPowerSpectrum()
Returns the power spectrum. 
double[] 
getRealValues()
Returns the real values as calculated by the FFT. 
Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Constructor Detail 

public FFT(double[] real_input, double[] imaginary_input, boolean inverse_transform, boolean use_hanning_window) throws java.lang.Exception
real_input
 The real part of the signal to be transformed.imaginary_input
 The imaginary part of the signal to be.
transformed. This may be null if the signal
is entirely real.inverse_transform
 A value of false implies that a forward
transform is to be applied, and a value of
true means that an inverse transform is tob
be applied.use_hanning_window
 A value of true means that a Hanning window
will be applied to the real_input. A value
of valse will result in the application of
a Hanning window.
java.lang.Exception
 Throws an exception if the real and imaginary
inputs are of different sizes or if less than
three input samples are provided.Method Detail 

public double[] getMagnitudeSpectrum()
Only the left side of the spectrum is returned, as the folded portion of the spectrum is redundant for the purpose of the magnitude spectrum. This means that the bins only go up to half of the sampling rate.
public double[] getPowerSpectrum()
Only the left side of the spectrum is returned, as the folded portion of the spectrum is redundant for the purpose of the power spectrum. This means that the bins only go up to half of the sampling rate.
public double[] getPhaseAngles()
Only the left side of the spectrum is returned, as the folded portion of the spectrum is redundant for the purpose of the phase angles. This means that the bins only go up to half of the sampling rate.
public double[] getBinLabels(double sampling_rate)
sampling_rate
 The sampling rate that was used to perform
the FFT.
public double[] getRealValues()
public double[] getImaginaryValues()


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 