anchor.diff:                   (if (and (numberp (get-event-value nv :tempo))
                             (plusp (get-event-value nv :tempo)))
                        (setf tempo (get-event-value nv :tempo)
  -                           timestamp-at-tempo (local-time:now)
  -                           time-at-tempo (get-internal-real-time) ;; FIX: calculate the current internal real time from the beat instead of using this function.
  +                           timestamp-at-tempo (absolute-beats-to-timestamp beats clock)
                              when-tempo-changed beats)
                        (warn "Tempo change event ~a has invalid :tempo parameter; ignoring." nv)))
                   (:rest
                    nil)
                   (otherwise
  -                 (let* ((event (combine-events nv (event :timestamp-at-start (absolute-beats-to-timestamp (slot-value task 'next-time) clock)
  -                                                         :time-at-start (absolute-beats-to-internal-time (slot-value task 'next-time) clock))))
  +                 (let* ((event (combine-events nv (event :timestamp-at-start (absolute-beats-to-timestamp (slot-value task 'next-time) clock))))
                           (backend (which-backend-for-event event)))
                      (if backend
                          (funcall (getf (getf *backends* backend) :play) event task)
                          (warn "No backend claims to handle ~s; skipping." nv)))))
                 ;; play the next event from this task if it occurs before the clock's next "wakeup time"
                 (unless (position type '(:tempo-change))
  -                (incf (slot-value task 'next-time) (delta nv))
  +                (incf (slot-value task 'next-time) (event-value nv :delta))
                   (when (< (slot-value task 'next-time) (+ beats granularity))
                     (clock-process-task task clock)))))
             ;; if the task is done with or isn't a pstream, we return it so it can be removed from the clock, else we return nil so nothing happens
  
positive.code: (defun absolute-beats-to-timestamp (beats clock)
    "Convert a clock's number of beats to a timestamp. The result is only guaranteed to be accurate if it's greater than the clock's when-tempo-changed slot."
    (with-slots (timestamp-at-tempo when-tempo-changed) clock
      (local-time:timestamp+ timestamp-at-tempo (dur-time (- beats when-tempo-changed) (tempo clock)) :sec)))
  
  (defun absolute-beats-to-internal-time (beats clock)
    "Convert a clock's number of beats to an internal real time. The result is only guaranteed to be accurate if it's greater than the clock's when-tempo-changed slot."
    (with-slots (time-at-tempo when-tempo-changed) clock
      (+ time-at-tempo (* internal-time-units-per-second (dur-time (- beats when-tempo-changed) (tempo clock))))))
  
  (defun make-clock (&optional (tempo 1) tasks)
    "Create a clock. The clock automatically starts running in a new thread."
  
negative.code:             ;; (let ((last (pstream-nth -2 item))) ;; FIX: make sure this is the last non-nil event from the pstream!!!!
              ;;   (if (eq (get-event-value last :instrument) (get-event-value nv :instrument)) ;; FIX: need the else for this
              ;;       (unless (null (slot-value task 'nodes))
              ;;         (release-at (+ (absolute-beats-to-unix-time (- (slot-value task 'next-time) (event-value last :delta)) clock)
              ;;                        (dur-time (sustain last)))
              ;;                     (car (slot-value task 'nodes))))))
              (setf item (slot-value task 'item)))
  