8.0.1. fftw: an interface to the FFTW3 Fourier Transform library
(packages/fftw/fftw.lsh)


This is an interface to the FFTW3 Fourier Transform library. To use this interface, you must first install the FFTW3 library and development package. fftw3 is distributed with most Linux distros as fftw3 or libfftw3 and libfftw3-devel.

8.0.1.0. High Level Fourier Transform functions
(packages/fftw/fftw.lsh)




8.0.1.0.0. (spectrogram signal window stride)
(packages/fftw/fftw.lsh)


compute and return the spectrogram of signal in vector signal . The Fourier transform is performed on Hanning windows of width window , that are stepped by stride samples. example:
 (spectrogram m 512 256) 


8.0.1.0.1. (idx1-power-spectrum in out)
(packages/fftw/fftw.lsh)


compute the power spectrum of a waveform in and put the result in out . in and out must be idx1 of double with identical sizes. only the bottom half of out is filled with useful data

8.0.1.0.2. (idx1-complex2norm in out)
(packages/fftw/fftw.lsh)


Compute the vector of norms of a vector of complex numbers. in must be an Nx2 idx2 of doubles where element (i, 0) contains the real part of the i-th complex and (i, 1) its imaginary part. On output, the idx1 of double out (which must be of dimension N) will contain the norms.

8.0.1.1. masking window utilities
(packages/fftw/fftw.lsh)




8.0.1.1.0. (make-hanning-window-tanh n p)
(packages/fftw/fftw.lsh)


make n -sample Hanning window with a piece of hyperbolic tangent function at each end.

8.0.1.1.1. (make-hanning-window-tanh n)
(packages/fftw/fftw.lsh)


make an n -sample Hanning window with a piece of cosine at each end.

8.0.1.2. Low-Level Fast Fourier Transform funtions (FFT)
(packages/fftw/fftw.lsh)


These functions perform 1D and 2D FFTs from complex to complex, and real to complex.

8.0.1.2.0. (fftw-dct-1d (in out forward norm)
(packages/fftw/fftw.lsh)


compute the 1D DCT-II transform of vector in , and put result in out . forward is an integer which should be set to 1 for a forward transform and to -1 for an inverse transform. norm is a boolean that should be set to nil for no normalization and t for normalization.

8.0.1.2.1. (fftw-dht-1d in out norm)
(packages/fftw/fftw.lsh)


computes the discrete hartley transform of in and puts the result into out . norm is a boolean that should be set to t to divide the output by its length.

8.0.1.2.2. (fftw-dft-c2c-1d in out forward norm)
(packages/fftw/fftw.lsh)


compute the complex-to-complex 1D fourier transform of complex vector in , and put result in out . forward is an integer which should be set to 1 for a forward transform and to -1 for an inverse transform. norm is a boolean that should be set to nil for no normalization and t for normalization.

8.0.1.2.3. (fftw-dft-r2c-1d in out norm)
(packages/fftw/fftw.lsh)


compute the real-to-complex 1D fourier transform of real vector in , and put result in the complex vector out . norm is a boolean that should be set to nil for no normalization and t for normalization.

8.0.1.2.4. (fftw-dft-c2r-1d in out norm)
(packages/fftw/fftw.lsh)


compute the complex-to-real backwards 1D fourier transform of complex vector in , and put result in the real vector out . norm is a boolean that should be set to nil for no normalization and t for normalization.

8.0.1.2.5. (fftw-dft-c2c-2d in out forward norm)
(packages/fftw/fftw.lsh)


compute the complex-to-complex 2D fourier transform of complex matrix in , and put result in out . forward is an integer which should be set to 1 for a forward transform and to -1 for an inverse transform. norm is a boolean that should be set to nil for no normalization and t for normalization.

8.0.1.2.6. (fftw-dft-r2c-2d in out norm)
(packages/fftw/fftw.lsh)


compute the real-to-complex 2D fourier transform of real matrix in , and put result in the complex vector out . norm is a boolean that should be set to nil for no normalization and t for normalization.