Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-20 02:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found