The Baton That Learned to Hear Us Drift

Pitch-Tracking Conductor Baton
🎮 Play: Baton Blend Rush

The soprano section drifted flat again on the F-sharp.

Not dramatically—maybe fifteen cents, the kind of error a trained ear catches and a pitch app confirms but an audience never notices. The problem is that I noticed, and by the time I’d shaped the cutoff, the moment had passed. My face said “pull it up” three beats too late.

Which is why there’s now a conductor’s baton on my kitchen table with an LED strip zip-tied to the shaft and an I2S microphone dangling off the tip like a fishing lure. My hobby is collecting hobbies, and hobby number twenty-two is building a baton that listens to the choir and tells them what I’m already thinking—only faster, and in colour.

The Problem With Faces

A conductor’s face is expressive but slow. By the time I furrow my brow at a pitch drift, the singers have already moved on. What I want is something that reacts in near-real-time: green when we’re centred, amber when we’re sharp, blue when we’re flat. The choir watches the baton anyway. Might as well make it talk.

The microcontroller is an ESP32 with an INMP441 MEMS mic feeding audio over I2S. Digital input means no noisy preamp, no hum from the fluorescent lights in the community centre, just a clean stream of samples at 16 kHz. The pitch detection runs a simplified autocorrelation loop—find the period of the waveform, invert to get frequency, convert to cents relative to A4. A cent is one hundredth of a semitone, a unit invented by Alexander Ellis in 1880 specifically so musicologists could argue about tuning with decimal precision. Now I’m using it to yell at sopranos via LED.

The maths for cents is straightforward:

cents = 1200 × log₂(f / 440)

Zero cents is concert A. A perfect fifth above is 702 cents. A major third in equal temperament is 400 cents, but a pure major third—the kind a good choir locks into—sits around 386 cents, which means my tracker thinks the choir is flat when they’re actually correct. I haven’t solved this yet. For now I’m treating “within ten cents” as green and hoping the ambiguity averages out.

Vibrato Is Weather

The first test run was a disaster. Not because the hardware failed—the ESP32 booted, the mic captured audio, the LEDs lit up—but because choral vibrato turned the baton into a strobe light. A trained singer’s vibrato oscillates ±30 cents at maybe six hertz, which means the pitch estimate swings wildly even when the note is perfectly centred. Raw data is not information.

Smoothing helped. I run a low-pass filter over the pitch estimates, averaging about five windows before updating the display. The baton now responds to trend rather than instant, which is closer to what a conductor actually cares about. If the section drifts flat over a sustained chord, the colour shifts. If a single singer wobbles, the baton ignores it. That’s the right behaviour.

When I was building Morse Canon Choir Loops, I learned that timing discipline is everything—the 1:3:7 ratio of dits to dahs to word gaps maps cleanly to musical subdivisions, and a sloppy loop seam ruins the canon. Pitch discipline is the same instinct applied to frequency instead of duration. The signal needs to be parsed before it can be useful.

Power Budget and Humility

WS2812 LEDs can draw up to 60 mA per pixel at full white. I’ve got sixteen of them on the baton, which means a theoretical maximum of nearly one amp—enough to brown out the microcontroller if I forget to budget. I learned this the hard way when the baton dimmed and the pitch tracker crashed mid-phrase. A dedicated 5V rail from a small LiPo and a logic-level shifter fixed the problem, but not before the altos saw me swearing at a stick.

The baton is heavier than I’d like. Jean-Baptiste Lully died in 1687 after stabbing his own foot with a heavy conducting staff during a Te Deum; the wound went gangrenous and killed him. Modern batons are lightweight for a reason. Mine weighs about 90 grams with the battery, which is manageable but noticeable. I’ll need to revisit the enclosure.

What the Choir Saw

At rehearsal, I didn’t explain the baton. I just used it. Green most of the time, a flicker of amber on the tenors’ entrance, blue when the basses let the seventh sag. Nobody asked why the stick was glowing. A few singers adjusted without being told.