anchor.diff:        (setf (asymmetric-fm-phase af) (mod (asymmetric-fm-phase af) +two-pi+)))
       result))
   
  -;;;;comb
  -(defstruct (comb (:include delay)))
  -
  -(defun new-comb (scaler size initial-contents initial-element max-size type)
  -  (let ((lsize (round (or max-size size))))
  -    (make-instance 'comb
  -		   :loc 0
  -		   :xscl scaler
  -		   :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)))))
  -
  -(defun comb (d input &optional (pm 0.0))
  -  (delay d (+ input (* (delay-xscl d) (tap d pm)))))
  -
   ;;;;oscil
  -(defstruct oscil freq phase)
  -
  -(defun new-oscil (&optional (frequency 440.0) (initial-phase 0.0))
  -  (make-oscil :freq (hz->radians frequency) :phase initial-phase))
  +(defstruct (oscil (:constructor %make-oscil (freq phase)))
  +  freq phase)
  +
  +(defun make-oscil (&optional (frequency 440.0) (initial-phase 0.0))
  +  (%make-oscil (hz->radians frequency) initial-phase))
   
   (defun oscil (gen &optional (fm-input 0.0) (pm-input 0.0))
  -  (prog1 
  +  (prog1
         (sin (+ (oscil-phase gen) pm-input))
       (incf (oscil-phase gen) (+ (oscil-freq gen) fm-input))
       ;; if we were being extremely careful, we'd add the fm-input into the sin call at the start too.
  
positive.code:     (setf (triangle-wave-current-value s) (tri-val (triangle-wave-base s) (triangle-wave-phase s)))))
  
  ;;;;square-wave
  (defstruct (square-wave (:include triangle-wave))
    (width pi))
  
  (defun new-square-wave (&key (frequency *default-frequency*) (amplitude 1.0) (initial-phase 0.0))
    (make-instance 'square-wave
  		 :current-value (if (< initial-phase pi) 0.0 amplitude)
  		 :base amplitude
  		 :phase initial-phase
  		 :width pi
  		 :freq (hz->radians frequency)))
  
  (defun square-wave (s &optional (fm 0.0))
    (prog1
        (square-wave-current-value s)
      (incf (square-wave-phase s) (+ (square-wave-freq s) fm))
      (if (or (minusp (square-wave-phase s))
  	    (>= (square-wave-phase s) +two-pi+)) 
  	(fix-up-phase s))
      (setf (square-wave-current-value s) (if (< (square-wave-phase s) (square-wave-width s)) (square-wave-base s) 0.0))))
  
  ;;;;sawtooth-wave
  (defstruct (sawtooth-wave (:include triangle-wave)))
  
  (defun new-sawtooth-wave (&key (frequency *default-frequency*) (amplitude 1.0) (initial-phase pi))
    (make-instance 'sawtooth-wave
  		 :current-value (* amplitude (/ (- initial-phase pi) pi))
  		 :base (/ amplitude pi)
  		 :phase initial-phase
  		 :freq (hz->radians frequency)))
  
  (defun sawtooth-wave (s &optional (fm 0.0))
    (prog1
  
negative.code:   (yscl 0.0)
    (type :mus-interp-none))
  
  (defun make-delay (size initial-contents initial-element max-size type)
    (let ((lsize (round (or max-size size))))
      (%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)
  	  (aref (delay-line d) (delay-zloc d))
  	(array-interp (delay-line d) (- (delay-zloc d) offset) (delay-zsize d)))
      (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))
  