[CM] Finding the duration of a time-varying resampled sound.

Bill Schottstaedt bil at ccrma.Stanford.EDU
Tue Oct 28 04:14:00 PST 2003


 > What I need is a general formula for the scale-factor 's'
 > between two points (x1,y1) and (x2,y2), where y1 and y2 are
 > always positive values.

I think you want the average of the inverse; the "tempo map"
idea here would be to integrate the inverse of the envelope,
then multiply that by the in-coming note length.  But for
each segment, I think this would do it:

(define (invert-average x1 y1 x2 y2)
   (/ (- x2 x1) (* .5 (+ y1 y2))))

(Didn't actually test this...)




More information about the Cmdist mailing list