I have found this program quite
useful, although it takes a bit of 
practice to get the hang of it.
Spectral expansion and compression
can be very powerful tools in
the right hands.

scampi:  spectral compander
scampi   [flags] < floatsams > floatsams
        N:      fft length [1024]
        R:      sampling rate [44100]
        M:      window size in samples [4096]
        D:      decimation factor in samples [512]
        I:      interpolation factor in samples [512]
        m:      maximum attenuation in dB [-6.]
        a:      attenuation stepsize in dB  [2.]
        g:      gate stepsize in dB [1.]
        P:      pitch factor [0.]
        t:      threshold generator [.005]
        q:      maintain phase coherence
        s:      synthesize analysis input

m - controls gain (in dB) for the loudest harmonics
    for m < 0.0 you get spectral compression,
    for m > 0.0 you get spectral expansion,
    for m == 0.0 the program tells you to take a hike.
    If you use expansion, I recommend writing output
    to a floating point soundfile as overflow
    is likely to occur.

a-  this is the differential (in dB) between
    successive rescale factors. Lower values
    will generate more thresholds with
    a tradeoff between smoothness (as
    bins jump between thresholds) and extra
    computation. 
    
g - controls the size (in dB) of bin
    gate thresholds. For g=1.0, a new
    threshold is generated at an interval
    of -1dB until a bin gain of 0dB is
    reached. Bins below the lowest
    threshold are unaffected by the 
    processor. (The thresholds are
    always relative to the frame's
    maximum amplitude bin.)

The program gives diagnostics about
thresholds and associated rescale
factors to help you develop intuitions
about the interaction of these three
main parameters.

The q flag does not seem particularly
necessary - you may wish to use it for
critical applications.

