Skip to main content

An MP3 music player interface

Project description

PyMusicPlayer

Downloads License Version Format Last Update

An MP3 music player interface for Python with builtin playback and queue functionality built using Pygame mixer

Installation

Install via pip

$ pip install pymusicplayer

Usage

from pymusicplayer import MusicPlayer

mp = MusicPlayer()
  • add_song(filename, song_name) - Add song to queue by filename and sets song name (defaults to filename)
  • remove_song(index) - Remove song at index of queue
  • get_current_song() - Return name of currently loaded song
  • get_queue() - Return names of songs in queue
  • get_loop_queue() - Return if queue will loop
  • set_loop_queue() - Set if queue should loop
  • shuffle() - Shuffle songs in queue
  • is_playing() - Return if music is currently playing
  • play() - Start playing loaded music
  • pause() - Pause loaded music
  • restart() - Restart loaded music
  • get_volume() - Returns volume of music
  • set_volume(volume) - Sets volume of music to value in interval [0, 100]
  • get_pos() - Get current position of loaded music in milliseconds
  • set_pos(pos) - Set position of loaded music in milliseconds
  • choose_song(index) - Load song at index in queue
  • next_song() - Load next song in queue
  • previous_song() - Load previous song in queue
  • skip(amount) - Skip amount (in milliseconds) in music (positive for forward, negative for rewind)

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

PyMusicPlayer-1.0.0.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

PyMusicPlayer-1.0.0-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

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