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.
- Auto-Discovery: Automatically detects
.mp3files in themusic_filesdirectory. - 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.
- Python 3.x installed on your system.
- Pygame library.
To install the required library, run:
pip install pygameProject_Folder/
โ
โโโ music.py
โโโ README.md
โโโ music_files/
โโโ song1.mp3
โโโ song2.mp3
โโโ ...- Create the directory: Ensure a folder named music_files exists in the same location as your script.
- Add Music: Drop your .mp3 files into that folder.
- Run the Script:
python music.pyOnce a song is playing, use the following keys and press Enter:
- Pause P Pauses the current audio.
- Resume R Resumes audio from the paused position.
- Stop S Stops the music and returns to the main menu.