X11AMP

FROM Joel Hammer

After months of puzzlement,I have finally figured this out and so I thought I would share it with the list.

I have about 700 mp3's on my box, mostly from transferring my cd's onto my computer with cdparanoia. (No, I am not an mp3 server!) They are scattered over several directories on different operating systems and occasionally on different computers, depending whether my son has dragged his home from college.  Finding and playing them has become a problem. Building a playlist with x11amp seems long and hard. I tried various ways to feed the titles into x11amp on the command line, but all methods seemed to fail.

Although x11amp title1.mp3 title2.mp3 would play both properly, dir | x11amp doesn't work. dir | xargs -n1 -i{} x11amp {} worked, but you have to manually close x11amp after each song to get the next one to play. 

Command subsitution with x11amp `dir` always gave errors. 

Well, the solution was to remove all spaces, \'s, and apostrophes from the titles, so mv "I'm\ in\ love\ baby" to Im_in_love_baby. This took some tricky (for me) sed scripts, but it was doable.

Now, x11amp `dir` plays just fine. The other refinement is to use updatedb and locate to feed titles to x11amp.
x11amp `locate *[Ww]hitney*mp3` plays fine.

I keep all my mp3's in a separate database, just to keep things simpler. See man updatedb and man locate for the details of that. locate allows wild cards and other search patterns, but you'll have to experiment with them. They don't always act as expected.

To build a variegated play list, redirect locate to a file, not to x11amp.
locate *[Ww]hitney*mp3 > list
locate *Tina*mp3 >> list
locate Copeland >> list
x11amp `cat list`
To keep from wearing your fingers out, you can also mv x11amp to a shorter file name like x1.

P.S. For the real newbies: You have to use the top left key for command substitution, not the real apostrophe next to the return button.

searchSearch Index