emms-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emms-help] Re: EMMS - mpd, browse and random album play


From: Michael Olson
Subject: [emms-help] Re: EMMS - mpd, browse and random album play
Date: Fri, 21 Apr 2006 18:22:30 -0400
User-agent: Gnus/5.110005 (No Gnus v0.5) Emacs/22.0.50 (gnu/linux)

address@hidden (Adam Sjøgren) writes:

>   Hi.
>
> Now that I've got EMMS running with mpd on a remote jukebox and I can
> adjust the volume, the next two challenges rise:
>
>  * How do I browse Artists/Albums/Songs?

This (http://www.iro.umontreal.ca/~monnier/elisp/) might provide
inspiration.  I've tried out his mpc.el a couple of times, but ran
into a few minor snafus here and there.

>  * When I haven't chosen something to play myself, I would like
>    "random album play". That is, when the playlist becomes empty, I
>    would like EMMS to select an album by random and play it.
>
>    Pseudo-something like this:
>
>      (defun asjo-play-random-album ()
>        "Select a random album and play it"
>        (let ((album (select-random-from-list (emms-list-all-albums))))
>          (emms-playlist-add-album album)
>          (emms-start)))
>
>      (add-hook 'emms-when-playlist-runs-empty 'asjo-play-random-album)
>
>    Does this sound possible/easy?

I'm testing a fix for emms-player-mpd.el that will make it run
emms-player-finished-hook once all of the tracks in the current
playlists are done.  So `emms-player-finished-hook' will be the place
to stick code for random album playing.

My usage of EMMS is as follows.  I have an initial playlist buffer
that contains all of my .m3u and .pls files.  I create this by doing
the following in my config, where all of the directories have just
.m3u and .pls files.

(define-emms-combined-source all nil
  '((emms-source-directory "/stuff/sounds/albums")
    (emms-source-directory "/stuff/sounds/mixes")
    (emms-source-directory "/stuff/sounds/radio")))

Then, I have some custom code set up so that hitting RET in
emms-playlist-mode either opens a new playlist buffer if we are on a
playlist, otherwise play the file.  Thus, when I am playing music, I
always have two EMMS buffers open.  I also remapped "q" so that it
deletes the current buffer and goes back to the original "playlist of
playlists" buffer.

If you have a lot of playlist files that each correspond with an
album, this would be a good way to go.  I've got some more thoughts on
that issue, but I'll save them for the metaplaylist-mode thread.

-- 
Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/
Interests: Emacs Lisp, text markup, protocols -- Muse, Planner, ERC, EMMS
  /` |\ | | | IRC: mwolson on freenode.net: #hcoop, #muse, #PurdueLUG
 |_] | \| |_| Jabber: mwolson_at_hcoop.net

Attachment: pgpVEE5Vff4tT.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]