stumpwm-devel
[Top][All Lists]
Advanced

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

[STUMP] getting mpd working with emms and stumpwm


From: Eric Abrahamsen
Subject: [STUMP] getting mpd working with emms and stumpwm
Date: Fri, 13 Jan 2012 12:58:00 +0800
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.92 (gnu/linux)

Hi,

I'm a heavy emacs user, recent Stumpwm convert, and just discovered mpd
for playing music. I'm trying to get EMMS and the mpd Stump plugin to
play nicely together, and having some difficulties. (I'm using
archlinux, sbcl 1.0.54, mpd 0.16.6, stump from git, emacs from git, and
EMMS 3.0.)

My goal, which I've achieved intermittently, is to be able to control
browsing, playlists and playback from either EMMS or Stump, and have
them talk nicely to each other: changes made via one reflected
immediately in the other, etc.

The first problem seems to be that, if I connect EMMS to mpd *first*,
Stump can't then connect. `mpd-connect' gets me "NIL", and no
connection. If I ask Stump to connect first, both can connect, but after
that playlists and playback can diverge: music added to the playlist via
EMMS doesn't show up via Stump, etc. I think at one time I had them both
playing conflicting tracks through my speakers at the same time, though
I don't even know how that's possible.

Commands from both packages that directly query the mpd process seem to
behave correctly. If I start a playlist in EMMS, stop it, then load new
music via Stump and start playing there, calling `emms-show' in emacs
shows the song that actually is currently playing, even though EMMS's
own playlist and modeline show playback stopped on a different song
altogether.

The only clue I've got (could be a red herring), comes the *first* time
after I call `mpd-disconnect' in Stump (this is if it was unable to
connect in the first place). The error message is:

--8<---------------cut here---------------start------------->8---
Error with mpd connection: end of file on #<SB-SYS:FD-STREAM for "socket
127.0.0.1:57740, peer: 127.0.0.1:6600" {C663EB9}>
--8<---------------cut here---------------end--------------->8---

I don't know where "socket 127.0.0.1:57740" comes from: is this
something that EMMS is creating? Is it totally standard and nothing
strange?

Anyway, I hope there's enough in this pile for someone to point me in
the right direction. I would love to get this working correctly!

Thanks,
Eric


Relevant config:

In ~/.mpdconf:

--8<---------------cut here---------------start------------->8---
bind_to_address         "127.0.0.1"
port                    "6600"
--8<---------------cut here---------------end--------------->8---

In .emacs:

--8<---------------cut here---------------start------------->8---
(setq emms-player-mpd-server-name "127.0.0.1")
(setq emms-player-mpd-server-port "6600")
--8<---------------cut here---------------end--------------->8---

In stumpwm/contrib/mpd.lisp:

--8<---------------cut here---------------start------------->8---
(defparameter *mpd-server*
  #+clisp
  "localhost"
  #+sbcl
  #(127 0 0 1)
  )
(defparameter *mpd-port* 6600)
--8<---------------cut here---------------end--------------->8---

(I'm running sbcl, so *mpd-server* should be initiated to #(127 0 0 1).)

I start mpd via `run-shell-command' in my ~/.stumpwmrc. I also
(load-module "mpd") in there, but call `mpd-connect' manually. In my
~/.emacs, I have EMMS run `emms-player-mpd-connect' right after
`emms-smart-browse'.




reply via email to

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