tomwalters@0: .TH FFT 1 "15 September 1993" tomwalters@0: tomwalters@0: .SH NAME tomwalters@0: fft \- Fast Fourier transform of contiguous frames. tomwalters@0: tomwalters@0: tomwalters@0: .SH SYNTAX tomwalters@0: fft [arguments] [file] tomwalters@0: tomwalters@0: tomwalters@0: .SH DESCRIPTION tomwalters@0: Several forms of fft processing are provided, according to the "spectrum" tomwalters@0: option. Unless verbose output is requested, all input and output is in tomwalters@0: binary shorts. tomwalters@0: tomwalters@0: Each input frame is padded with zeroes to the next power of 2 larger than tomwalters@0: the input framewidth. tomwalters@0: If necessary, extra padding can be enforced using the (silent) padding option tomwalters@0: to add extra zeroes, padding to a larger power of 2. tomwalters@0: The amount of extra padding is "exponential", expanding the basic size to: tomwalters@0: tomwalters@0: ( framewidth + padding ) * 2**n tomwalters@0: tomwalters@0: where the padding option is n. tomwalters@0: tomwalters@0: (n=0 by default, so that no extra padding is added. When n=1 then padding is tomwalters@0: added to double the size, and when n=2 the size is quadrupled, etc.). tomwalters@0: The input and output frame sizes in sample points may be printed using the tomwalters@0: "size" option. tomwalters@0: tomwalters@0: tomwalters@0: .SH OPTIONS tomwalters@0: tomwalters@0: The spectrum option selects a form of processing from the list: tomwalters@0: tomwalters@0: 1. magnitude: magnitude spectrum tomwalters@0: tomwalters@0: 2. log: log10 of magnitude spectrum tomwalters@0: tomwalters@0: 3. phase: phase spectrum. tomwalters@0: tomwalters@0: 4. complex: full complex spectrum, in pairs. tomwalters@0: tomwalters@0: 5. inverse: inverse fft, reading framewidth numbers which are interpreted as tomwalters@0: pairs, (ie framewidth/2 complex numbers), tomwalters@0: and outputs the inverse transform scaled by 1/framewidth. tomwalters@0: tomwalters@0: 6. verbose: prints the spectrum in ASCII on the stdout. tomwalters@0: tomwalters@0: .SH EXAMPLES tomwalters@0: .nf tomwalters@0: 1. To print the input and output frame sizes in sample points, tomwalters@0: eg for a subsequent plotting program, use the size option: tomwalters@0: tomwalters@0: fft ... size=on tomwalters@0: tomwalters@0: tomwalters@0: 2. An fft of a waveform sampled at 10kHz, computed within a tomwalters@0: frame of 12.8ms, plotting the 2nd frame in a sequence of tomwalters@0: frames with half-frame overlap. tomwalters@0: tomwalters@0: fft samp=10kHz width=12.8ms frstep=6.4ms frame=2 file | x11plot tomwalters@0: tomwalters@0: tomwalters@0: 3. An animated plot of successive fft spectra of a waveform tomwalters@0: sampled at 10kHz, each computed within a frame of 12.8ms, tomwalters@0: and shifted by 2 sample points. tomwalters@0: tomwalters@0: fft samp=10kHz width=12.8ms frstep=2p file | x11play -n64 tomwalters@0: tomwalters@0: tomwalters@0: 4. Using the complex output from fft, and inverse transform tomwalters@0: without windowing to recover original input. tomwalters@0: tomwalters@0: fft samp=10kHz frame=2 spec=complex window=off file > foo tomwalters@0: fft samp=10kHz frame=1 spec=inverse window=off foo | x11plot tomwalters@0: tomwalters@0: .fi tomwalters@0: tomwalters@0: .SH COPYRIGHT tomwalters@0: .LP tomwalters@0: Copyright (c) Applied Psychology Unit, Medical Research Council, 1995 tomwalters@0: .LP tomwalters@0: Permission to use, copy, modify, and distribute this software without fee tomwalters@0: is hereby granted for research purposes, provided that this copyright tomwalters@0: notice appears in all copies and in all supporting documentation, and that tomwalters@0: the software is not redistributed for any fee (except for a nominal tomwalters@0: shipping charge). Anyone wanting to incorporate all or part of this tomwalters@0: software in a commercial product must obtain a license from the Medical tomwalters@0: Research Council. tomwalters@0: .LP tomwalters@0: The MRC makes no representations about the suitability of this tomwalters@0: software for any purpose. It is provided "as is" without express or tomwalters@0: implied warranty. tomwalters@0: .LP tomwalters@0: THE MRC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING tomwalters@0: ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL tomwalters@0: THE A.P.U. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES tomwalters@0: OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, tomwalters@0: WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, tomwalters@0: ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS tomwalters@0: SOFTWARE. tomwalters@0: