      (ensure bpm)
      (ensure bpb)
      (ensure bpp)
-     (let [phase (metro-beat-phase metro)
-           shift (* (metro-tick metro) (if (> phase 0.5) (dec phase) phase))
+     (let [phase            (metro-beat-phase metro)
+           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))))
 

    (dosync
     (ensure bpm)
     (ensure bpb)
     (let [phase (metro-beat-phase metro)
           shift (* (metro-tick metro) (if (> phase 0.5) (dec phase) phase))
           new-bar-start (round (- (now) shift (* (dec start-bar) (metro-tock metro))))]
       (ref-set start new-bar-start))))


  (metro-bpb [metro new-bpb]
    (dosync
     (ensure bpm)
     (let [cur-bar   (metro-bar metro)
           new-tock  (beat-ms new-bpb @bpm)
           new-start (- (now) (* new-tock (dec cur-bar)))
           phase     (metro-beat-phase metro) ; Preserve beat phase
           shift     (* (metro-tick metro) phase)]
       (ref-set start (round (- new-start shift)))
       (ref-set bpb new-bpb))))

