A while ago, I got really tired of needing to change out the CD in my CD-ROM drive every time I got tired of hearing the same six songs over and over again. It's no big deal at first, but it gets old. So I devised this system:
If you have a good-sized CD collection, the resulting playlist will have quite a variety of music in it, yet the music you really like a lot will come up often, so you won't feel like it's constantly playing stuff you only sort-of like. But everything rated 5 or higher gets played occasionally. (Tracks rated below 5 you don't even have to rip, and in any case they won't be on the playlist.)
There are only two downsides to this approach: it only works if your filesystem supports symlinks, and it uses up a few gigabytes of hard drive space. But for being able to set your media player going and leave it running on the same playlist for days and days without getting bored of the same old music or annoyed at the lack of variety, it's hard to beat.
The code, of course, is very simple:
#!/usr/bin/perl -- -*- cperl -*- `rm -rf probabilistic/*`; chdir "probabilistic" or die "Cannot change to probabilistic directory +: $!\n"; $.='_'; $weight=1; foreach $n (5..10) { $rating = sprintf("%02d", $n); print "*** Items rated $rating:\n"; foreach (<../$n/*>) { $target=$_; s/.*\///; # (Greedy match goes to last slash.) ($basedest, $ext) = ($_=~m/(.*)[.]([^.]+)/); foreach $dn (1..$weight) { print "ln -s $target $rating$.$basedest$.x$dn.$ext\n"; `ln -s $target $rating$.$basedest$.x$dn.$ext`; } } $weight+=2; }
update: As it happens, xmms is the media player I'm using, but I was not aware of IMMS. Still, my approach allows one "playlist" (directory of symlinks) to be used by any media player (err, any media player that will run on a system that supports symlinks). OTOH, IMMS appears to adaptively determine ratings on the fly by your skipping patterns; whereas, in my system you rate all the songs upfront. So the idea is similar, but the details are different.
In reply to music playlist weighted by rating by jonadab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |