Python Forum
A little general help to make a music player
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A little general help to make a music player
#1
Hello everybody,

Recently our lecturer told us that we'd have to make a project in order to finish the course and two of my friends and I chose ours to be a music player. If anyone has any sort of links, functions, methods, libraries (and ways to use them), please share all of that stuff in this topic. Basically I want to make a regular music player with some extras. Here's an image of how it should look like: https://i.imgur.com/Vy9XFOK.png
I can make the buttons, album art, song info (I think) but I really need help with the playlist, lyrics and open file dialog box (and probably other stuff that will turn up eventually). Any kind of help is appreciated.
Reply
#2
My suggestion:
use any GUI module. I for myself love PySide, though it is not released for python3.6, but hey python3.5 :D
Take a ListView for your playlist, an TextBrowser for your lyrics, Some image Widget for the song art. I dont know if open song should be a button to open a song, or the opened song/path, either use a Button or a Label. below use some Buttons and labels for Play/Pause, etc. and for the Song informations.
Here is a small tutorial for PySide with how buttens etc. work: https://wiki.qt.io/PySide_Tutorials
How to Program the rest just do a quick google search :) If you want to make it yourself easy, you can build the app by using the Qt Designer. and then you can convert the ui to py by using https://stackoverflow.com/questions/1842...-to-python if you like :) To Play the music there are many ways, the way I know is using PyGame, but there are others as well :)
Reply
#3
you can search for packages here: https://pypi.org/pypi/
example: https://pypi.org/search/?q=mp3+player
Reply
#4
Thanks for the quick replies, I was thinking of using wxPython for the GUI stuff as that's what I'm familiar with.
Reply
#5
Here's a helper for wxpython if you don't already have it:

Note: The following assumes you are using python 3 (preferably latest version (which at writing is 3.6.5))
The demo is very complete and contains the demo code for all.
Reply
#6
Yes, I have wxPython installed but am on Python 2.7.14. This thing is too hard :D How to get album art & song info the easiest way? I got the song info like artist, title, album, composer with some module but if a field was missing (empty) in the MP3 file, it gave an error/exception so I didn't stick with that. Could never get album art to work though.
Reply
#7
The new phoenix version (which is the only wxpython I would recommend) only runs on python 3.
so if you are using antique python, you get antique wxpython.
Reply
#8
OK, so I installed Python 3.5.4. Maybe I won't use wxPython, need a faster solution so found this: https://faisalpp.wordpress.com/2015/02/1...10-minute/
Hopefully everything will install fine.
Reply
#9
I managed to make the GUI part I guess. But now when I use "pyuic4.exe GUI.ui > GUI.py" it makes the Python file, which is great. I have a stupid question though, how to actually run this GUI.py file so that it displays the window? I tried a few Qt app templates (skeletons?) but none worked, always gave errors. This is how it looks: https://i.imgur.com/hIis6da.png
The three squares in the middle should be buttons made up of my own PNG images (if that's even possible), the left big white space is a list view and should be a playlist and the right one is a text browser and should display the lyrics if the song has any in it. "Open File" opens a dialog box from which I can select a file to play (currently I only know how to play MP3, need M3U/PLS later on).
Reply
#10
Quote:OK, so I installed Python 3.5.4
why not 3.6.5?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PLayer vs.PLayer game candylicious 1 3,015 Nov-04-2017, 08:33 PM
Last Post: Lux

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020