DIY Media Player
Here a proof of concept for a future teaching assignment (ok ok, also my own “itch” ;)… Build your own media player. Here PyGame is used to make a simple frameless window (which because of the black background *appears* to blend into my mostly black desktop image)… Also, the code makes use of Fabien Devaux’s lightweight python mplayer wrapper (that wraps a python class/object around mplayer’s “slave” mode).
Visualisation is simple, a filled circle whose radius grows linearly as the proportion of the current song plays out (the gray rim represents 100%). Color is random with every new song. Controls are even simpler, pressing the space button simply jumps to the next song in a random play list (the script starts by using os.walk to locate playable files from the user’s Music folder).
Below the PyGame window is Ralph Glass’s “circle.py” a very nice PyCairo demo showing off the silky smooth stylings of PyCairo / PyGTK which is where I am interested in heading (my nostalgia for cruncy pixelated edges only goes so far)…
The exercise gets me thinking about how you could have a different plugin animations to visualize different song’s “progress” from 0 to 100% that could then be swapped in for different songs. Imagine a song’s visualization remaining onscreen in some way so that an hours worth of listening would result in an image, that itself could be “active” and accessed as some sort of playlist / editing collage.
Some other questions that come to mind:
- How could a “visualisation” of listening to music become more than just eye-candy, and actually integrated into a particular “application”?
- Possibilities for networked use, how might a peer-to-peer shared listening system work, in contrast to the typical Web 2.0 centralized (your listening habits drive our business models) apps like last.fm.
- What other kinds of media could be “mixed in”? Imagine an algorithmic radio station that mixes “canned” music from your own collection with “live” elements (speaking the time, the weather, cutting in live streams), and also playing shared files / messages from a group server.
No Comments »
No comments yet.
RSS feed for comments on this post. TrackBack URI


