KEMBAR78
GitHub - orhun/tuitar: A portable guitar training tool πŸŽ›οΈπŸŽΈ
Skip to content

orhun/tuitar

Repository files navigation


Learning how to play guitar with a TUI - hence Tuitar.
Written in Rust & built with Ratatui


Tuitar is a terminal-based guitar training tool that runs standalone on ESP32 hardware. See the features.

Available as a DIY kit, see the firmware and hardware sections for more details.

Note

Tuitar is currently in prototype stage but you can still try it out and contribute to the project.

The plan is to feature it on CrowdSupply once the firmware and hardware are stable. Let me know if you are interested in supporting the project or have any feedback!

All of this is built on livestream as a part of a series called Becoming a Musician (100+ hours of content!)

Table of Contents

Features

Tuning

Tuitar offers real-time visualizations from an input source which can be used for tuning your guitar or other instruments.

The frequency graph above shows the detected frequency of the input sound. When a fundamental frequency is detected, the closest musical note is being displayed with the respective cents with a bar at the top.

Also, the dots next to the displayed note indicate the distance to the perfect note in cents (left/red for flat, right/green for sharp).

When the displayed note is green and the bar is centered, it means that the input sound is perfectly in tune with that note.

Fretboard Tracking

Tuitar can track the notes you play on your guitar in real-time and display them on a virtual fretboard.

The default (live) mode shows the currently pressed strings and frets:

One fun thing you can do is to switch to random mode which is a small game where you get points by playing the correct notes shown on the screen. There is a timer and a score counter at the top.

The song mode is also available which shows the notes of a pre-loaded song. It's useful for learning riffs, solos or any melody.

Note

You can load a song onto the device by placing the MIDI file (.mid) or Guitar Pro file (.gp3, _.gp4, _.gp5) into the tuitar-core/songs directory and re-flashing the firmware. This will be made more user-friendly in the future.

The scale mode also helps with learning scales.

The available scales are:

  • Major and Minor
  • Pentatonic (Major and Minor)
  • Blues
  • Mixolydian
  • Dorian
  • Lydian

You can also press the mode and menu buttons to toggle the root note. (See controls for more information.)

In every fretboard mode, turning the control knob will change the focused region of the fretboard. This is useful for practicing scales or riffs in different positions. Unison is also supported, so you can play the same note on different strings and it will be highlighted on the fretboard.

Signal Analysis

If you need additional information about the input signal, you can use the waveform and spectrum graphs.

Waveform

Shows the raw audio signal over time. You can change the focused region in the chart by turning the knob. It is especially useful for debugging the input since the y-axis is simply shows a voltage from 0 to 3.3V.

Spectrum

Shows the frequency spectrum of the input signal. Especially useful for dB measurements and debugging the input. The x-axis is frequency in Hz while the y-axis is the amplitude in dB.

Input modes

Tuitar currently supports 2 input modes:

  1. Microphone input
  2. Jack input (6.35mm)

Press the mode button to switch between the input modes. The current mode is displayed at the left bottom corner of the screen. ([M] or [J])

FPS

The current FPS is being shown on the right bottom corner of the screen.

Controls

Tuitar has a simple control scheme with 2 buttons and 2 knobs. The controls are context-sensitive, meaning they change their function based on the current tab.

Global

Control Action Function
Gain knob Turn Adjust input gain (jack sensitivity)

Fretboard

Control Action Function
Mode button Short press Switch fretboard mode (Live ↔ Random ↔ Scales ↔ Song)
Mode button Long press Switch input mode (Mic ↔ Jack)
Menu button Short press Go to the next tab
Menu button Long press Change scale
Mode + Menu Short press Toggle root note or song
Ctrl knob Turn Scroll fretboard

Frequency/Spectrum/Waveform

Control Action Function
Mode button Short press Switch input mode (Mic ↔ Jack)
Menu button Short press Go to the next tab
Ctrl knob Turn Scroll frequency chart

Terminal

Tuitar also runs as a terminal application.

To install:

cargo install tuitar --locked

Run:

tuitar

It only supports pitch detection and fretboard tracking for now, but you can use it to practice your guitar skills without the hardware.

Architecture

The codebase consists of the following crates:

  • tuitar-core: The core logic and UI of Tuitar.
  • firmware: The firmware for the ESP32 hardware.
  • hardware: The hardware design files for the Tuitar kit.
  • tuitar: The terminal application for Tuitar.
  • ratatui-fretboard: A crate for rendering fretboards in terminal applications using Ratatui.

The dependency relationship is as follows:

tuitar-core
 └── ratatui-fretboard

firmware
 β”œβ”€β”€ tuitar-core
 └── ratatui-fretboard

tuitar
 β”œβ”€β”€ tuitar-core
 └── ratatui-fretboard

hardware (no code deps)

Old Demos

Here are some demos from the development phase.

Tuitar running on ESP32 T-Display:

tuitar-demo.mp4

With jack input:

tuitar-demo2.mp4

License & Contributions

This project can be used under the terms of the Apache-2.0 or MIT licenses. Contributions to this project, unless noted otherwise, are automatically licensed under the terms of both of those licenses.

πŸ¦€ γƒŽ( ΒΊ _ ΒΊ γƒŽ) - respect crables!

Feel free to open issues or PRs for improvements, bug fixes, or ideas!

Copyright

Copyright Β© 2025, Orhun ParmaksΔ±z

About

A portable guitar training tool πŸŽ›οΈπŸŽΈ

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Languages