You are not logged in.

#1 2010-05-01 21:00:37

keenerd
Trusted User (TU)
Registered: 2007-02-22
Posts: 647
Website

Albumbler - A psychic playlist generator

Download: http://kmkeen.com/albumbler/albumbler

Requires python2 and one of mocp/cmus/mpd.  (But I want to add your media player too!)

Think of it as StumbleUpon for your music library.  It presents you with one command.  Run this command (or bind it to a hotkey) and it will try to guess what you are interested in listening to.  If it guesses wrong, run it again.  It keeps a log of everything you don't like (and makes a big graph of how your tastes are related) and will quickly give you something you want to hear.

To use:
1) Launch albumbler.  It will create the .config/ files.
2) Edit config/albumbler/albumbler.conf, setting "musicpaths" for where your tunes are located.
2A) If you have multiple music paths, separate them with commas.
3) Launch "albumbler sync".  It will cache the directory structure, essential for remote file shares.
4) Launch albumbler to your heart's content!

Albumbler was born out of the frustration of using "rating" based media players, and the paradox of too much choice that led me to listening to the same five albums over and over.  When you use Albumbler, it randomly chooses an album which you probably want to hear.  If it guessed wrong, launch the app again.  It takes note that its earlier guess was no good and (using some graph theory) rapidly learns.

I've been using Albumbler for the past year.  It is fast, stable and accurate.  It is just not very flexible.  I'd like to add support for more types of notification (gnome, kde, the like) and more media players.

Just tell me what media player you'd like to see.  If you want to make my life really easy, mention how to clear/add/play the playlist.  Otherwise I will read docs and guess.

Tested players: mocp, cmus, mpd, clementine, gmusicbrowser
Untested players: rhythmbox, audacious, xmms2
Tested notifiers: console, notify-send, ratpoison
Untested notifiers:

Last edited by keenerd (2011-02-22 18:52:34)

Offline

#2 2010-05-01 21:10:45

jhvid
Member
From: /dev/denmark
Registered: 2009-08-19
Posts: 52

Re: Albumbler - A psychic playlist generator

hmm.. can't get it to work when i run it, it says:

$ python albumbler
/home/music/Binarpilot
Can't load plugin libmusepack_decoder: file not found

FATAL_ERROR: The server is not running

Can't load plugin libmusepack_decoder: file not found

FATAL_ERROR: The server is not running

Can't load plugin libmusepack_decoder: file not found

FATAL_ERROR: The server is not running

I tired to install libmusepack from pacman, but it didn't work??


EDIT: ran mocp -S and it worked :oops:

Last edited by jhvid (2010-05-01 21:16:28)


GCS d- s-:+ a12 C++++ U++++ L+++ P--- E--- W+++ N+ o K- w--- O? M-- V? PS PE
Y- PGP? t? 5? X? R tv b+++ DI+ D- G++ e++ h! !r !y

Please ignore me... I'm pretty weird...

Offline

#3 2010-05-01 21:15:59

keenerd
Trusted User (TU)
Registered: 2007-02-22
Posts: 647
Website

Re: Albumbler - A psychic playlist generator

Is Mocp already running in the background?  (It should be.)

Do the files play if you add them manually?

Offline

#4 2010-05-01 22:09:47

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Albumbler - A psychic playlist generator

you'll get no where without some mpd support tongue.  commands can be simply mpc clear, mpc add <file>, and mpc play.

cheers!

Offline

#5 2010-05-01 22:29:02

keenerd
Trusted User (TU)
Registered: 2007-02-22
Posts: 647
Website

Re: Albumbler - A psychic playlist generator

"mpc add" is not really sufficient.  It only handles straight files.  Not smart enough to know what to do with a directory.  Or a playlist.  Mpc needs to be spoon fed, apparently.

App is updated.  I have no clue how mpd works.  I am assuming you can just give it arbitrary files to play, without bothering to use the library.  Expect brokenness!

Set the "player" variable to mpc to use it.

Offline

#6 2010-05-02 00:50:41

BetterLeftUnsaid
Member
From: My Happy Place
Registered: 2007-11-04
Posts: 78

Re: Albumbler - A psychic playlist generator

Looks fun ... cmus support would be great :)

Here's the relevant commands to add, clear, and play, respectively:

cmus-remote [file|dir|playlist]
cmus-remote -c
cmus-remote -C "view 3" "win-activate"

Thanks

Last edited by BetterLeftUnsaid (2010-05-02 00:54:38)

Offline

#7 2010-05-02 01:02:41

keenerd
Trusted User (TU)
Registered: 2007-02-22
Posts: 647
Website

Re: Albumbler - A psychic playlist generator

Thanks!  Use it with player=cmus.

There is also a basic skeleton for player=rhythmbox.  Untested!

Offline

#8 2010-05-02 02:13:58

cesura
Trusted User (TU)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: Albumbler - A psychic playlist generator

Awesome idea. How about Audacious? big_smile I'll have a look around and see if I can find anything on it

EDIT:
This may be it tongue:

Application Options:
  -r, --rew                  Skip backwards in playlist
  -p, --play                 Start playing current playlist
  -u, --pause                Pause current song
  -s, --stop                 Stop current song
  -t, --play-pause           Pause if playing, play otherwise
  -f, --fwd                  Skip forward in playlist
  -j, --show-jump-box        Display Jump to File dialog
  -e, --enqueue              Don't clear the playlist
  -E, --enqueue-to-temp      Add new files to a temporary playlist
  -m, --show-main-window     Display the main window
  -a, --activate             Display all open Audacious windows
  -N, --no-log               Print all errors and warnings to stdout
  -v, --version              Show version
  -i, --interface            Interface to use (use -i list to view available interfaces)
  --display=DISPLAY          X display to use

Last edited by cesura (2010-05-02 02:16:22)

Offline

#9 2010-05-02 02:22:46

BetterLeftUnsaid
Member
From: My Happy Place
Registered: 2007-11-04
Posts: 78

Re: Albumbler - A psychic playlist generator

cmus works well, thanks.

Another easy notification option would be to use notify-send ... something like:

    if conf['notify'] == 'console':
        print play
    elif conf['notify'] == 'notify-send':
        call('notify-send "Now Playing: %s"' % os.path.basename(play))

Right around line 236.

Offline

#10 2010-05-02 10:42:43

keenerd
Trusted User (TU)
Registered: 2007-02-22
Posts: 647
Website

Re: Albumbler - A psychic playlist generator

Notify-send is in, use with "notify=notify-send".

Audacious did not have the right options but audtool does.  I could not tell if "audtool --playlist-url" is smart enough to handle a directory.  If it is not, simple to fix.  Use with "player=audacious".

BetterLeftUnsaid, thanks for the patches!  At some point I will clean up that giant if block and make it look like a respectable piece of Python.

Offline

#11 2010-05-02 19:14:44

cesura
Trusted User (TU)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: Albumbler - A psychic playlist generator

Hmm...the install and config went fine, but "python albumbler" appears to do nothing. Is it a bug, or am I just being stupid? tongue

Offline

#12 2010-05-02 20:24:47

keenerd
Trusted User (TU)
Registered: 2007-02-22
Posts: 647
Website

Re: Albumbler - A psychic playlist generator

Did you sync your music directory?

Audacious might need hand holding.  Can you punch these commands into a term and tell me what happens?

audtool --playlist-clear
audtool --playlist-addurl /path/to/a/directory/with/songs/
audtool --playback-play


If that does not work, does

audtool --playlist-addurl /path/to/a/directory/with/songs/*

do any better?

Last edited by keenerd (2010-05-02 20:36:27)

Offline

#13 2010-05-02 21:13:07

cesura
Trusted User (TU)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: Albumbler - A psychic playlist generator

keenerd wrote:

Did you sync your music directory?

Audacious might need hand holding.  Can you punch these commands into a term and tell me what happens?

audtool --playlist-clear
audtool --playlist-addurl /path/to/a/directory/with/songs/
audtool --playback-play


If that does not work, does

audtool --playlist-addurl /path/to/a/directory/with/songs/*

do any better?

Yes, I did sync it. All of these commands produce no output and do absolutely nothing. I tried it as root as well just for fun and that too didn't work.

EDIT: This may be the culprit:

>>> audtool --get-volume                                                    [~]
0
>>> audtool --set-volume 75                                                 [~]
>>> audtool --get-volume                                                    [~]
0
>>>

Last edited by cesura (2010-05-02 21:18:11)

Offline

#14 2010-05-02 21:27:05

keenerd
Trusted User (TU)
Registered: 2007-02-22
Posts: 647
Website

Re: Albumbler - A psychic playlist generator

Updated code for Audacious, might help.  If it does not work, could you figure out how to add tracks from the command line?

Offline

#15 2010-05-03 01:46:14

cesura
Trusted User (TU)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: Albumbler - A psychic playlist generator

keenerd wrote:

Updated code for Audacious, might help.  If it does not work, could you figure out how to add tracks from the command line?

No luck, but I'll see what I can find big_smile

Offline

#16 2010-05-03 10:23:02

Hiato
Member
Registered: 2009-01-21
Posts: 76

Re: Albumbler - A psychic playlist generator

MPD Please smile

To get talking to it sans front-ends, do something to the following effect:

echo "bleh" | socat - tcp-connect:localhost:6600

Where "bleh" is any of the following:

search (artist|album|title) NAME
add "file/relative/to/music.dir"
clear
playlist
delete number_of_song_in_pl

The trick is to extract just the file names and paths returned from search, but that's just one or two regex's away. Example:

echo "search title shreek" | socat - tcp-connect:localhost:6600 | grep "^file" | sed 's/.*:\ //' |sed 's/\(.*\)/add \"\1\\"/' | socat - tcp-connect:localhost:6600

If this is a tad vague, I'm sure that there are some more comprehensive docs on the mpd protocol, or just ask here smile

EDIT: I forgot about string quoting
EDIT2: Forgot about nicer sed commands

Last edited by Hiato (2010-05-03 10:39:10)

Offline

#17 2010-05-03 12:10:19

keenerd
Trusted User (TU)
Registered: 2007-02-22
Posts: 647
Website

Re: Albumbler - A psychic playlist generator

Thanks to the efforts of Hiato and scp1, there is now mpd support.  Use with "player = mpd".

Offline

#18 2010-05-03 20:21:18

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: Albumbler - A psychic playlist generator

Call me stupid but could you please elaborate on what Albumbler does? Thanks smile

(Trying to see if it's worth the trouble, as I don't know anything about Python and I'm using Foobar2k with Wine...)

Offline

#19 2010-05-03 22:13:55

keenerd
Trusted User (TU)
Registered: 2007-02-22
Posts: 647
Website

Re: Albumbler - A psychic playlist generator

Sure.  Fleshed out the description a bit.

Offline

#20 2010-05-04 07:03:13

necr0mancer
Member
Registered: 2010-05-01
Posts: 28

Re: Albumbler - A psychic playlist generator

Wow, nice project. Thanks for this.
And thanks for mpd support. tongue


arch64 :: zsh :: dwm :: urxvt \\ Still using the same computer I built when I was 15 smile
I also use twitter entirely too much.

Offline

#21 2010-05-04 09:49:20

aqtrans
Member
Registered: 2008-07-25
Posts: 30

Re: Albumbler - A psychic playlist generator

Interesting project, so far I'm liking it. Great work!
Just to report in, I'm using Sonata+MPD, and it works flawlessly. Once I launch alumbler, Sonata's current playlist is wiped and Albumbler's put in place. smile

Offline

#22 2010-05-04 11:23:16

keenerd
Trusted User (TU)
Registered: 2007-02-22
Posts: 647
Website

Re: Albumbler - A psychic playlist generator

One big bug - this was my first project to use XDG, and I got it fairly wrong.  Right now it will delete everything it has learned when you logout.

Please redownload Albumbler and move the file "~/.cache/albumbler/albumbler.pickle" to "~/.local/share/albumbler/albumbler.pickle"

People downloading it for the first time will not have this problem.  Just if you were one of the awesome testers who used it before right now.

(Thank you Hiato.)

Last edited by keenerd (2010-05-04 11:41:20)

Offline

#23 2010-08-18 00:43:25

aqtrans
Member
Registered: 2008-07-25
Posts: 30

Re: Albumbler - A psychic playlist generator

Would it be possible to have some kind of blacklist for directories/filenames? It keeps adding *.m3u files or /.AppleDouble folders, which don't actually fill Sonata's playlist, so nothing is played. Thanks!

Offline

#24 2010-08-18 04:26:17

linkmaster03
Member
Registered: 2008-12-27
Posts: 269

Re: Albumbler - A psychic playlist generator

This sounds very cool. I will try it soon and report the results!

Offline

#25 2010-08-18 06:20:24

onearm
Member
From: Anywhere but here
Registered: 2006-07-06
Posts: 359
Website

Re: Albumbler - A psychic playlist generator

Very cool project! I've added gmusicbrowser support, this is the code needed:

call('gmusicbrowser -play -playlist "%s"' % play)

To get something done, a committee should consist of no more than three persons, two of them absent.
--
My Github

Offline

Board footer

Powered by FluxBB