

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object marytts.util.math.FFT
public class FFT
Constructor Summary  

FFT()

Method Summary  

static double[] 
autoCorrelate(double[] signal)
Compute the autocorrelation of a signal, by inverse transformation of its power spectrum. 
static double[] 
autoCorrelateWithZeroPadding(double[] signal)
Compute the autocorrelation of a signal, by inverse transformation of its power spectrum. 
static double[] 
computeAmplitudeSpectrum_FD(double[] fft)
From the result of the FFT (in the frequency domain), compute the absolute value for each positive frequency, i.e. 
static double[] 
computeAmplitudeSpectrum(double[] signal)
Convenience method for computing the absolute amplitude spectrum of a real signal. 
static double[] 
computeLogAmplitudeSpectrum_FD(double[] fft)
From the result of the FFT (in the frequency domain), compute the log amplitude for each positive frequency. 
static double[] 
computeLogAmplitudeSpectrum(double[] signal)
Convenience method for computing the log amplitude spectrum of a real signal. 
static double[] 
computeLogPowerSpectrum_FD(double[] fft)
From the result of the FFT, compute the log (dB) power for each positive frequency. 
static double[] 
computeLogPowerSpectrum(double[] signal)
Convenience method for computing the log (dB) power spectrum of a real signal. 
static double[] 
computePhaseSpectrum_FD(double[] fft)
From the result of the FFT (in the frequency domain), compute the phase spectrum for each positive frequency. 
static double[] 
computePowerSpectrum_FD(double[] fft)
From the result of the FFT (in the frequency domain), compute the power for each positive frequency. 
static double[] 
computePowerSpectrum(double[] signal)
Convenience method for computing the absolute power spectrum of a real signal. 
static double[] 
convolve_FD(double[] signal1,
double[] fft2)
Compute the convolution of two signals, by multiplying them in the frequency domain. 
static double[] 
convolve_FD(double[] signal1,
double[] fft2,
double deltaT)
Compute the convolution of two signals, by multiplying them in the frequency domain. 
static double[] 
convolve(double[] signal1,
double[] signal2)
Compute the convolution of two signals, by multiplying them in the frequency domain. 
static double[] 
convolve(double[] signal1,
double[] signal2,
double deltaT)
Compute the convolution of two signals, by multiplying them in the frequency domain. 
static double[] 
convolveWithZeroPadding(double[] signal1,
double[] signal2)
Compute the convolution of two signals, by multipying them in the frequency domain. 
static double[] 
convolveWithZeroPadding(double[] signal1,
double[] signal2,
double deltaT)
Compute the convolution of two signals, by multipying them in the frequency domain. 
static double[] 
correlate(double[] signal1,
double[] signal2)
Compute the correlation of two signals, by multiplying the transform of signal2 with the conjugate complex of the transform of signal1, in the frequency domain. 
static double[] 
correlateWithZeroPadding(double[] signal1,
double[] signal2)
Compute the correlation of two signals, by multipying them in the frequency domain. 
static void 
main(java.lang.String[] args)

static void 
realTransform(double[] data,
boolean inverse)
Calculates the Fourier transform of a set of n realvalued data points. 
static void 
transform(double[] realAndImag,
boolean inverse)
Carry out the FFT or inverse FFT, and return the result in the same arrays given as parameters. 
static void 
transform(double[] real,
double[] imag,
boolean inverse)
Carry out the FFT or inverse FFT, and return the result in the same arrays given as parameters. 
Methods inherited from class java.lang.Object 

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

public FFT()
Method Detail 

public static double[] computeLogPowerSpectrum(double[] signal)
signal
 the real signal for which to compute the power spectrum.
public static double[] computeLogPowerSpectrum_FD(double[] fft)
fft
 the array of real and imag parts of the complex number array,
fft[0] = real[0], fft[1] = real[N/2], fft[2*i] = real[i], fft[2*i+1] = imag[i] for 1<=ipublic static double[] computePowerSpectrum(double[] signal)
signal
 the real signal for which to compute the power spectrum.
public static double[] computePowerSpectrum_FD(double[] fft)
fft
 the array of real and imag parts of the complex number array,
fft[0] = real[0], fft[1] = real[N/2], fft[2*i] = real[i], fft[2*i+1] = imag[i] for 1<=ipublic static double[] computeLogAmplitudeSpectrum(double[] signal)
signal
 the real signal for which to compute the power spectrum.
public static double[] computeLogAmplitudeSpectrum_FD(double[] fft)
fft
 the array of real and imag parts of the complex number array,
fft[0] = real[0], fft[1] = real[N/2], fft[2*i] = real[i], fft[2*i+1] = imag[i] for 1<=ipublic static double[] computeAmplitudeSpectrum(double[] signal)
signal
 the real signal for which to compute the power spectrum.
public static double[] computeAmplitudeSpectrum_FD(double[] fft)
fft
 the array of real and imag parts of the complex number array,
fft[0] = real[0], fft[1] = real[N/2], fft[2*i] = real[i], fft[2*i+1] = imag[i] for 1<=ipublic static double[] computePhaseSpectrum_FD(double[] fft)
fft
 the array of real and imag parts of the complex number array,
fft[0] = real[0], fft[1] = real[N/2], fft[2*i] = real[i], fft[2*i+1] = imag[i] for 1<=ipublic static void transform(double[] real, double[] imag, boolean inverse)
real
 in "forward" FFT: as input=the timedomain signal to transform, as output=the real part of the
complex frequencies; in inverse FFT: as input=the real part of the complex frequencies, as output=
the timedomain signal.imag
 in "forward" FFT: as input=an empty array, as output=the imaginary part of the
complex frequencies; in inverse FFT: as input=the imaginary part of the complex frequencies, as output=
not used.inverse
 whether to calculate the FFT or the inverse FFT.public static void transform(double[] realAndImag, boolean inverse)
realAndImag
 the array of complex numbers to transforminverse
 whether to calculate the FFT or the inverse FFT.public static void realTransform(double[] data, boolean inverse)
data
 public static double[] convolveWithZeroPadding(double[] signal1, double[] signal2, double deltaT)
signal1
 signal2
 deltaT,
 the time difference between two samples (= 1/samplingrate)
public static double[] convolveWithZeroPadding(double[] signal1, double[] signal2)
signal1
 signal2

public static double[] convolve(double[] signal1, double[] signal2, double deltaT)
signal1
 signal2
 deltaT,
 the time difference between two samples (= 1/samplingrate)
java.lang.IllegalArgumentException
 if the two input signals do not have the same length.public static double[] convolve(double[] signal1, double[] signal2)
signal1
 signal2

java.lang.IllegalArgumentException
 if the two input signals do not have the same length.public static double[] convolve_FD(double[] signal1, double[] fft2, double deltaT)
signal1
 the first input signal, in the time domainfft2
 the complex transform of the second signal, in the frequency domain
fft[0] = real[0], fft[1] = real[N/2], fft[2*i] = real[i], fft[2*i+1] = imag[i] for 1<=ideltaT,
 the time difference between two samples (= 1/samplingrate)
java.lang.IllegalArgumentException
 if the two input signals do not have the same length.public static double[] convolve_FD(double[] signal1, double[] fft2)
signal1
 the first input signal, in the time domainfft2
 the complex transform of the second signal, in the frequency domain
fft[0] = real[0], fft[1] = real[N/2], fft[2*i] = real[i], fft[2*i+1] = imag[i] for 1<=ijava.lang.IllegalArgumentException
 if the two input signals do not have the same length.public static double[] correlateWithZeroPadding(double[] signal1, double[] signal2)
signal1
 signal2

public static double[] correlate(double[] signal1, double[] signal2)
signal1
 signal2

java.lang.IllegalArgumentException
 if the two input signals do not have the same length.public static double[] autoCorrelate(double[] signal)
signal

public static double[] autoCorrelateWithZeroPadding(double[] signal)
signal

public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception


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