anchor.diff:    (with-slots (pattern sync-quant maxdur tolerance history) psync
       (let* ((n-event (next pattern))
              (elapsed-dur (reduce #'+ (mapcar #'event-value (remove-if #'null history) (alexandria:circular-list :delta))))
  -           (delta (- (round-up elapsed-dur sync-quant) elapsed-dur)))
  +           (delta (- (round-by-direction elapsed-dur sync-quant) elapsed-dur)))
         (if (null n-event)
             (when (plusp delta)
               (event :type :rest :dur delta))
  
positive.code:               (prog1
                    (if (> (if (= 0 tolerance)
                               new-elapsed
                               (round-up new-elapsed tolerance))
                           current-dur)
                        (let ((tdur (- current-dur current-elapsed)))
                          (when (plusp tdur)
  
negative.code:     (alexandria:when-let ((lv (or (pstream-elt pattern -1) 0))
                            (cv (next pattern)))
        (- cv
           (- lv (round-by-direction (- lv cv) cycle))))))
  
  ;;; pdrop
  
  