[lug] random album mp3 player

j davis davis_compz at hotmail.com
Sun Nov 10 02:37:08 MST 2002

>>>>Ben Luey wrote:
>>>>>This is probably a ridiculously easy question. How do I play a random
>>>>>album from my mp3 collection? Xmms and Zinf (formerly freeamp) will 
>>>>>sort a
>>>>>playlist randomly, but I want to randomize by album, not by track /
>>>>>individual file. Or, if it could select a random playlist, I could make 
>>>>>play list for each album. This seems like an easy task -- can xmms or 
>>>>>do this?
>>this might work if you put you playlist in /home/records
>>HTH :)
>>#! /usr/bin/perl
>>@array = `ls /home/records`;
>>$num = 0;
>>foreach $i (@array){
>>      $num++;
>>srand;                      # not needed for 5.004 and
>>$index   = rand @array;
>>$element = $array[$index];
>>while( $num > "0"){
>>       `xmms $element`;
>>       $num--;
>and if this works you could easily add a xmessage saying
>list over and maybe map a button so it restarts...also
>i dont think this scrip will play every .pls you have...
>maybe say while($i > -5)..might hear a repeat...
>you could do some checking though.....

oops...i meant while($num > -5)


Add photos to your e-mail with MSN 8. Get 2 months FREE*. 

More information about the LUG mailing list