Skip to content

Conversation

@Sachin-Bhat
Copy link

@Sachin-Bhat Sachin-Bhat commented Jan 12, 2026

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

Reorder imports; drop unused sys/ticker

Use MouseButton enum; normalize tuple unpacking/slider axes

Make zip strictness explicit; fix whitespace/indentation

Signed-off-by: Sachin Bhat <[email protected]>
add mmap-backed raw loader and duration helpers

add waveform bucket/min-max helpers and math utilities

expose Python bindings including numpy fast path

Signed-off-by: Sachin Bhat <[email protected]>
add clap-based CLI and navigation state

render min/max buckets with autoscaled Y-range

add status/footer UI and keyboard shortcuts

Signed-off-by: Sachin Bhat <[email protected]>
run visualizer via module entrypoint in Makefile

use Rust autoscale/decimation when bindings exist

track stubs and update ignore list

Signed-off-by: Sachin Bhat <[email protected]>
Signed-off-by: Sachin Bhat <[email protected]>
Copy link

@manishin2050 manishin2050 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice job

have you checked.?

@qasim78678
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants