   [this beat]
   (let [metro (:metronome (.state this))
         snap (rhythm/metro-snapshot metro)
-        beat (mod beat (:bpb metro))
+        beat (mod beat (:bpb snap))
         delta (- (rhythm/snapshot-beat-within-bar snap) beat)]
     (when-not (zero? delta)
       (rhythm/metro-adjust metro (* delta (rhythm/metro-tick metro))))))

      0 (interpret-tempo-tap this)
      1 (rhythm/metro-phrase-start metro (rhythm/metro-phrase metro))
      2 (rhythm/metro-bar-start metro (rhythm/metro-bar metro))
      3 (interpret-beat-tap this))))

    0 (set-bpm this new-value)
    1 (rhythm/metro-phrase-start (:metronome (.state this)) new-value)
    2 (set-bar this new-value)
    3 (set-beat this new-value))
  (-bang this))

;; TODO: accept a list in the first inlet, to set the bars per phrase and beats per bar as well as BPM.

