[CM] is this the best way to do this?

Bill Schottstaedt bil@ccrma.Stanford.EDU
Fri, 31 Jan 2003 03:52:43 -0800


>  My question is this, am I missing anything vital here?

The original breakpoint data is available (mus-data in Scheme,
but I apparently forgot the CL case), and I'll bring out the
offset value, so here's my first stab at it:

(in-package :clm) ; for mus-data/offset defs which will not be needed after Monday
(defmethod mus-data ((e seg)) (seg-original-data e))
(defmethod mus-offset ((e seg)) (seg-offset e))

(defun change-env-dur (e dur)
  (make-env (mus-data e)
	    :scaler (mus-scaler e)
	    :offset (mus-offset e)
	    :duration dur))

I'll add the first two to the CL CLM, so you shouldn't need to
refer to the seg struct -- I treat that part of CLM as an
internal thing that I change at any time without warning.