Skip to main content

A fast, lightweight CLI music player built with miniaudio and Textual

Project description

Gamma: High-Performance CLI Audio Engine

Gamma is a fast, lightweight Terminal User Interface (TUI) music player designed for low-latency audio playback and flexible resource management.

Technical Architecture

Gamma has a separate, multi-threaded structure. This design keeps the user interface responsive while delivering high-quality audio output:

  • Concurrency Model: It uses a dual-thread architecture. A background daemon thread manages the C-bound Miniaudio backend. The main event loop handles the reactive TUI. This setup prevents UI jerkiness during hardware-intensive playback.
  • Memory Optimization: Leverages Python generators for library indexing, achieving O(1) memory complexity during filesystem traversal. This ensures near-instant boot times even with libraries exceeding 10,000+ files.
  • Reactive Design System: Built using the Textual framework with a custom CSS-in-TUI design system. It utilizes dynamic layout reflows to adapt to varying terminal dimensions without breaking the visual hierarchy.
  • Standardized Packaging: Follows the src-layout convention and utilizes Poetry for deterministic dependency resolution, ensuring 100% reproducible development environments.

Tech Stack

Installation & Setup

Gamma is packaged as a standard Python module. Ensure you have Poetry installed.

1. Build and Install

# Clone the repository
git clone [https://github.com/Vaibhavtripathi7/py-cli-music-player.git](https://github.com/Vaibhavtripathi7/py-cli-music-player.git)
cd py-cli-music-player

# Install dependencies and link the 'gamma' executable
poetry install

2. Execution

poetry run gamma

Control Interface

Key Function
Space Play/Pause
N Increment to Next Track
Enter Select Directory/Initialize Playback
D Toggle Dark/Light mode
Q Shutdown

Verification(Unit testing)

We use Mocking to simulate the audio engine, allowing tests to run in headless CI environments.

poetry run pytest -v

License

MIT license

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

veridis-0.1.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

veridis-0.1.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file veridis-0.1.0.tar.gz.

File metadata

  • Download URL: veridis-0.1.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for veridis-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9163787bd9eec600717528f41ec71ce9a32c3898b941d7981a19918e80f42340
MD5 2adf434fb75ed0567c87fd932f418a09
BLAKE2b-256 2e86af9b4b4fb3746420425d16735c66c05422d8fc49bc1e48d6b5981b0d863c

See more details on using hashes here.

File details

Details for the file veridis-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: veridis-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for veridis-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30ff20ce6712bf20d7f3bd3656afa812514db6040c5e4bf99848dfb36c68724c
MD5 e1fd1f33c86916c273fd2b53429c5f94
BLAKE2b-256 3f1481285c65b4ad0a94f97bebb3ac5b603da743b4da29600e3f1eda736b29c5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page