[CM] env-interp
Anders Vinjar
andersvi@extern.uio.no
Mon, 30 Aug 2004 17:06:09 +0200
There seems to be a bug in the code connected with the 'base-slot of
env's when given to #'env-interp (only tested outside run-loops in
cmucl):
(let ((crescendo (make-env '(0 0.0 1.0 1.0) :duration 1.0 :base 0.1)))
(loop for i from 0 to 1.0 by .1
collect i collect (env-interp i crescendo)))
=> (0 0.0 0.1 -0.11111112 0.2 -0.22222224 0.3 -0.33333337 0.4
-0.44444448 0.5 -0.5555556 0.6 -0.66666675 0.70000005 -0.77777785
0.8000001 -0.888889 0.9000001 -1.0000001)
(let ((crescendo (make-env '(0 0.0 1.0 1.0) :duration 1.0 :base 8.0)))
(loop for i from 0 to 1.0 by .1
collect i collect (env-interp i crescendo)))
=> (0 0.0 0.1 0.014285715 0.2 0.02857143 0.3 0.042857148 0.4
0.05714286 0.5 0.071428575 0.6 0.085714296 0.70000005 0.10000001
0.8000001 0.11428573 0.9000001 0.12857145)
when the env-struct is given to (env..) it behaves as expected:
(let ((e (make-env '(0 0.0 1.0 1.0) :duration 1.0 :base 0.2)))
(dotimes (i *srate*)
(env e))
(env e))
=> 1.0000418