view man/man1/fft.1 @ 0:5242703e91d3 tip

Initial checkin for AIM92 aimR8.2 (last updated May 1997).
author tomwalters
date Fri, 20 May 2011 15:19:45 +0100
parents
children
line wrap: on
line source
.TH FFT 1 "15 September 1993"

.SH NAME
fft \- Fast Fourier transform of contiguous frames.


.SH SYNTAX 
fft  [arguments]  [file]


.SH DESCRIPTION
Several forms of fft processing are provided, according to the "spectrum"
option. Unless verbose output is requested, all input and output is in
binary shorts.

Each input frame is padded with zeroes to the next power of 2 larger than
the input framewidth.
If necessary, extra padding can be enforced using the (silent) padding option
to add extra zeroes, padding to a larger power of 2.
The amount of extra padding is "exponential", expanding the basic size to:

      ( framewidth + padding ) * 2**n

where the padding option is n.

(n=0 by default, so that no extra padding is added. When n=1 then padding is
added to double the size, and when n=2 the size is quadrupled, etc.).
The input and output frame sizes in sample points may be printed using the
"size" option.


.SH OPTIONS

The spectrum option selects a form of processing from the list:

1. magnitude: magnitude spectrum

2. log: log10 of magnitude spectrum

3. phase: phase spectrum.

4. complex: full complex spectrum, in <real,imag> pairs.

5. inverse: inverse fft, reading framewidth numbers which are interpreted as
<real,imag> pairs, (ie framewidth/2 complex numbers),
and outputs the inverse transform scaled by 1/framewidth.

6. verbose: prints the spectrum in ASCII on the stdout.

.SH EXAMPLES
.nf
1. To print the input and output frame sizes in sample points,  
   eg for a subsequent plotting program, use the size option:

fft ... size=on


2. An fft of a waveform sampled at 10kHz, computed within a 
   frame of 12.8ms, plotting the 2nd frame in a sequence of 
   frames with half-frame overlap.

fft samp=10kHz width=12.8ms frstep=6.4ms frame=2 file | x11plot


3. An animated plot of successive fft spectra of a waveform 
   sampled at 10kHz, each computed within a frame of 12.8ms, 
   and shifted by 2 sample points.

fft samp=10kHz width=12.8ms frstep=2p file | x11play -n64


4. Using the complex output from fft, and inverse transform 
   without windowing to recover original input.

fft samp=10kHz frame=2 spec=complex window=off file > foo
fft samp=10kHz frame=1 spec=inverse window=off foo | x11plot

.fi

.SH COPYRIGHT
.LP
Copyright (c) Applied Psychology Unit, Medical Research Council, 1995
.LP
Permission to use, copy, modify, and distribute this software without fee 
is hereby granted for research purposes, provided that this copyright 
notice appears in all copies and in all supporting documentation, and that 
the software is not redistributed for any fee (except for a nominal 
shipping charge). Anyone wanting to incorporate all or part of this 
software in a commercial product must obtain a license from the Medical 
Research Council.
.LP
The MRC makes no representations about the suitability of this 
software for any purpose.  It is provided "as is" without express or 
implied warranty.
.LP
THE MRC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 
THE A.P.U. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES 
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 
SOFTWARE.