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."

Notifications You must be signed in to change notification settings

toxicbishop/Music-with-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽต CLI Python Music Player

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 library.

To install the required library, run:

pip install pygame

๐Ÿ“‚ Project Structure

Project_Folder/
โ”‚
โ”œโ”€โ”€ music.py
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ music_files/
    โ”œโ”€โ”€ song1.mp3
    โ”œโ”€โ”€ song2.mp3
    โ””โ”€โ”€ ...

๐Ÿš€ How to Run

  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

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.

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages