Monday, July 11, 2005

Pytone

"Pytone is a music jukebox written in Python with a curses based GUI."

It's also, as far as I know, the music player which best suits my needs.

A little background info - a while ago I decided that it was time to make my CD collection obsolete. I got to a stage where I had so much music on computer which I hadn't bothered to burn to CD that my music listening was split between the CD player and the computer, which seemed a bit stupid. I also had some problems with dodgy connections on my CD player, which means half the time I was only listening through one speaker, which was very frustrating. Hence I decided to migrate all of my music listening to be computer based.

Since I already had all my CDs in mp3 format anyway, this should've been a quite straightforward task. The first problem was that of connecting decent speakers to the computer (the computer speakers were fine for computer use, but just too damn small to listen to music on). Connecting bigger speakers directly to the computer wouldn't work, since the signal coming out of the computer is too small, so the sound was practically inaudible at full volume. My solution was to send the signal into the computer speakers (which have mains power and a little amp in them, and also helpfully, a headphone plug), and use them to amplify the signal, then send it to the big speakers through the headphone plug. It's not particularly elegant, but it works.

Then I needed a jukebox type player thing. I'd always used xmms, but this lacked the functionality to maintain a database of music and easily add and artist/album to the playlist. At least, if it did, I never found it, nor a plugin for it. All credit to Microsoft, I was looking for something more like Windows Media Player (although many aspects of that program I detest).

All of the programs which I found with the kind of features I wanted were bloated, or just plain wouldn't run on my system. And then I had the idea of using a terminal based player - terminal stuff tends to be very lightweight, and hence fast, especially on a system of my calibre; and also with pseudo transparent terminals, looks surprisingly good at little cpu/memory expense, and matches most other programs I might be running.

Pytone is a breeze to install, you just extract it to a folder (/usr/local is where I install all manually installed stuff), bung the configuration file in the right place (~/.pytone/pytonerc) and edit it, and then run it.

Of course, that's the theory. This time around I had some problems getting it to play, my initial choice of using mpg321 to do the actual playing part failing. Rather than trying to figure out what was wrong with it, I opted for the easy choice and changed the choice of player to the internal player. Of course that didn't work either.

I ended up trying pretty much all of the players in the conf file with their default settings, and none worked easily. However, xmms did give a reasonable error message, so I decided to work on getting that to work (since xmms works ordinarily, it seemed the easiest choice).

The error message was something like "module xmms.control not found", so I tried a "swaret --install xmms" to see what xmms related stuff I could install which might be needed. I noted two packages which I might need, xmmsctrl, and pyxmms (since it's a python based player).

I tried xmmsctrl first, based on the error message, but it didn't work.

Installing pyxmms did work however. Problem solved. (whether xmmsctrl is needed or not, I don't know, but the error message stayed the same after installing it, so I presume it's not),