Visualization device.
Repeatedly draws a log-log plot of the Fourier spectrum of a short chunk of input data.
A beat detection algorithm and drawing of time-domain data are also
started in here but not finished yet (messy code).

to use, just insert this device anywhere, perhaps before the mix device

Options:

  - can be set/queried using the mas_get() / mas_set() interface
    (see mas_visual_device.c for query names)

  - these are the interesting ones:


N_BINS 30           desired number of bins in the histogram;
                    10 and 30 are special. They will use the generally 
                    accepted interval values from Mike's lab manual
                    
SPIKES 2            whether to draw spikes or boxes
                    if non-zero, the number means 1/2 the width of the spikes

SCALE_CUTOFF -60.0  lower cutoff point for the y-scale. Think decibels.

REFRESH 100         refresh display every REFRESH ms

N 1024              number of data points to use for FFT. (these are 
                    already downsampled to SAMPLE_RATE)

DO_WORK 0           whether to do anything or just pipe the data through
                    (this is a hack to make it seem like the media
                    player can just turn the visualization window on
                    and off)

additional documentation on the algorithm is in visual.tex