Skip to content

"This is a CLI (Command Line Interface) music player developed in Python. It scans a local directory for MP3 files and provides a text-based menu for selecting songs. Users can control playback (Pause, Resume, Stop) directly from the terminal, making it a lightweight alternative to heavy GUI media players."

License

Notifications You must be signed in to change notification settings

toxicbishop/Music-with-python

Repository files navigation

Music with Python

This project aims to create a versatile music player using Python.

Versions

  • GUI Version 2: Located in Music-Player-GUI-version-2/. Upgraded modern GUI with playlist sidebar, volume control, and track navigation.
  • GUI Version 1: Located in Music-Player-GUI-version-1/. A simple modern GUI using customtkinter and pygame.
  • Legacy Version: Core logic in the root directory.

Getting Started

To run the latest GUI version (Version 2):

cd Music-Player-GUI-version-2
python app.py

CLI Version

The CLI version is a simple, lightweight command-line interface (CLI) music player built with Python and Pygame. It allows you to scan a local directory for MP3 files and control playback directly from the terminal.

✨ Features

  • Auto-Discovery: Automatically detects .mp3 files in the music_files directory.
  • Menu System: Simple numbered menu to select tracks.
  • Playback Controls: Pause, Resume, and Stop functionality.
  • Clean UI: Suppresses the default Pygame startup text for a cleaner look.

🛠️ Prerequisites

  • Python 3.x installed on your system.
  • Pygame, CustomTkinter, and Pillow libraries.

To install the required libraries, run:

pip install pygame customtkinter Pillow

📂 Project Structure

Project_Folder/
│
├── Music-Player-GUI-version-1/  # Base GUI implementation
├── Music-Player-GUI-version-2/  # Advanced GUI with playlist
├── music.py                     # CLI implementation
├── README.md                    # Main project info
├── LICENSE                      # MIT License
└── music_files/                 # Put your .mp3 files here

🚀 How to Run (CLI)

  1. Create the directory: Ensure a folder named music_files exists in the same location as your script.
  2. Add Music: Drop your .mp3 files into that folder.
  3. Run the Script:
python music.py

🎮 Controls (CLI)

Once a song is playing, use the following keys and press Enter:

  1. Pause (P): Pauses the current audio.
  2. Resume (R): Resumes audio from the paused position.
  3. Stop (S): Stops the music and returns to the main menu.

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

"This is a CLI (Command Line Interface) music player developed in Python. It scans a local directory for MP3 files and provides a text-based menu for selecting songs. Users can control playback (Pause, Resume, Stop) directly from the terminal, making it a lightweight alternative to heavy GUI media players."

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages