anchor.diff:    (yscl 0.0)
     (type :mus-interp-none))
   
  -(defun new-delay (size initial-contents initial-element max-size type)
  +(defun make-delay (size initial-contents initial-element max-size type)
     (let ((lsize (round (or max-size size))))
  -    (make-instance 'delay
  -     :loc 0
  -     :size (floor size)
  -     :zsize lsize
  -     :zdly max-size
  -     :zloc (and max-size (- max-size size))
  -     :line (if initial-contents 
  -	       (make-double-array lsize :initial-contents initial-contents)
  -	       (if initial-element
  -		   (make-double-array lsize :initial-element (double initial-element))
  -		   (make-double-array lsize)))
  -     :type (or type
  -	       (if max-size
  -		   :mus-interp-linear
  -		   :mus-interp-none)))))
  +    (%make-delay
  +     (floor size) ;size
  +     (if initial-contents ;line
  +	 (make-double-array lsize :initial-contents initial-contents)
  +	 (if initial-element
  +	     (make-double-array lsize :initial-element (double initial-element))
  +	     (make-double-array lsize)))
  +     0 ;loc
  +     (and max-size (- max-size size)) ;zloc
  +     lsize ;zsize
  +     max-size ;zdly
  +     (or type ;type
  +	 (if max-size
  +	     :mus-interp-linear
  +	     :mus-interp-none)))))
   
   (defun tap (d &optional (offset 0.0))
     (if (delay-zdly d)
  -      (if (= offset 0.0) 
  +      (if (= offset 0.0)
   	  (aref (delay-line d) (delay-zloc d))
   	(array-interp (delay-line d) (- (delay-zloc d) offset) (delay-zsize d)))
  -    (if (= offset 0.0) 
  +    (if (= offset 0.0)
   	(aref (delay-line d) (delay-loc d))
         (aref (delay-line d) (floor (mod (- (delay-loc d) offset) (delay-size d)))))))
  -	  
  +
   (defun delay-tick (d input)
     (setf (aref (delay-line d) (delay-loc d)) (double input))
     (incf (delay-loc d))
  
positive.code: 
  
  ;;;;pulse-train
  (defstruct (pulse-train (:include triangle-wave)))
  
  (defun new-pulse-train (&key (frequency *default-frequency*) (amplitude 1.0) (initial-phase +two-pi+))
    (make-instance 'pulse-train
  		 :current-value 0.0
  		 :base amplitude		; another version alternates sign
  		 :phase initial-phase		; this will give us an immediate pulse
  		 :freq (hz->radians frequency)))
  
  (defun pulse-train (s &optional (fm 0.0))
    (prog1
  
negative.code:     (delay-tick d input)))
  
  ;;;;all-pass
  (defstruct (all-pass (:include delay)
  		     (:constructor %make-all-pass (size line loc zloc zsize zdly yscl xscl type))))
  
  (defun make-all-pass (feedback feedforward size initial-contents initial-element max-size type)
    (let ((lsize (round (or max-size size))))
      (%make-all-pass
       ;;size
       (floor size)
       ;;line
       (if initial-contents
  	 (make-double-array lsize :initial-contents initial-contents)
  	 (if initial-element
  	     (make-double-array lsize :initial-element (double initial-element))
  	     (make-double-array lsize)))
       ;;loc
       0
       ;;zloc
       (and max-size (- max-size size))
       ;;zsize
       lsize
       ;;zdly
       max-size
       ;;yscl
       feedback
       ;;xscl
       feedforward
       ;;type
       (or type
  	 (if max-size
  	     :mus-interp-linear
  	     :mus-interp-none)))))
  
  (defun all-pass (d input &optional (pm 0.0))
    (let ((d-in (+ input (* (delay-yscl d) (tap d pm)))))
      (+ (delay d d-in pm)
         (* (delay-xscl d) d-in))))
  
  ;;;;comb
  (defstruct (comb (:include delay)
  		 (:constructor %make-comb (loc xscl size zsize zdly zloc line type))))
  
  (defun make-comb (scaler size initial-contents initial-element max-size type)
    (let ((lsize (round (or max-size size))))
      (%make-comb
       0
       scaler
       (floor size)
       lsize
       max-size
       (and max-size (- max-size size))
       (if initial-contents
  	 (make-double-array lsize :initial-contents initial-contents)
  	 (if initial-element
  	     (make-double-array lsize :initial-element (double initial-element))
  	     (make-double-array lsize)))
       (or type
  	 (if max-size
  	     :mus-interp-linear
  	     :mus-interp-none)))))
  
  (defun comb (d input &optional (pm 0.0))
    (delay d (+ input (* (delay-xscl d) (tap d pm)))))
  
  ;;;; asymmetric-fm
  (defstruct (asymmetric-fm (:constructor %make-asymmetric-fm (r freq ratio phase cosr sinr)))
    r freq ratio phase cosr sinr)
  
  (defun make-asymmetric-fm (&optional (frequency *default-frequency*) (initial-phase 0.0) (r 1.0) (ratio 1.0))
    (if (/= r 0.0)
        (%make-asymmetric-fm r (hz->radians frequency) ratio initial-phase (* 0.5 (- r (/ 1.0 r))) (* 0.5 (+ r (/ 1.0 r))))))
  
  (defun asymmetric-fm (af index &optional (fm 0.0))
    (let* ((th (asymmetric-fm-phase af))
  	 (mth (* (asymmetric-fm-ratio af) th))
  