I did something similar, and talked about that in Belfast on YAPC::EU-2004. Maybe you can pick up some ideas to extend your script. Listening to music you like during work certainly improves both work and motivation :)

My "radio" followed the playlist on the website of the station that was playing, and noted all song-switches. It then used a database with my song-ratings and modified the volume. If I had rated a song a 10, the volume went up, if I rated it 2 the volume was turned down. If a song started that I rated 1 or less, it switched stations.

The interface also allowed ratings for new songs (it displayed the rating if available) and then stored the rating in the database. I still have that database:

$ ratings.pl Low ratings: | 1 64 groups, 492 songs | 2 90 groups, 319 songs | 3 76 groups, 95 songs | 4 55 groups, 62 songs | 202 groups, 968 songs Medium ratings: | 5 42 groups, 42 songs | 6 52 groups, 56 songs | 92 groups, 98 songs High ratings: | 7 152 groups, 196 songs | 8 240 groups, 403 songs | 9 137 groups, 431 songs | 10 40 groups, 150 songs | 415 groups, 1180 songs Total: | 710 groups, 2246 songs Avarage rate: 5.4

I meanwhile skipped to two stations that fit my taste better and seldom need switching. (I still have to switch when either one is off-line). Both these stations now send title and performer in the stream, so I don't have to follow websites anymore. GStreamer gives me that info while playing. As xmms is dead, I also no longer use that, but a handcrafted radio.pl written in perl/Tk.


Enjoy, Have FUN! H.Merijn

In reply to Re: SoundOff Program (eg. for Pandora Radio) by Tux
in thread SoundOff Program (eg. for Pandora Radio) by liverpole

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.