CLI microphone tuner for bouzouki, tzouras, baglama and classic guitar in Rust.
cli_tuner listens to your default system microphone, estimates the played pitch in real time, and prints the nearest target string with the cents offset.
- Supports
tetrachordotuning:C3 F3 A3 D4 - Supports
trichordotuning:D3 A3 D4 - Supports
classic-guitartuning:E2 A2 D3 G3 B3 E4 - Uses the default system microphone
- Prints the nearest target string, frequency, and cents offset
- Supports adjustable concert A reference with
--reference - Can print tuning targets without opening the microphone via
--list
- Rust and Cargo installed
- A working input microphone
- Microphone permission granted to your terminal app on macOS
Check your Rust toolchain:
rustc --version
cargo --versionClone the repository and build it:
git clone https://github.com/thrasos/cli_tuner.git
cd cli_tuner
cargo build --releaseRun the release binary directly:
./target/release/cli_tuner --tuning trichordoYou can also run it without a release build:
cargo run -- --tuning trichordoIf you have cargo installed, install with:
cargo install cli_tunerIf you are on a mac, Install from Homebrew:
brew tap thrasos/tap
brew install cli-tuner- Tune your instrument in a quiet room.
- Place the microphone reasonably close to the instrument.
- Start the tuner with the tuning preset you want.
- Pluck one string or course at a time.
- Read the output: detected frequency in Hz, nearest target string, cents offset, and whether to tune up, tune down, or hold the note as in tune.
Example output:
312.88 Hz | D4 high Re | +109.7 cents | tune down
294.22 Hz | D4 high Re | +3.3 cents | in tune
If the output says tune up, the detected pitch is flat.
If the output says tune down, the detected pitch is sharp.
C3F3A3D4
D3A3D4
E2A2D3G3B3E4
Show help:
cargo run -- --helpStart the tuner with tetrachordo:
cargo run -- --tuning tetrachordoList string targets without opening the microphone:
cargo run -- --tuning trichordo --listClassic guitar example:
cargo run -- --tuning classic-guitarUse a different concert A reference:
cargo run -- --tuning classic-guitar --reference 442--tuning,-t: Selects the tuning preset--reference,-r: Sets concert A in Hz, from400to490--list: Prints target strings and exits--help,-h: Prints help
- The tuner uses the default system input device.
- Pitch detection is optimized for approximately
70 Hzto550 Hz. - Best results come from single notes or courses played clearly, without heavy background noise.
- Check that your microphone is connected and selected as the default input device.
- Make sure no other app is blocking access to the microphone.
- On macOS, enable microphone access for your terminal in System Settings > Privacy & Security > Microphone.
- Move closer to the microphone.
- Reduce background noise.
- Pluck only one string or course at a time.
- Let the note ring clearly before adjusting the tuning peg.
Run the test suite:
cargo test