[CM] Snd and envelopes

Bill Schottstaedt bil@ccrma.Stanford.EDU
Tue, 16 Mar 2004 04:18:45 -0800


 > how do I create and apply an envelope that will cause a sound
 > of any length to ramp up in a fixed amount of time - say, .05 sec
 > - at the beginning and ramp down in a fixed amount of time at
 > the end?

Since the x axis is arbitrary, the simplest way is probably
to use the duration of the sound as the x extent:

(let ((dur (/ (frames) (srate))))
   (env-sound (list 0 0  0.05 1  (- dur .05) 1  dur 0)))