diff options
author | Alessio Treglia <alessio@debian.org> | 2010-06-06 19:14:56 +0200 |
---|---|---|
committer | Alessio Treglia <alessio@debian.org> | 2010-06-06 19:14:56 +0200 |
commit | ff6dcdcac8ef6c6d72725f98410ce3c56b5a621f (patch) | |
tree | 461afda8886ee79f876ac3c8244cce5c1aeeddde /env.scm | |
parent | eb1f6106a36c100ab25cab7f29045e16f6e967fb (diff) |
Imported Upstream version 11.6
Diffstat (limited to 'env.scm')
-rw-r--r-- | env.scm | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -455,11 +455,11 @@ each segment: (powenv-channel '(0 0 .325 1 1 32.0 2 0 32.0))" (define* (envelope-exp e (power 1.0) (xgrid 100)) "(envelope-exp e (power 1.0) (xgrid 100)) approximates an exponential curve connecting the breakpoints" (let* ((mn (min-envelope e)) - (largest-diff (exact->inexact (- (max-envelope e) mn))) + (largest-diff (* 1.0 (- (max-envelope e) mn))) (x-min (car e)) (len (length e)) (x-max (list-ref e (- len 2))) - (x-incr (exact->inexact (/ (- x-max x-min) xgrid))) + (x-incr (* 1.0 (/ (- x-max x-min) xgrid))) (new-e '())) (do ((x x-min (+ x x-incr))) ((>= x x-max)) @@ -485,7 +485,7 @@ each segment: (powenv-channel '(0 0 .325 1 1 32.0 2 0 32.0))" (incrsamps (round (* incr fsr))) (start (round (* beg fsr))) (reader (make-sampler start file)) - (end (if dur (min (inexact->exact (+ start (round (* fsr dur)))) + (end (if dur (min (* 1.0 (+ start (round (* fsr dur)))) (mus-sound-frames file)) (mus-sound-frames file))) (rms (make-moving-average incrsamps))) ; this could use make-moving-rms from dsp.scm @@ -497,7 +497,7 @@ each segment: (powenv-channel '(0 0 .325 1 1 32.0 2 0 32.0))" ((= j incrsamps)) (let ((val (reader))) (set! rms-val (moving-average rms (* val val))))) - (set! e (cons (exact->inexact (/ i fsr)) e)) + (set! e (cons (* 1.0 (/ i fsr)) e)) (set! rms-val (sqrt rms-val)) (if db (if (< rms-val .00001) |