            shift (* (metro-tick metro) (if (> phase 0.5) (dec phase) phase))
            new-phrase-start (round (- (now) shift (* (dec start-phrase) (metro-ding metro))))]
        (ref-set start new-phrase-start))))
+
   (metro-adjust [metro ms]
     (dosync
      (alter start + ms)))
 
   (metro-tick [metro] (beat-ms 1 @bpm))
+
   (metro-tock [metro] (dosync
                        (ensure bpm)
                        (ensure bpb)
                        (beat-ms @bpb @bpm)))
+
   (metro-ding [metro] (dosync
                        (ensure bpm)
                        (ensure bpb)

                       (ensure start)
                       (ensure bpm)
                       (marker-number (now) @start (metro-tick metro))))
  (metro-beat [metro b] (dosync
                         (ensure start)
                         (ensure bpm)
                         (+ (* b (metro-tick metro)) @start)))
  (metro-beat-phase [metro]
    (dosync
     (ensure start)
     (ensure bpm)
     (marker-phase (now) @start (metro-tick metro))))
  (metro-beat-phase [metro phase]
    (dosync
     (ensure bpm)

           shift (round (* (metro-ding metro) (if (> delta 0.5) (dec delta)
                                                  (if (< delta -0.5) (inc delta) delta))))]
       (alter start - shift))))

  (metro-bpm [metro] @bpm)

  (metro-bpm [metro new-bpm]
    (dosync
     (let [cur-beat (metro-beat metro)
