Deb Thornton
← Work

A drift-corrected metronome for Stream Deck

A Stream Deck plugin that turns a physical dial into a metronome, built on a self-correcting timer instead of a setInterval loop.

JavaScriptStream Deck SDK

Context

My Stream Deck+ lives mounted on my digital piano, not a desk: I take lessons remotely over Zoom, streaming a camera view of myself plus a video overlay of just the keys, and use the Stream Deck to switch views, launch software, and control audio without leaving the bench. A metronome was the one thing missing from that setup, and it needed to hold perfect timing even as its click carried over the Zoom audio to my teacher. I wanted it built into the hardware already in front of me, not another phone app or browser tab competing for attention. The Stream Deck SDK gives you raw event callbacks and a display surface, but not an accurate clock.

Approach

The core of the plugin is a timer that tracks the drift between when a beat was expected and when it actually fired, then shortens or lengthens the next interval to compensate, rather than trusting setTimeout/setInterval to stay accurate over hundreds of beats.

The dial does triple duty: rotating it adjusts BPM (or beats-per-measure, or accent pattern, depending on mode), pressing it cycles between those three modes and swaps the physical display layout to match, and tapping the touchscreen starts or stops the metronome. Accent patterns can emphasize the first, last, even, or odd beat of a measure, each triggering a distinct click sound.

Outcome

A metronome accurate enough for real practice use, living on hardware I already have running, with no phone or separate app needed.