On or about 8 Jun 2001, andy at theasis.com is alleged to have said:
> > 
> > That's a good start.  There are several different kinds, each with
their
> > own merits.  For general purpose use, a (cos x + 1)/2 envelope -- with
> 
> What's 'x'  (units)? 

Your amplitude envelope is a bunch of coefficients that multiply the sample
values in the region where you're fading.  So set up an array, let n be the
number of samples in the region you want to fade, and x is an index from 1
to n.  Multiply the old samples by the coefficient given by the above, and
you've got your fade.

Better?