Pygame mixer set up


Fugazi1978

Still Fresh
Joined
Jul 2, 2012
Messages
3
Let's pretend I'm thick (not much of a leap); what would be the simplest python program to play pie.mp3 from the folder the python program is in, AND take a single keystroke to pause the track? I've been told to use pygame but as most everything comes up with errors for me I need help! I'm using linux (and it can be dependent on os as I need it only to work on linux) and have installed pygame, pyglet, avbin, mpg321, mplayer amongst others in my quest to do this!


Please help, it's 20 years since I programmed in basic.


Matthew.
 
If you want opengl, I'd suggest to use sdl/c++/opengles, as ai think noone has ported pygame for opengles usage, otherwise pygame is fine nd simple.


Sorry, I don't know about your main question.
 
It's for a screenless RaspberryPi being hacked onto a classic car stereo to make an mp3 player that scans a memory stick and plays the mp3s it finds. It'll be command line run with no screen on debian.
 
You know, that these boards are about the OpenPandora handheld?


Maybe someon with some python knowledge will chime in, but it would be better to ask such questions othe python forums maybe.
 
There isn't a Pygame forum, just a Pygame mailing list. There's a Python forum, though, at python-forum.org.


Regarding your question, it wouldn't be that hard to do it simply. Just import and init Pygame, start playing the music, and use a loop to count the time and use events to detect that keystroke. I don't know if this would be good enough for your use-case, though.
 
Back
Top