Daimrod | 10 May 2013 12:11
Picon

[PATCH] Play tracks randomly

Hello,

I've attached a small patch which adds `emms-toggle-random-playlist'. It
sets `emms-player-next-function' to either `emms-next-noerror' or
`emms-random'.


-- 
Daimrod/Greg

--

-- 
Daimrod/Greg
Jan Doms | 30 Mar 2013 14:35
Picon

playing non playlist streams with mplayer

Hello everyone,

I've just started using / trying out emms today, and wanted to use it to listen to http://mp3.streampower.be/klaracontinuo-mid.mp3 by playing it with emms-play-url. However in my setup that didn't work, while other live streams gave no problems.
I noticed emms called mplayer with a -playlist flag, a quick test on the commandline with mplayer showed me mplayer could play the stream if just invoked with mplayer http://...; however when I added the -playlist flag it didn't work.
A quick grep through the source shows it passes along the -playlist argument in lisp/emms-player-mplayer.el#46. Apparently opening an url is automatically interpreted by emms as a streamlist, while I expected it to just be something of type url.
Anyway after some messing around I've made a small fix available on https://github.com/domsj/emms . It might not be fixed entirely the way you want it but it sure works for me.

Enjoy,

Jan
<div><div dir="ltr">
<div>
<div>
<div>
<div>Hello everyone,<br><br>
</div>I've just started using / trying out emms today, and wanted to use it to listen to <a href="http://mp3.streampower.be/klaracontinuo-mid.mp3" target="_blank">http://mp3.streampower.be/klaracontinuo-mid.mp3</a> by playing it with emms-play-url. However in my setup that didn't work, while other live streams gave no problems.<br>
</div>I noticed emms called mplayer with a -playlist flag, a quick test 
on the commandline with mplayer showed me mplayer could play the stream 
if just invoked with mplayer http://...; however when I added the 
-playlist flag it didn't work.<br>
</div>A quick grep through the source shows it passes along the -playlist argument in lisp/emms-player-mplayer.el#46.
 Apparently opening an url is automatically interpreted by emms as a 
streamlist, while I expected it to just be something of type url.<br>
</div>
<div>Anyway after some messing around I've made a small fix available on <a href="https://github.com/domsj/emms" target="_blank">https://github.com/domsj/emms</a> . It might not be fixed entirely the way you want it but it sure works for me.<br><br>
</div>
<div>Enjoy,<br><br>
</div>Jan</div></div>
Yoni Rabkin | 16 Mar 2013 14:28

Re: Fwd: please remove bundled tq.el

Jonas Bernoulli <jonas <at> bernoul.li> writes:

> Actually "available separately" was wrong - is part of GNU Emacs. 
> If think it is not part of XEmacs though.
>
> You should probably move this file to a separate directory, add file
> .nosearch (to it to prevent the directory from being added to the
> load-path) and then only use the bundled version when necessary:
>
> ,----
> | (or (require tq nil t)
> |     (let ((load-path
> |            (cons (expand-file-name "fallback-libs"
> |                                    (or load-file-name buffer-file-name)
> |                                    load-path))))
> |       (require 'tq)))
> `----
>
> Gnus does it similar to this.

Back in the day mwolson modified tq and therefore added their own
version:
http://lists.gnu.org/archive/html/emms-help/2007-02/msg00016.html

I think we should remove tq from Emms completely if nobody complains,
and then deal with any breakage as complaints come in (and if no
complaints come in...)

--

-- 
   "Cut your own wood and it will warm you twice"

Lucas Bonnet | 27 Jan 2013 18:14

Read most (all) tags with a single script

Hello,

  I was trying to improve my classical music experience in EMMS by using
"composer" and "performer" tags when I found out that Taglib didn't
support any of those tags. I ended up implementing a tag reader that can
read most tags for most file formats, using the already in place taglib
support: emms-print-metadata.pl. I just pushed it to git HEAD.

Documentation is lacking at the moment, but a quick start would look
like:

  (require 'emms-info-libtag)
  (setq emms-info-functions '(emms-info-libtag))
  (setq emms-info-libtag-program-name "emms-print-metadata.pl")

Do not forget to install Audio::Scan (aptitude install libaudio-scan-perl
shoud be enough on Debian and variants).

The Perl tag reader is significantly slower that the C TagLib
implementation: my whole collection takes 50s to be scanned by the
binary, and 3m48s with the Perl script (20k files, FLAC and MP3, with
hot cache).

Coming next:
 - some documentation :)
 - support for more audio formats (only MP3, OGG and FLAC for now)
 - how to display composer, performer or whatever you want in the browser

Regards,
--

-- 
Lucas Bonnet

Yoni Rabkin | 17 Dec 2012 23:30

Site update


The Emms Website, nice as it is, hasn't been updated in years. I'm
proposing that I'll give it a slight refresh. If anyone has something to
say about it, do so in the near future. If nobody protests, I'll go
ahead with the changes.

Happy hacking,

--

-- 
   "Cut your own wood and it will warm you twice"

Russell Carden | 23 Aug 2012 16:26

Function for sorting by mtime

Hello all,

I like to sort my music by the date when I purchased it when generally 
corresponds to the last modified time.  For this reason, I have been 
hestitant to switch to emms for my music manager.  I learned a little 
lisp and came up with the following function which I have added to my 
emms-playlist-sort.el

(defun emms-playlist-sort-by-mtime ()
   "Sort emms playlist by info-mtime, increasingly."
   (interactive)
   (emms-playlist-sort
    (lambda (a b)
      (time-less-p (append (emms-track-get a 'info-mtime) '(0) )
		  (append (emms-track-get b 'info-mtime) '(0) ))
)))

Marius Hofert | 9 Feb 2012 22:19
Picon
Favicon

Emms + Apple remote control?

Hi,

Is there anything known about how to setup emms for Apple's remote
control earphones? It would be create to trigger start/stop from the remote
control.

Cheers,

Marius

William Xu | 9 Feb 2012 14:28
Picon
Gravatar

Re: Error:

2012/2/9 Marius Hofert <marius.hofert <at> math.ethz.ch>:
>
> C-h v shows:
>
> emms-player-list is a variable defined in `emms.el'.
> Its value is
> (emms-player-mpg321 emms-player-ogg123 emms-player-mplayer-playlist emms-player-mplayer emms-player-vlc)
>
> Original value was nil

OK.  I was wrong here.  The second expression should give t first.

>> If the second expression returns nil, it means `vlc' command wasn't
>> found in PATH.
>
> okay, on the Mac one can call VLC from the command line via
> /Applications/VLC.app/Contents/MacOS/VLC
> I then defined an alias in ~/.bashrc:
> vlc='/Applications/VLC.app/Contents/MacOS/VLC'
>
> I have the following code in ~/.emacs which guarantees that PATH is the same as
> from within the terminal:
>
> ;; see http://lists.gnu.org/archive/html/help-gnu-emacs/2011-11/msg00107.html
> (let ((path (shell-command-to-string ". ~/.profile; echo -n $PATH")))
>  (setenv "PATH" path)
>  (setq exec-path
>        (append
>         (split-string-and-unquote path ":")
>         exec-path)))
>
> I can now call VLC via "vlc" from within M-x shell (Tab-completion won't work
> though since it's an alias) and I checked that via "vlc ~/priv/music/a.mp3"
> which is an existing file.
>
> I did a complete restart. Still, the line (executable-find "vlc") executes to
> "nil" (point after the last ")" and C-x C-e).

I doubt whether aliases could be found via exec-path.

Anyway, how about this?

  (progn
    (setq emms-player-vlc-command-name
          "/Applications/VLC.app/Contents/MacOS/VLC")

    (emms-player-for '(*track* (type . file) (name . "foo.mp3")))
    )

-William

_______________________________________________
Emms-help mailing list
Emms-help <at> gnu.org
https://lists.gnu.org/mailman/listinfo/emms-help
Marius Hofert | 4 Feb 2012 15:09
Picon
Favicon

Error: "Don't know how to play track"

Hello,

I work with Emacs 24.0.92 (9.0) on Mac OS X 10.7.3. I downloaded and installed
EMMS via "git clone git://git.sv.gnu.org/emms.git" and my ~/.emacs contains...

(add-to-list 'load-path "~/.emacs.d/emms/lisp")
(require 'emms-setup)
(emms-standard)
(emms-default-players)

... as suggested on http://www.gnu.org/software/emms/quickstart.html

If I use M-x emms-play-directory and choose a directory that contains .mp3
files, I obtain:

Don't know how to play track: (*track* (type . file) (name
. "/path/to/music/first song in this directory.mp3") (info-mtime 19612 57269) (metadata))

I don't have mplayer installed, but VLC is installed and works perfectly
fine. What additional settings do I need in order for this to work?

Note that the player-list contains VLC (and others -- just the default). I also
set it to *only* VLC, but that gave the same error.

Also note that I found a similar error on
http://superuser.com/questions/179186/emms-emacs-multimedia-system-error-in-emacs-dont-know-how-to-play-track
but the "solution" there does not really explain what the problem is.

Cheers,

Marius

Daniel Dehennin | 31 Jan 2012 15:40

emms-tag-editor-replace-in-tag and case modification

Hello,

Back in 2005[1], I tried to change the case of tags.

Looking at a recent EMMS, I tried again, with
emms-tag-editor-replace-in-tag:

* Hit 'E' in my playlist buffer
* C-c C-a
* select 'info-title' tag
* Query replace regexp: \(.*\)
* With: \,(downcase \1)

This result in the following error in my *Message* buffer:

#+begin_src
map-y-or-n-p: Wrong type argument: char-or-string-p,
(replace-eval-replacement replace-quote (downcase (match-string 1)))
#+end_src

Any idea?

Regards.

Footnotes: 
[1]  http://lists.gnu.org/archive/html/emms-help/2005-07/msg00010.html

-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1
Hello,

Back in 2005[1], I tried to change the case of tags.

Looking at a recent EMMS, I tried again, with
emms-tag-editor-replace-in-tag:

* Hit 'E' in my playlist buffer
* C-c C-a
* select 'info-title' tag
* Query replace regexp: \(.*\)
* With: \,(downcase \1)

This result in the following error in my *Message* buffer:

#+begin_src
map-y-or-n-p: Wrong type argument: char-or-string-p,
(replace-eval-replacement replace-quote (downcase (match-string 1)))
#+end_src

Any idea?

Regards.

Footnotes: 
[1]  http://lists.gnu.org/archive/html/emms-help/2005-07/msg00010.html

--

-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1
Nicolas Avrutin | 14 Dec 2011 03:19
Picon

bug in emms-lastfm-scrobbler.el - tracks with no tags don't advance

Greetings

When playing a track with no tags, emms-lastfm-scrobbler.el causes emms to not advance to the next track in the playlist. Instead, emacs continues playing the current track, resulting in silence and the track time continuing to count past the total length of the track.

The cause of the bug is (error "Track title and artist must be known.") on line 216 in emms-lastfm-scrobbler.el. The error is thrown, causes the emms stop and finish hooks to face plant, and results in emms never advancing to the next track.

My solution is rather simple: in emms-lastfm-scrobbler-stop-hook (emms-lastfm-scrobbler.el, line 267), simply wrap (emms-lastfm-scrobbler-make-async-submission-call) in an ignore-errors construct (patch below). If there is a problem submitting the track to lastfm, we clearly want the rest of emms to continue on its merry way.

Patch:

diff --git a/lisp/emms-lastfm-scrobbler.el b/lisp/emms-lastfm-scrobbler.el
index a2171b8..df8f68e 100644
--- a/lisp/emms-lastfm-scrobbler.el
+++ b/lisp/emms-lastfm-scrobbler.el
<at> <at> -277,8 +277,9 <at> <at> seconds or half the length of the track."
               ;; track must be played for more than 240 secs or
               ;;   half the tracks length, whichever comes first.
               (> emms-playing-time (min 240 (/ track-length 2))))
-         (emms-lastfm-scrobbler-make-async-submission-call
-          current-track nil))))))
+         (ignore-errors
+           (emms-lastfm-scrobbler-make-async-submission-call
+            current-track nil)))))))
 
 (defun emms-lastfm-scrobbler-enable ()
   "Enable the Last.fm scrobbler and submit the tracks EMMS plays


--
Nicolas Avrutin

<div>Greetings<br><br>When playing a track with no tags, emms-lastfm-scrobbler.el causes emms to not advance to the next track in the playlist. Instead, emacs continues playing the current track, resulting in silence and the track time continuing to  count past the total length of the track.<br><br>The cause of the bug is (error "Track title and artist must be known.") on line 216 in emms-lastfm-scrobbler.el. The error is thrown, causes the emms stop and finish hooks to face plant, and results in emms never advancing to the next track.<br><br>My solution is rather simple: in emms-lastfm-scrobbler-stop-hook (emms-lastfm-scrobbler.el, line 267), simply wrap (emms-lastfm-scrobbler-make-async-submission-call) in an ignore-errors construct (patch below). If there is a problem submitting the track to lastfm, we clearly want the rest of emms to continue on its merry way.<br><br>Patch:<br><br>diff --git a/lisp/emms-lastfm-scrobbler.el b/lisp/emms-lastfm-scrobbler.el<br>index a2171b8..df8f68e 100644<br>--- a/lisp/emms-lastfm-scrobbler.el<br>+++ b/lisp/emms-lastfm-scrobbler.el<br> <at>  <at>  -277,8 +277,9  <at>  <at>  seconds or half the length of the track."<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;; track must be played for more than 240 secs or<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;&nbsp;&nbsp; half the tracks length, whichever comes first.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&gt; emms-playing-time (min 240 (/ track-length 2))))<br>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (emms-lastfm-scrobbler-make-async-submission-call<br>

-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; current-track nil))))))<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (ignore-errors<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (emms-lastfm-scrobbler-make-async-submission-call<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; current-track nil)))))))<br>&nbsp;<br>&nbsp;(defun emms-lastfm-scrobbler-enable ()<br>

&nbsp;&nbsp; "Enable the Last.fm scrobbler and submit the tracks EMMS plays<br><br><br clear="all"><div></div>--<div>Nicolas Avrutin</div>
<br>
</div>

Gmane