Skip to content

t1merickson/bpm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BPM

A lightweight beats-per-minute tapper that lives in the macOS menu bar. Click the icon in time with the beat and a popover drops down with the running average BPM in a beat ring, a drift bar showing whether you're rushing or dragging, half-/double-time, and the repitched tempo at ±6 semitones. Useful for figuring out whether a track will fit into a set.

The BPM popover: the current tempo in a beat ring with a drift bar behind it (tortoise/hare ends), a half- and double-time row, and a grid of repitched tempos from −6 to +6 semitones.

Usage

  • Click — register a tap. After the second tap, a popover appears below the menu bar with the running average BPM and the repitch grid.
  • Right-click — reset.
  • ⌘-Click — copy the current BPM to the clipboard.
  • ⌥-Click — show the instructions popup.
  • ⌃-Click — quit the app.

The display auto-resets to the placeholder glyph after ~1.5 seconds without a tap.

Building

Open bpm.xcodeproj in Xcode and build. The project produces a Universal Binary (Apple Silicon + Intel) and targets macOS 11.0 Big Sur or later.

License & attribution

This work is licensed under the Creative Commons Attribution 3.0 Unported License (CC BY 3.0).

Originally created by Ben Brook (@bencmbrook) — upstream repository: https://github.com/bencmbrook/bpm. Subsequently modified by Harry Clegg (@harryclegg) — upstream fork: https://github.com/harryclegg/bpm. Further modified in this fork by Tim Erickson (@t1merickson).

This is a modified version of the original work; modifications are summarized in the changelog below.


Changelog

v2.2 — @t1merickson

  • Drift redesign: the drift readout is now a horizontal bar that sits behind the BPM ring (part of the dial) rather than a dot on a separate line. Each side is colored independently — the left warms toward blue as your recent taps drag behind the running average, the right toward red as they rush ahead — with a directional bloom that grows with the trend. tortoise / hare glyphs mark the slow/fast ends.
    • Drift is smoothed over a longer window (an EMA of roughly the last ~6 taps) and the color animates between readings instead of snapping on every click, so it reads as a trend rather than per-tap jitter.
  • Half- / double-time row: a ÷ / × row above the semitone grid shows half- and double-time at a glance — handy for DJing without doing the math in your head.
  • The repitch grid and half-/double-time cells now derive from the rounded BPM shown on the dial, so they always agree with the big number (previously they used the unrounded running average and could look off by a digit).

v2.1 — @t1merickson

  • Tempo popover:
    • The BPM is no longer printed in the menu bar under the cursor (hard to read at menu-bar size). The menu bar item is now purely a tap target, and the reading is surfaced in a popover that drops down once a tempo is running.
    • The popover is a borderless, non-activating floating panel positioned directly below the menu bar icon (vibrant material, rounded corners). It anchors itself and never steals focus from the foreground app — so you can keep tapping along to audio in your DAW.
    • Beat ring: an AirPods-style ring around the current BPM that sweeps clockwise over one 4/4 bar — a quarter-turn per tap, snapping back to the top on the downbeat — with light grey markers at the four beat positions.
    • Drift meter: a —•— indicator showing whether your latest tap is drifting faster (right) or slower (left) than the running average; centered means locked in, and it warms from green toward orange as drift grows.
    • Repitch grid: a 2-wide × 6-tall grid listing the new tempo at −6…+6 semitones, using the equal-temperament relationship newBPM = bpm · 2^(semitones/12) (the same math as thewhippinpost tempo-pitch calculator). The ±6 (octave) row is a handy half-time / double-time reference: −6 is exactly half of +6. Whole numbers read at full weight with the decimal dimmed.

v2.0 — @t1merickson

  • Menu bar UI polish:
    • Replaced the "bpm" text in the ready state with the music.quarternote.3 SF Symbol (template-rendered so it tints with the menu bar).
    • Status item now has a fixed width sized for the widest possible 3-digit BPM ("888"), so it no longer jumps around as the BPM digit count changes.
    • Menu bar text is rendered 1pt smaller than the system default for a slightly more refined look.
    • SF Symbol weight and size tuned (pointSize: 15, weight: .medium) to sit comfortably next to other menu bar glyphs.
    • Tooltip is now dynamic: shows "BPM Tapper — click to tap" in the ready state, "Keep tapping…" after the first tap, and " BPM — ⌘-click to copy" once a BPM is being measured.
  • New behavior:
    • ⌘-Click copies the current BPM to the clipboard, for quickly pasting tempo into a DAW or notes. Beeps if there's nothing to copy yet.
    • Removed the splash/instructions dialog that appeared on every launch. Instructions are still available via ⌥-Click.
  • Code health:
    • Bumped deployment target from macOS 10.13 → macOS 11.0 (required for SF Symbols).
    • Fixed a latent force-unwrap of NSApp.currentEvent in the click handler that could crash on programmatic / accessibility-driven invocation.
    • Tightened the instructions popup copy and switched it from a .warning alert style to .informational (it was using the yellow caution triangle for what is really just a help dialog).
    • Removed the now-dead noShowDialogOnStart preference plumbing and "Do not show this message on launch" suppression checkbox.
    • Removed the demo gif from the repo.

v1.3 — @harryclegg

  • Re-wrote the application logic from the ground up. Tap-interval tracking was split out into a dedicated BPMTapper class with explicit reset / averaging behavior; AppDelegate is now just the menu bar wiring.
  • Fixed the timing logic so the running average correctly weights every tap interval (#3).
  • Upgraded the Xcode project files to build cleanly on modern Xcode versions (#1).
  • Small user-interface and user-experience tweaks throughout.
  • Added an option to suppress the instructions popup at launch (later removed in this fork, since the popup itself no longer fires on launch).

v1.0 — @bencmbrook

  • Initial release of the menu bar BPM tapper for OS X.
  • Click in time with the beat; the menu bar shows the running average BPM.
  • Right-click to reset, control-click to quit.
  • Instructions popup on first launch with a "don't show again" option.
  • Yosemite (OS X 10.10) compatibility.
  • Packaged as a downloadable .zip once the original hosting site went down.

About

A lightweight beats-per-minute tapper for the macOS menu bar. Fork of harryclegg/bpm (originally bencmbrook/bpm).

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages