#17

TUI visualization

DraftSachin-Bhatwants to merge intofrom

Hi @torvalds,

Great project! Just thought that I could contribute a TUI visualizer to the project. I also did some reorganisation of the project by introducing package management with uv built with maturin to play well with rust crates. Now visualize.py has been moved inside the python/audionoise directory with linter (basedpyright + ruff) fixes. Now this visualizer optionally uses functions exposed from the rust crate ABI. I believe what is missing is live audio capture but the TUI should be fairly flexible. Here is what needs to be done:

  • A capture backend (e.g., cpal/rodio for ALSA/Pulse/JACK/CoreAudio) to feed samples.
  • A ring buffer in core to hold the most recent window (e.g., 5–30s).
  • TUI logic to anchor the window to “now,” with an optional follow/hold toggle.
  • maybe also run the TUI with a --live flag to differentiate it from the current file-based input

I will send this in as a draft PR for now. Let me know if you would like me to add live capture in this patch-series or in a new set of patches.

You can test it with:

make input.raw output.raw
cargo run -p audionoise-tui -- input.raw output.raw --rate 48000

Thanks, Sachin

Activity

11
manishin2050reviewed9mo ago
manishin20509mo ago

nice job

have you checked.?

qasim786789mo ago

Hi Sachin, thanks for putting this together. This is a big and interesting contribution. The TUI visualizer is a great idea and the structure you’ve set up around core utilities, the TUI crate, and the Python packaging is solid.

I like the direction here, especially separating core logic and making the TUI able to reuse it. The docs and example commands are also helpful.

Before this moves forward, I think it would be good to slow this PR down into a more focused series. Right now it mixes several large changes: workspace setup, Python packaging, core utilities, and the new TUI. That makes it harder to review and reason about.

A few thoughts:

• It would help to split this into smaller PRs (for example: core utilities, TUI visualizer, Python/package reorg). • Live capture probably makes sense as a follow-up PR. Keeping this one file-based first will make review and testing easier. • We should discuss whether introducing uv/maturin and the workspace layout fits the long-term direction of the project before merging structural changes.

Overall, the idea is strong and the implementation looks promising. If you’re okay breaking this into smaller pieces, I think this could move much more smoothly.

This pull request is a draft

Merging is unavailable until it is marked ready for review.