Chromatone spectrogram written in Rust for the terminal

lucky7xz2 pts0 comments

GitHub - lucky7xz/chromaTUI: The Chromatone spectrogram rewritten in Rust for the terminal. · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

lucky7xz

chromaTUI

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>4 Commits<br>4 Commits

src

src

.gitignore

.gitignore

Cargo.lock

Cargo.lock

Cargo.toml

Cargo.toml

LICENSE

LICENSE

README.md

README.md

View all files

Repository files navigation

chromaTUI

The Chromatone spectrogram rewritten in Rust for the terminal (ratatui). Speak at the mic and watch pitch the color: every A is red, one full rainbow per octave.

Use it fullscreen — below 140×35 cells it shows a "too small" screen. Needs a truecolor terminal and a microphone.

demo_compressed.mp4

Build & run

Needs a Rust toolchain (rustup) and a working microphone.

git clone https://github.com/lucky7xz/chromaTUI.git && cd chromaTUI<br>cargo run --release # or: cargo build --release && ./target/release/chromatui

cargo run (debug) is fine too — the dev profile is built at opt-level = 2 so it stays smooth. On Linux you need ALSA headers for cpal: sudo apt install libasound2-dev (or alsa-lib-devel on Fedora).

Terminals

The whole screen is repainted every frame, so your terminal emulator matters more than one wouldd expect. In my own testing : ghostty > wezterm > gnome-terminal . Run with CHROMATUI_STATS=1 to print frame-time stats on exit and compare on your own machine.

Keys

Key<br>Action

↑/↓ / Tab / 1–7<br>select a control

←/→ (Shift = coarse)<br>adjust it

auto-calibrate sensitivity (mic: measures your room ~1s; internal: snaps to a fixed baseline)

help overlay: keys + what each setting does

note-color wheel: which note is which color

flip orientation (pitch vertical ↔ horizontal)

switch input: microphone ↔ internal audio

Space / Enter<br>pause / clear

reset all settings to defaults (asks y/n)

quit (saves settings)

Controls

fft size — pitch sharpness vs. responsiveness: bigger = tells close (low) notes apart better but reacts slower.

smooth — blends frames; 0 = instant and jittery, higher = calmer but smeared.

speed — waterfall scroll rate, ¼×–4×; slower shows more history, faster stretches detail.

midpoint — sensitivity: how loud a sound must be to show up. c sets it automatically, and what that means depends on the input. On the mic it measures your room's noise floor for ~1s, so stay quiet — every room and mic gain is different, so it has to be measured. On internal audio nothing is measured: digital audio has a fixed reference (0 dBFS is the same on every machine), so c snaps to a constant baseline — a stable visual anchor, the same track always paints the same picture. The two levels don't transfer (internal arrives ~25 dB hotter than a mic hears the same sound), so hit c after switching with i.

steep — contrast: high = crisp on/off lines, low = soft gradients showing loudness.

range lo/hi — pitch span on screen; default C2–C6 (singing voice). Narrower = more detail per note.

Settings persist in ~/.config/chromatui/config.toml. The original web app lives in research/spectrogram/ and defines all the math this port reproduces.

AI notice: this project was built with heavy use of AI coding assistants. The design decisions are mine; a lot of the code was written by an LLM under review.

License

MIT — see LICENSE.

About

The Chromatone spectrogram rewritten in Rust for the terminal.

Resources

Readme

License

MIT license

Uh oh!

There was an error while loading. Please reload this page.

Activity

Stars

stars

Watchers

watching

Forks

forks

Report repository

Releases

No releases published

Packages

Uh oh!

There was an error while loading. Please reload this page.

Contributors

lucky7xz<br>MLP

Languages

Rust<br>100.0%

You can’t perform that action at this time.

terminal chromatui cargo rust license spectrogram

Related Articles