Skip to content
Projects

dsego/strobe-tuner has 43 GitHub stars and 3 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-15 21:10 UTC. Last push 2026-11-10.

How these counts are measured

What you can do

  • Multi-harmonic pitch detection: every harmonic of the note counts, a string's stretched partials allowed for (subharmonic summation).
  • Smooth and responsive strobe display, the stripe sharpness adapts to the signal quality.
  • Note lock: keeps the strobe on one note.
  • Harmonic mode: shows the partials of the detected note on up to 5 strobe tracks.

Measured star growth

in 24h
0
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

A lightweight strobe tuner for musical instruments

Creative & Media

README.md

Original

Strobie

A simple stroboscopic instrument tuner.

Strobie tuning a note

Strobie is coming to the App Store for Mac and iPhone. Try it in your browser, or read the source and build it yourself, see Development.

Features

  • Multi-harmonic pitch detection: every harmonic of the note counts, a string's stretched partials allowed for (subharmonic summation).
  • Smooth and responsive strobe display, the stripe sharpness adapts to the signal quality.
  • Note lock: keeps the strobe on one note.
  • Harmonic mode: shows the partials of the detected note on up to 5 strobe tracks.
  • Track settings: tap a track to choose its partial (1× to 8×, or the fifth at 1½×), move its target by up to ±50 cents (e.g. for a stretched octave) and change its spin rate.
  • Vernier mode: a geared mode that shows the same fundamental frequency in each band, but with increasing sensitivity.
  • Spin rate: 200% spins the strobe twice as fast per cent, for the final adjustment.
  • Readout: hertz and cents to a tenth, of the fundamental's track, the 2×'s, or a blend, the whole wave like most tuners. A guitar or piano string is stiff, so its partials run a little sharp and the three read a few cents apart, see Readout.
  • Readout speed: how long the cents average, 400 ms evens out a vibrato, 150 ms follows a string being tuned sooner.
  • Five displays, a menu under the strobe picks one, see Displays:
    • Strobe: curved tracks, a wheel or flat tracks, turned by a lock-in on each partial.
    • Lamp: the mechanical strobe, stripes lit by the wave.
    • Scope: the waveform synced to the strobe's frequency, tap it for petals on a circle.
    • Trace: the cents over time.
    • Spectrum: the spectrum of what the pitch detection hears, the loudest peaks named.
  • Note offsets: tune a note up to ±25 cents off pitch, the strobe stands still at the offset note.
  • Transpose for B♭, E♭, F and other transposing instruments.
  • Guitar, bass and ukulele tunings with an optional capo, the ruler shows only their strings.
  • Custom instrument: a preset of up to 10 notes of your own, e.g. a handpan's scale or a tuning that isn't built in, the ruler shows only them.
  • Concert A from 390 to 480 Hz, with 440, 442 and 432 in a menu.
  • Hertz/Cents display.
  • Four colorways (red, mint, amber, mono) and By note, a color per note. An optional retro glow.

License

Copyright ©️ 2025–2026 Davorin Šego
Licensed under the GPL v3
https://www.gnu.org/licenses/gpl-3.0.en.html

Third-Party Resources

  • PortAudio ring buffer, ported to Odin
    Portable Real-Time Audio Library
    Copyright (c) 1999-2011 Ross Bencina, Phil Burk

  • The Inter typeface family
    Copyright (c) 2016 The Inter Project Authors
    SIL Open Font License 1.1

  • Noto Sans
    Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic)
    SIL Open Font License, Version 1.1 .

  • SDL
    Copyright (C) 1997-2025 Sam Lantinga
    Zlib license

  • miniaudio
    Copyright 2025 David Reid
    Public domain (Unlicense) or MIT No Attribution

  • stb
    Copyright (c) 2017 Sean Barrett
    Public domain or MIT license

  • Phosphor Icons
    Copyright (c) 2023 Phosphor Icons
    MIT license

Development

You need Odin dev-2026-11 or later, the just command runner, git, clang (on macOS from the Xcode command line tools) and SDL3 (brew install sdl3). It draws with SDL3 GPU, Metal on macOS and iOS, Vulkan on Linux and Android.

git clone https://github.com/dsego/strobe-tuner
cd strobe-tuner
just dev

The first run clones and compiles the dependencies into external/, later runs skip that. The iOS, Mac app and Android builds link SDL in from external/<platform>/sdl3, built from source once with just sdl macos, ios-device, ios-sim or android, and again to update it.

Command What it does
just dev Debug build, then runs it
just dev stats Also shows the signal stats and the pitch detection's plot, the harmonic stack's or the NSDF's
just dev unlock With the one-time unlock's reminder and a pretend store, 10 s free and a reminder every 15 s; UNLOCK=storekit just ipa or just pkg sells it through the App Store, without UNLOCK the whole app is free
just dev ios Builds for the iOS simulator and runs it there, needs Xcode
just ipa Signed build for iPhone, see platform/ios/build-device.sh, needs Xcode and a provisioning profile
just apk Debug signed build for Android, see Android
just build Optimized build for this machine, build/strobie
just app The Mac app as build/macos/Strobie.app, signed ad hoc to run on this Mac, needs Xcode for the icon
just pkg Signed build for the Mac App Store, see platform/macos/build-pkg.sh, links SDL in statically
just test Unit tests of the pitch detection and strobe code
just accuracy Generated tones with and without noise through the tuner, checks the note and the readout within 1¢, just accuracy full for every note and three concert pitches
just recordings Your recordings in sandbox/samples (not in the repo), one note per file named like strat_E2.wav, shifted by known cents through the tuner, checks the readout follows the shift; just recordings <folder> csv for another folder as CSV

Debug builds also have Cmd, to open the config file and CmdShift, to reload it.

Linux

For development only, no release is planned, so there's no package and no icon. Not tried yet. It draws with Vulkan, just dev compiles the shaders with glslc, and needs SDL3 and a Vulkan driver. The audio libraries (PulseAudio, PipeWire through its PulseAudio server, or ALSA) are loaded at runtime. The first just dev also compiles Odin's vendored stb and miniaudio into the Odin folder, which has to be writable, the Linux install leaves them uncompiled.

sudo apt install clang git libsdl3-dev glslc  # Debian, Ubuntu
sudo dnf install clang git SDL3-devel glslc   # Fedora
just dev

The config is saved to $XDG_CONFIG_HOME/Strobie/config.ini, or ~/.config/Strobie/config.ini.

Android

For development only, no release is planned, the launcher icon is the iOS one scaled down. just apk builds a debug signed build/android/Strobie.apk, see platform/android/build.sh. No Android Studio or Gradle, only the command line SDK, adb and a JDK for SDL's Java classes and the build tools. just sdl android compiles SDL into external/android first. The first build compiles stb into the Odin folder with the NDK, where Odin's bindings look for it.

brew install --cask android-platform-tools android-commandlinetools
brew install openjdk@17

Homebrew's JDK is keg-only, the system java doesn't find it and sdkmanager fails with "Unable to locate a Java Runtime". Point the shell at it in ~/.zshrc:

export JAVA_HOME="$(brew --prefix openjdk@17)/libexec/openjdk.jdk/Contents/Home"
export PATH="$JAVA_HOME/bin:$PATH"

Then the SDK packages, sdkmanager --list | grep ndk shows the NDK versions:

sdkmanager "platform-tools" "platforms;android-35" "build-tools;35.0.0" "ndk;28.2.13676358"

To install on a phone, tap Build number in Settings → About phone 7 times, turn on USB debugging in Developer options, plug it in and accept the prompt from adb devices. ANDROID_DEVICE=usb just apk then installs and launches it. adb logcat -s SDL shows SDL's logs, brew install scrcpy mirrors the screen.

How it works

Audio signal path: the audio thread writes the input into three ring buffers. On the main thread the pitch detector picks the target note, which sets the reference of the lock-in and the lamp. The lock-in's phase turns the strobe tracks, the lamp's screen draws the scope and the lamp views.

Displays

The first four show how the note's phase slips against a reference at the target pitch, the fifth what the pitch detection hears:

  • Strobe: the tracks of a strobe tuner, one per partial in harmonic mode, still when in tune, turning left when flat and right when sharp. Flat, a wheel or curved. Each track measures its own partial with a single-bin DFT, a lock-in, see Stroboscopic effect.
  • Lamp: the disc of a mechanical strobe lit by a lamp that flashes with the wave. Every sample is folded onto two periods of the reference, the stripes as bright as the wave is high there. A detuned note drifts, and a fast drift smears to gray like on a real one. The height follows how loud the note is, its peak over the Persistence or at least the last 18 periods on a dB scale: −6 dBFS fills the screen and every dB quieter is a step lower, so a hum is about half as bright as a note sung out and a fading note dims as it fades. Its own Gain, up to 400%, lights a quiet note brighter and a loud one's crests wider. A Low-pass of its own, the Scope's filter, takes the room's hiss out of the stripes.
  • Scope: the same folded screen drawn as a wave, an oscilloscope synced to the reference. Tapped, the sweep goes round a circle, two periods a turn by default, so a sine draws two lobes and the partials bump and dip them, spinning clockwise when sharp. Periods shows 1 to 4 across or round, and Gain draws the wave up to 400% as high as its loudness says, a louder note runs off the screen. A low-pass keeps the first few partials, delayed alike so the shape stays. The sweeps are averaged over the Averaging span with the reference as the trigger, so the noise cancels out and a detuned note smears like the stripes. The beam is a Solid line, or Phosphor, dim where it moves fast and bright where it lingers. Its height follows how loud the note is like the Lamp's, with or without averaging.
  • Trace: the cents of the readout over the last few seconds, to see a vibrato or a drift. A dot at now draws the line, a little way in from the right edge.
  • Spectrum: the power spectrum of what the pitch detection hears, the loudest peaks named, a mark at each strobe track's partial. Not for tuning, its peaks are about 12 Hz wide: it shows what's there and how far over the noise, e.g. a fridge's hum louder than the string.

The cents readout comes from the lock-in in every display, or from the pitch detection with Readout on Blend, see Readout.

A tap on a view flips one of its options: the Scope's sweep, the Trace's range, the Lamp's rectifier and the Spectrum's scale. On the Strobe a tap on a track opens its settings.

Pitch detection

The pitch detection looks for the best stack of harmonics in the spectrum of the newest 4096 samples every frame, after Hermes' subharmonic summation. Each peak counts by how far it stands over the sound around it, not by its level, and only where a candidate's first ten harmonics fall, so a pluck's body thump, a song's bass and drums or a fridge's hum don't add to a note's stack. It also counts as far as its phase went on since the frame before at its own frequency, the way MP3's psychoacoustic model tells a tone from noise: a window's side peaks around a partial move at the partial's frequency and not their own, and stop making up stacks of their own. Its fundamental weighs each harmonic like the whole wave's period would, so the Blend readout reads the same mix of partials. A 20 Hz high-pass takes out DC and the rumble under the lowest note and a 5 kHz low-pass the hiss above the highest. How far the stack stands out tells a clear tone from a weak pitch. It keeps the octave of the note it follows, a steady octave beats one that flips.

The period of the whole wave, by autocorrelation via FFT after "A Smarter Way to Find Pitch" (Philip McLeod, Geoff Wyvill), is still in the code, H flips to it in a debug build. It weighs everything by its power: a ukulele's pluck thumps its body near 215 Hz as loud as the note, the two repeat every three of the note's periods, and it read E5 as A3 for 0.15 s. The stack misses a low note with a weak fundamental stepping exactly half a semitone, see KNOWN_ISSUES.md.

A ukulele's E5 at the pluck, its body thumping near 215 Hz, read two ways. The harmonic stack: E5's harmonics stand far over the background and add up, weighted down the stack, the thump's broad hump lifts its own background and is no peak, and a window's side peak, its phase moving at the partial's frequency, is left out. The whole wave, McLeod's NSDF: with the thump the wave repeats every three of the note's periods, that peak stands highest and it reads A3, a third of E5.

A new note has to hold for 50 ms before the strobe switches to it, so a single noisy detection of a decaying note doesn't reset the display, and its last two detections have to agree within 5 cents. An octave or another harmonic of the lit note holds for 100 ms. A window across a jump in the wave's phase, a tone generator starting a new note from zero, reads past the new pitch for as long as the window, and that overshoot could carry a note held 55 cents sharp over to the next one.

Stroboscopic effect

The strobe is driven by a lock-in amplifier (heterodyne): a single-bin DFT tuned to the target note's reference frequency (e.g. 110 Hz) measures the signal's phase against a reference oscillator, and the stripes turn by it.

  • Input: unfiltered. Each band's window and comb keep the note's other partials out, a track further off than its 70-cent band fades and doesn't count for the readout.
  • Frequency targeting: a windowed single-bin DFT at the reference frequency, over windows a hop apart through the frame's new samples, see below.
  • Demodulation: the DFT result is rotated by the phase of a reference oscillator on an absolute sample clock. In tune this phase stands still, detuned it rotates at the frequency difference.
  • Strobe motion: the stripes turn by the measured phase, times the track's speed.
  • Readout: each track's cents are the slope of a least squares line through its phase, older measurements weighted down, restarted after each pluck.
  • Stripe brightness: the stripes are as bright as the track's partial is sure, and fade out as the noise makes it unsure, see Stripe fade. Far off the note their edges soften too, from about 35 cents, and they're gone at 75.

Every track's window is sized for a band 70 cents wide around the fundamental, about 0.22 s at 110 Hz, gamma shaped and weighted toward the newest samples like an analog lock-in's low-pass, so the phase is as of about 60 ms ago instead of half the window. It's also smoothed with a box one period of the note long (two for a fifth), a comb whose nulls fall on the other partials.

Measured once a frame, a track more than half the frame rate off would alias, 30 Hz at 60 fps. So the phase is measured every quarter period of the note through the frame's new samples, and the frame's advance is the sum of the steps between them, each the shortest way. Every hop is against the same reference on the sample clock, so the steps telescope and nothing adds up from frame to frame.

One frame of a track: the reference runs on the absolute sample clock, a window a hop apart through the frame's new samples each gives a phase against it, and the steps between them add up to the newest phase minus the previous frame's plus the full turns, which a single measurement a frame loses.

The phase is rescaled so every note spins at the same rate per cent, and being a measured phase it can be multiplied by any factor: the track speed, the spin rate and the vernier mode are built on that.

Readout

The cents readout follows a strobe track, the fundamental's by default. A string is stiff, so its partials run sharp of whole multiples, a few cents on a wound guitar string, and every track reads its own cents. The chosen track reads out whenever its stripes fully show, however weak it is; otherwise the loudest fully lit octave track takes over. Once a track has read for 50 ms after a pluck, the readout stays on it until the next pluck or until its stripes fade, e.g. a low string's fundamental dying first.

The Readout setting picks what the readout, the gauge and the trace read:

  • 1×: the fundamental's track.
  • 2×: the 2nd partial's track, e.g. to tune octaves.
  • Blend: the pitch detector's cents, its partials weighed like the period of the whole wave, the way most tuners measure. It lands among the partials, the louder ones count more: a stiff string's sharp partials put it a few cents over the fundamental's track, and it drifts as they die away: +7¢ to -1¢ over 9 s on a Strat's low E whose 1× reads -6¢ to -8¢. On a wind instrument or a voice it reads the same as the 1×.

Not built: the tracks' own cents averaged by their level, a blend that keeps the strobe's precision. It would read sharp of the fundamental on a stretched string and move as the upper partials die away, like the pitch detector's.

Ways to build a strobe

The ways to turn the samples into a strobe display, what goes wrong with each, and which ones are in the app.

  1. Cutting frames (tried and dropped): each frame takes the newest samples and lines one reference period up with the pattern. No smear, a fast drift jumps from frame to frame instead of washing out to gray; a high note's few samples per period make the pattern move in blocks or jitter; and each band needs an IIR bandpass, whose phase shift differs from band to band.
  2. Folding (the Lamp and the Scope): every sample is placed on the screen at its phase of the reference and the screen fades like phosphor. Nothing is rounded or resampled, and the smear comes by itself: a slow drift stays sharp, a fast one washes out. A DFT bin of the screen per partial gives its phase as a number. It turned the strobe tracks for a while, but a pluck or a weak partial on the screen made the stripes jump.
    • Through a square-wave slot: strobeTuner (Scott Duplichan, GPLv3) multiplies the last 6 periods by a ±1 square wave at the band's pitch for each column, the same fold through a slot half a period wide, like a real disc's half black, half clear stripes.
    • Through a flash lamp: Stroboscopic Tuner (Adam Foster, GPL-3.0) fires the lamp only on samples above 70% of the frame's peak, like a neon lamp, with rings at ¼× to 8× the note. Nothing persists between frames, so a fast drift flickers instead of smearing.
  3. Phase lock (the default): the lock-in measures each partial's phase against the reference on the samples themselves, see Stroboscopic effect. The phase is continuous and shifts alike in every band, so the stripes move smoothly at any pitch.
  4. Flashed once a period (tried as a measurement and dropped): a pattern shows only at one point of each period of the note, its upward zero crossing or its peak, like a lamp flashing on a disc. It needs each partial band-passed out first and reads one instant a period where the lock-in uses every sample: on a weak partial it jittered about twice as much, and a low string's weak fundamental was lost under its 2nd partial.
  5. Simulated from a pitch detector: a pitch detector like NSDF or YIN gives the period but not where the wave is. Stripes turned by the detected cents drift with its noise while the note holds, a jump in phase doesn't show, and harmonic tracks can only be multiples of one f0. Here the pitch detector only picks the note.

Stripe fade

Each track also measures its partial over short windows, Blackman shaped and three periods of the note long, one closing every period. Over whole periods of the note its other partials cancel, and the smooth window keeps them out even when the note is a little off. While the partial is there the measurements point one way, turned by the track's own drift, and an attack's first ones only grow into it. Noise scatters their directions, and the stripes fade by how unsure that makes their average: full while it's within about a sixth of a radian, dark from 0.4. A partial that shimmers lets go at once, a steady one stays lit to the end of its decay however quiet. The readout fits and follows only fully lit tracks, and the note stays lit while any track's stripes are at least half there.

How a track's stripes fade: the samples cut into spans of one period of the note, a Blackman window three spans long closing every span measures the partial as a size and a direction. A partial's measurements point one way and its stripes are full, noise scatters them and they're gray. The stripes go from full at 0.16 radians of uncertainty, about 16 dB over the noise in the band, to dark at 0.4, about 8 dB: the readout follows fully lit tracks, the note stays lit while any track is half lit.

The pitch detection keeps a noise floor of its own for the whole signal, the input settings show it and the level over it. It follows the level while nothing louder plays and only creeps up slowly to catch a noisier room, never on a pitch, and it's relearned when the input changes or reopens.