anchor.diff:  
   (defun clock-process-task (task clock) ;; FIX: only remove patterns if they've returned NIL as their first output 4 times in a row.
     "Process TASK on CLOCK. This function processes meta-events like tempo changes, etc, and everything else is sent to to *EVENT-OUTPUT-FUNCTION*."
  -  (with-slots (beats tempo granularity unix-time-at-tempo timestamp-at-tempo time-at-tempo when-tempo-changed) clock
  +  (with-slots (beats tempo granularity timestamp-at-tempo time-at-tempo when-tempo-changed) clock
       (when (null (slot-value task 'next-time)) ;; pstream hasn't started yet.
         (setf (slot-value task 'start-time) beats
               (slot-value task 'next-time) beats))
  
positive.code:    (next-time :initarg :next-time :initform nil)
     (nodes :initarg :nodes :initform (list))))
  
  (defparameter *clock* nil)
  
  (defun absolute-beats-to-unix-time (beats clock)
    "Convert a clock's number of beats to a unix time. Number of beats is only guaranteed to be accurate if it's greater than the clock's when-tempo-changed slot."
    (+ (slot-value clock 'unix-time-at-tempo) (dur-time (- beats (slot-value clock 'when-tempo-changed)) (tempo clock))))
  
  (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
  
negative.code: 
  (defclass clock ()
    ((beats :initform 0 :documentation "The number of beats that have elapsed since the creation of the clock.")
     (tempo :initarg :tempo :initform 1 :reader tempo :documentation "The tempo of the clock, in beats per second.")
     (granularity :initarg :granularity :initform 1/10 :documentation "How often the clock \"wakes up\" to process events in each beat. Shouldn't need to be adjusted.")
     (tasks :initform nil :documentation "The list of tasks that are running on the clock.")
     (tasks-lock :initform (bt:make-lock) :documentation "The lock on the tasks to make the clock thread-safe.")
     (timestamp-at-tempo :initform (local-time:now) :documentation "The local-time timestamp when the tempo was last changed.")
     (time-at-tempo :initform (get-internal-real-time) :documentation "The internal real time when the tempo was last changed.")
     (when-tempo-changed :initform 0 :documentation "The number of beats on the clock when the tempo was last changed.")))
  
  (defmethod (setf tempo) (value (item clock))
    (clock-add (event :type :tempo-change :tempo value) item))
  
  (defclass task ()
    ((gensym :initform (gensym))
  