   (metro-bpb [metro new-bpb]
     (dosync
      (ensure bpm)
-     (let [cur-bar (metro-bar metro)
-           new-tock (beat-ms new-bpb @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)]
+           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))))
 

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


     (ensure bpm)
     (ensure bpb)
     (ensure bpp)
     (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))))

