afft(1)

Name
afft - A Realtime FFT display client

SYNOPSIS
afft [-color] [-d device] [-file file] [-gain gainvalue] [-length fftlength] [-log] [-min minvalue] [-max maxvalue] [-nodc] [-noscope] [-nowindow] [-realtime] [-sine] [-spec] [-stride stridelength]

Description

afft accepts mu-law audio data from one of several sources, executes a running Fourier transform on the data, and displays the transform result. The display is updated continuously in either "waterfall" or "spectrogram" format. afft is initially configured through command line switches. Many of the parameters can be changed while the progogram is running via the graphical user interface, as described below. The source of the audio that is displayed depends on the configuration as folows: If the -file switch is given, then the audio source is a file of mu-law samples. Otherwise, if the -sine switch is given, the audio source is a "canned" sine wave that sweeps up and down the frequency spectrum. If neither -file or -sine are given, then afft takes its audio data from the audio server local input.

Options

-color

    Specifies that the display is to be in color. The default is grayscale. The color scheme can be changed while afft is running by means of a pull-down menu labeled "Colors".

-d device

    Specifies the name of the audio device. If not given, afft defaults to the local audio device.

-file file

    Input will be taken from file, which should contain raw mu-law samples of audio data. afft will continuously loop through the file from beginning to end, rewind the file, and repeat. If file is given as "-", input is taken from stdin. Since it is not possible to rewind stdin, afft will terminate on end-of-file in this case. If afft can connect to the audio server, then the file is played through the audio output device in synchronization with the fft display.

-gain gainvalue

    Sets the gain in DB to be applied to the audio samples. Should be in the range of -100 to -5, and represents a level down from a theoretical peak value of 0DB. Applies only when log mode is selected, see -log switch. Default value is -20. The gain value may be controlled while afft is running by a slider labeled "Gain".

-length fftlength

    Sets the number of samples over which each FFT transform is computed. Legal values are 512, 256, 128, and 64. Default value is 512. The length can be changed while afft is running by means of a pull-down menu labeled "FFT Length"

-log

    Selects the initial display mode to be logarithmic. If not specified, the initial display mode is linear. The selection between log and linear mode may be changed while afft is running by a pair of radio buttons labeled "Log" and "Linear".

-min minvalue

    Sets the lowest audio level that will be displayed. Value is in DB for log mode, or in percent of peak value in linear mode. Default is -100 in log mode, and 0 in linear. The minimum value may be controlled while afft is running by a slider labeled "Minimum".

-max maxvalue

    Sets the hightest audio level that will be displayed. Value is in DB for log mode, or in percent of peak value in linear mode. Default is 0 in log mode, and 100 in linear. The maximum value may be controlled while afft is running by a slider labeled "Maximum".

-nodc

    Supresses display of the DC component. Default is to include the DC component in the fft display. Inclusion or supression of the DC component may be changed while afft is running by a pair of radio buttons labeled "NoDC" and "DC".

-noscope

    Suppresses display of the audio stream in an oscilloscope-like form. The default is to show this display. Oscilloscope display can also be turned on and off while afft is running by a pair of radio buttons labeled "Scope On" and "Scope Off".

-nowindow

    Supresses the window function. By default, a Hamming window is used. Other window functions can be selected through a pulldown menu labeled "Windows". Additional window functions include Hanning, and Triangular.

-realtime
    If this switch is given, afft attempts to stay synchronized with the audio server in real time. If afft cannot get enough CPU cycles to keep up with the incoming audio stream, it may fall behind enough that it no longer captures valid audio data. In non-realtime mode (the default), afft will discard audio samples in order to keep up with real time.

-sine

    Causes afft to begin operation in demo mode, which displays a sine curve sweep from the minimum frequency up to the Nyquist cut-off frequency. afft can operate in this mode even if the audio server is not running or no audio hardware is available. afft can be switched between demonstration mode and live mode (input from the audio server) by a pair of radio buttons labeled "Live" and "Demo.

-spec

    Selects spectrogram display. Otherwise, a waterfall style of display is used. You can switch at will between spectrogram and waterfall by a pair of radio buttons labeled "Waterfall" and "Spec".

-stride stridelength

    Sets the number of samples that afft advances between FFT frames. Legal values are 512, 256, 128, and 64. Default value is 512. However, the stride will never be greater than the FFT length (see above). The stride can be changed while afft is running by means of a pull-down menu labeled "Stride"

Owner

    Original by L. Stewart

    User Interface by J. Morse

Copyright
Copyright 1992-1994 Digital Equipment Corporation