Skip to content

🎡 A dual-interface Python Music Player built using Pygame and PyQt6 β€” supports both Command-Line (CLI) and Graphical (GUI) modes.

License

Notifications You must be signed in to change notification settings

hunjanhar/music-player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎡 Python Music Player (CMD + GUI)

A dual-interface Music Player built using Python, featuring both a Command-Line Interface (CLI) and a Graphical User Interface (GUI) built with PyQt6.
It supports MP3/WAV playback, song directory selection, pagination, album art extraction, and volume control.


πŸ“Έ Screenshots

πŸ–₯️ Command-Line Interface (CMD)

Intro Screen Main Screen Song List
Intro Main Songs

πŸͺŸ Graphical User Interface (GUI)

Intro Main Drag Drop Drag Drop Song Settings
Intro Main Drag Drop Drag Drop Song Settings

πŸš€ Features

πŸ”Ή Common Features

  • Play .mp3 and .wav files using pygame
  • Supports next, previous, repeat, and random song playback
  • Adjustable volume controls
  • Save and load last-used music directory
  • Exception handling for robustness

πŸ’» CMD Version

  • Simple and intuitive terminal UI
  • Paginated song listing using tabulate
  • Menu-driven navigation
  • Directory management via settings

πŸͺŸ GUI Version (PyQt6)

  • Elegant, modern interface with background and album art
  • Drag & Drop folder loading
  • Embedded album art from songs (via mutagen)
  • Persistent settings for last used folder
  • Interactive buttons for playback, volume, and navigation
  • Sound effects for transitions

🧩 Project Structure

πŸ“‚ Music-Player
β”‚
β”œβ”€β”€ πŸ“ cmd
β”‚   β”œβ”€β”€ main.py
β”‚   β”œβ”€β”€ access_songs_directory.py
β”‚   β”œβ”€β”€ operations.py
β”‚   β”œβ”€β”€ settings.py
β”‚   └── icons.py
β”‚
β”œβ”€β”€ πŸ“ gui
β”‚   β”œβ”€β”€ main_one.py
β”‚   β”œβ”€β”€ main.py
β”‚   β”œβ”€β”€ main_frame.py
β”‚   β”œβ”€β”€ intro.py
β”‚   β”œβ”€β”€ load.py
β”‚   β”œβ”€β”€ operations.py
β”‚   β”œβ”€β”€ operations2.py
β”‚   β”œβ”€β”€ settings.py
β”‚   β”œβ”€β”€ access_songs_directory.py
β”‚   └── πŸ“ assets
β”‚       β”œβ”€β”€ πŸ“ images
β”‚       β”œβ”€β”€ πŸ“ sounds
β”‚       └── πŸ“ dir
β”‚
β”œβ”€β”€ πŸ“ screenshots
β”‚   β”œβ”€β”€ πŸ“ cmd
β”‚   └── πŸ“ gui
β”‚
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .python-version
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ README.md
└── LICENCE

βš™οΈ Installation & Setup

1️⃣ Clone the repository

git clone https://github.com/hunjanhar/music-player.git
cd music-player

2️⃣ Create a virtual environment

python -m venv venv
source venv/bin/activate   # For macOS/Linux
venv\Scripts\activate      # For Windows

3️⃣ Install dependencies

pip install -r requirements.txt

▢️ Usage

πŸ–₯️ Run the Command-Line Version

cd cmd
python main.py
  • Enter your song directory when prompted.
  • Use menu options (1–10) to navigate, play, pause, and manage songs.

πŸͺŸ Run the GUI Version

cd gui
python main.py
  • Drag and drop a folder containing .mp3 or .wav files.
  • Use playback buttons to control the player.

🧠 Technologies Used

Library Purpose
Pygame Audio playback & sound effects
PyQt6 GUI interface
Mutagen Extracting embedded album art
Tabulate Table formatting in CMD
OS, Math, Random File management & logic handling

πŸ“œ License

  • This project is licensed under the MIT License β€” see the LICENSE file for details

About

🎡 A dual-interface Python Music Player built using Pygame and PyQt6 β€” supports both Command-Line (CLI) and Graphical (GUI) modes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages