Goodsong, a script for mpd to rate songs as “good”

multimedia.png

Brisbin, a regular over at the Arch linux forums has come up with a nifty little script for mpd called Goodsong.  It is for people who like to play their entire music collection on shuffle via mpd.  Occasionally,people like us all into a valley of bad music and end up hitting next far too much to get to a good song. For this reason he wrote goodsong.

From his site: http://pbrisbin.com:8080/goodsong.html

Essentially, you press one key command to say “the currently playing song is good”; then press a different key to say “play me a good song”.

Goodsong accomplishes exactly that. It creates a text file at ~/.goodsongs which you can auto-magically add the currently playing song to with the command `goodsong`. Subsequently, running `goodsong -p` will play a random track from that same list.

Oh don’t be fooled, goodsong has plenty of other useful options too, here’s the –help:

usage: goodsong [option]

  options:
        -p, --play       play random song from list, now
        -b, --build      build playlist from your list, play it
        -s, --show       display a random song from list
        -S, --smart      select a song from your list
                         find it in your current playlist
                         or add it; when the current song ends,
                         play it
        -h, --help       display this

        none             append playing song to list

Installation

Run the following in a terminal to install this script:

$ wget http://pbrisbin.com:8080/bin/goodsong
or
$ wget http://tuxtraining.com/files/goodsong
$ chmod +x ./goodsong

Now go ahead and place that file somewhere in your $PATH (or always call it with a full path).

Usage

Using goodsong is easy. You can always just run it from CLI, but I find it’s best when bound to keys. I’ll leave the method for that up to you, xbindkeys is a nice WM-agnostic way to bind some keys, or you can use your own WM’s configuration to do so.

Personally, I keep Alt-g as `goodsong` and Alt-Shift-g as `goodsong -p`. Note: You’re going to have to spend some time logging songs as “good” before the -p option becomes useful.

The script in it’s current “Live” form can be viewed here or here. Always refer back to that link for the most up to date version. The first link is a symlink to brisbin’s own ~/.bin so it doesn’t get any fresher.  The second is a mirror of hit here  at this site.

Related Posts

Comments are closed.