Guitar tuner for macOS and Linux
- Zig 88.2%
- C 11.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src | ||
| .clang-format | ||
| .gitignore | ||
| build.zig | ||
| build.zig.zon | ||
| README.md | ||
| screenshot.png | ||
t4mt
Terminal guitar tuner in Zig. Shows the closest note, the frequency, and the cents offset.
Audio goes through miniaudio (fetched by build.zig.zon):
CoreAudio on macOS, PulseAudio/PipeWire, ALSA or JACK on Linux. Pitch detection uses YIN.
zig build -Doptimize=ReleaseFast # needs Zig 0.16; on macOS, build natively (needs the SDK)
./zig-out/bin/t4mt # auto-picks a Focusrite "Inst" input
./zig-out/bin/t4mt --list # list capture devices
./zig-out/bin/t4mt -d 3 # pick by index...
./zig-out/bin/t4mt -d "Input 2" # ...or by name substring
./zig-out/bin/t4mt -c 2 # force input channel 2 (default: loudest)
./zig-out/bin/t4mt -a 432 # different A4 reference
zig build test
zig build clangd # write compile_flags.txt so clangd finds miniaudio.h
On macOS the Scarlett shows up as one stereo device. Input 2 (instrument) is channel 2, and the loudest channel is picked automatically.