getting mpd working with emms and stumpwm

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

getting mpd working with emms and stumpwm

Eric Abrahamsen-2
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'.


_______________________________________________
Stumpwm-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel
Reply | Threaded
Open this post in threaded view
|

Re: getting mpd working with emms and stumpwm

Eric Abrahamsen-2
On Fri, Jan 13 2012, Eric Abrahamsen wrote:

> 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.

After messing with other mpd interfaces (mpc, gmpc), it seems clear that
the problem lies in keeping EMMS current with mpd. Repeated calls to
`emms-player-mpd-connect' can help catch EMMS up if I've changed the
playlist via other interfaces, but I can't figure out how to sync in the
opposite direction—making sure that playlist changes and current play
state set in EMMS are communicated to mpd and its other interfaces.

EMMS has got everything else beat in terms of browsing/searching and
playlist manipulation, but I need something more general for playback
control—can someone familiar with EMMS let me know if there's something
I can do here? 'emms-player-mpd-sync-playlist' is set to true…

Thanks!
Eric


_______________________________________________
Stumpwm-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel
Reply | Threaded
Open this post in threaded view
|

Re: getting mpd working with emms and stumpwm

David Edmondson-2
* [hidden email] [2012-01-15 Sun 11:33]
> EMMS has got everything else beat in terms of browsing/searching and
> playlist manipulation, but I need something more general for playback
> control—can someone familiar with EMMS let me know if there's something
> I can do here? 'emms-player-mpd-sync-playlist' is set to true…

Mingus (git://github.com/pft/mingus.git) is a nice Emacs interface to
mpd, if you can forgo EMMS.

_______________________________________________
Stumpwm-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel

attachment0 (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: getting mpd working with emms and stumpwm

Eric Abrahamsen-2
On Sat, Feb 25 2012, David Edmondson wrote:

> * [hidden email] [2012-01-15 Sun 11:33]
>> EMMS has got everything else beat in terms of browsing/searching and
>> playlist manipulation, but I need something more general for playback
>> control—can someone familiar with EMMS let me know if there's something
>> I can do here? 'emms-player-mpd-sync-playlist' is set to true…
>
> Mingus (git://github.com/pft/mingus.git) is a nice Emacs interface to
> mpd, if you can forgo EMMS.

I can, and that's perfect! Thanks very much for the recommendation.


_______________________________________________
Stumpwm-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel