[CM] Snd and envelopes

Richard Liston liston@cc.gatech.edu
Tue, 16 Mar 2004 17:23:20 -0500


On 03/16/04, Bill Schottstaedt said:
> 
> 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)))
> 

Thanks. I guess over time I'll build up a library of "atomic data
accessors" that I'm familiar with and that will provide different
pieces of information about the current sound. They're in the docs,
but somewhat spread out and at times combined with some other kinds
of info.

Anyway, this is what I'm using to taper the ends of the signal for now:

(define* (tails #:optional (time 0.005))
  (let ((dur (/ (frames) (srate))))
  (env-sound (list 0 0 time 1 (- dur time) 1 dur 0))))

Richard