イーマックス マルチメディア システム

概要

EMMSはイーマックス マルチメディア システムの略です. それはEmacsから外部プレイヤーを使ってクリーンで小さなアプリケーションであろうとします. 多くのアイディアはMpthreePlayerから派生し,しかしそれはより一般的でクリーンであろうとします. それはボンゴに匹敵します. http://www.gnu.org/software/emms/

クイックスタート

EMMSを始めるにあたって最善の方法は以下のクイックスタートガイドを読むことです: http://www.gnu.org/software/emms/quickstart.html

どうやってEMMSを開発するかもしくはパッチを提出するかという情報は, EMMSDevelopment ページを訪ねてください.

様々な注意事項

タグのキャッシング & 非同期読込

キャッシングは実装されました, そしてこれは主として遅いメタデータ収集の問題を解決します.

Do we still need an async process which spits out the data, so we can process it in a filter?

ないもの

メーン関数向けに私は4つの連続したキーの中にグローバルキー (previous, next, pause…)を持っている.

(simple players like ‘play’ are trivial to implement with emms-player-simple - info is in the manual)

MOD, XM, S3M そしてそれに似たようなやつ

MOD, XM, S3M そしてそれに似たようなファイルを再生したいような人は, mikmodを使ったやりかたがここにあります:

    (require 'emms-player-simple)
    (define-emms-simple-player mikmod '(file)
      (regexp-opt '(".669" ".AMF" ".DSM" ".FAR" ".GDM" ".IT" ".IMF"  
                    ".MED" ".MTM" ".OKT" ".S3M" ".STM" ".STX" ".ULT" 
                    ".APUN" ".XM" ".MOD" ".amf" ".dsm" ".far" ".gdm"                            
                    ".it" ".imf" ".mod" ".med" ".mtm" ".okt" ".s3m" 
                    ".stm" ".stx" ".ult" ".apun" ".xm" ".mod" ".MOD")
                    ) "mikmod" "-q" "-p" "1" "-X")
    (add-to-list 'emms-player-list 'emms-player-mikmod)

しかしながら, 私が見るにmikmodは複数の引数を正しく渡せないので, あなたは恐らく~/.mikmodrc中のこれらの設定を有効にする必要があるでしょう:

    LOOP=no
    EXIT_AFTER=yes
    PM_MODULE=no
    PM_MULTI=no

MartinSchoenmakers

修正済み: “mikmod” “-q” “-p” “1” “-X”, 定義の最後にて

– Aitherios

sbagenバイノーラルビートファイル

    (define-emms-simple-player sbagen '(file) (emms-player-simple-regexp "sbg") "sbagen")

バイノーラルビートはイヤホンで位相差を伴った正弦波を再生することによって精神状態を誘導しようとするサウンドファイルです.

プレイヤー定義は簡単です, 私には前のような起きませんでしたEmacsは非常に素晴らしい統合されたバイノーラルビート実験環境なりうるでしょう!

JoakimVerona

ミックスCD作成

このコードがあなたのためにCDを焼かないであろうかぎり(何か提案ある?), それはあなたの現在のEMMSプレイリストバッファーとそれらのトラックのシンボリックリンクを(あなたのプレイリストバッファーの順番通りに)与えられたディレクトリに連れていくでしょう. 改善を投稿することを自由に感じてください (しかしあなたが何を変えたかをノートしてください; 私は興味がある).

注意してください、もしあなたがミュージックファイルのためにかなり均一な命名体系使っていないならあなたは恐らくいくつかの調整をする必要がある.

あなたは間違いなく少なくともコード中の1つのパスを調整する必要がある(注意して見てください). ここでは、次のとおりです:

(require 'emms-playlist-mode)
(require 'cl)

(defun emms-playlist-make-mix (dir)
  "Eases mix creation by doing the symlinking for me."
  (interactive "FWhere should I make the mix? ")
  (save-excursion
    (unless (progn (get-buffer-create emms-playlist-buffer)
                   (set-buffer emms-playlist-buffer)
                   (> (count-lines (point-min) (point-max)) 0))
      (error "There is no playlist"))
    (if (file-exists-p (if (string-match "/$" dir)
                           (replace-in-string dir "/$" "")
                         dir))
        (if (not (file-directory-p dir))
            (error "File %s exists and is not a directory" dir)
          (unless (y-or-n-p "Directory exists. Continue? ")
            (error "Not continuing")))
      (make-directory dir))
    (set-buffer emms-playlist-buffer)
    (emms-playlist-current-select-first)
    (let ((counter 1)
          (lines (count-lines (point-min) (point-max))))
      (unless (string-match "/$" dir)
        (setq dir (concat dir "/")))
      (while (<= counter lines)
        (let ((track (cdr (third (emms-playlist-current-selected-track))))
              (symlinkname (replace-in-string
                            (cdr (third
                                  (emms-playlist-current-selected-track)))
                              "/home/user/media/music/.*/[0-9][0-9]-"
                            (concat (if (< counter 10) "0")
                                    (number-to-string counter)
                                    "-"))))
          (make-symbolic-link track (concat dir symlinkname) t)
          (emms-playlist-current-select-next)
          (setq counter (1+ counter)))))))

KDE通知

現在の曲を表示するためにはknotifyを使ってください. D-BusとEmacsの連携を要求します:

(defun ts/showsong ()
  (emms-next-noerror)
  (set 'notifyid (dbus-call-method :session "org.kde.knotify" "/Notify" "org.kde.KNotify" "event" "emms_song" "emacs" '(:array (:variant nil)) "Currently Playing" (emms-show) '(:array :byte 0 :byte 0 :byte 0 :byte 0) '(:array) :int64 0))
  (run-at-time "5 sec" nil 'dbus-call-method :session "org.kde.knotify" "/Notify" "org.kde.KNotify" "closeNotification" :int32 notifyid)
  )

(setq emms-player-next-function 'ts/showsong)

なんでかわからないけど上のコードが俺のところでは動かない. そこで, 別のシンプルなやつを付けといた(そして多分野暮ったいだろうけどね ;)

;;; KNotifyを利用するための野暮ったいやり方.  Debian/Squeezeでテスト済み. --lgfang
(when (and window-system (executable-find "kdialog"))
  (setq emms-player-next-function
        (lambda ()
          (emms-next-noerror)
          (call-process "kdialog" nil nil nil "--title" "Emacs - EMMS"
                        "--passivepopup" (emms-show) "5"))))

Fluxbox/Gnome (そしてGTKベースのウィンドウマネージャ)通知

EmmsEasyNotificationを見てください ;-)

Freedesktop/D-Bus通知

Freedesktop通知サービスと通信するためD-Busか, もし走っていなければミニバッファを使う.

; メッセージを広めるために、D-Busを選択する, もしそれが走っているならば.
(cond
 ;; D-Busは通知が利用できるかどうかを確認するためのテスト
 ((if (and (require 'dbus nil t)
	   (dbus-ping :session "org.freedesktop.Notifications"))
      (progn
	(setq notify-method 'notify-via-dbus-notifications)
	(require 'notifications))))
 ;; could use the message system otherwise
 (t (setq notify-method 'notify-via-message)))

(defun notify-via-notifications (title msg icon)
  "`D-Bus'経由でTITLE, MSG付きで通知を送る."
  (notifications-notify
   :title title
   :body msg
   :app-icon icon
   :urgency 'low))

(defun notify-via-messages (title msg)
  "messageへTITLE, MSG付きで通知を送る."
  (message "APPOINTMENT: %s" msg))

(defun emms-notifications-dbus (track-name)
  "`D-Bus'経由でトラック名を共有する."
  (let ((icon "/usr/share/icons/gnome/24x24/categories/applications-multimedia.png"))
    (notify-via-notifications "EMMS is now playing:" track-name icon)))

(defun emms-notifications-message (track-name)
  "Emacsミニバッファ経由でトラック名を共有する."
  (message "EMMS is now playing: %s" track-name))

(setq emms-player-next-function 'emms-notify-and-next)

(defun emms-notify-and-next ()
  "トラックと次のスタートの通知を送る."
  (emms-next-noerror)
  (let ((track-name (emms-track-description (emms-playlist-current-selected-track))))
    (cond
     ((eq notify-method 'notify-via-dbus-notifications)
      (emms-notifications-dbus track-name))
     (t (emms-notifications-message track-name)))))

dired バッファーにて, "!"でプレイリストにトラックを追加する

元ネタ

;;; '!'でプレイリストにミュージッファイルを追加する, --lgfang
(add-to-list 'dired-guess-shell-alist-user
             (list "\\.\\(flac\\|mp3\\|ogg\\|wav\\)\\'"
                   '(if (y-or-n-p "Add to emms playlist?")
                        (progn (emms-add-file (dired-get-filename))
                               (keyboard-quit))
                      "mplayer")))

FLAC トラックの”年”を表示するためのパッチ -lgfang

*** /home/lgfang/tmp/emms/lisp/emms-info-metaflac.el	2011-01-09 21:53:40.904903408 +0800
--- /home/storage/daily/my-notes/emacs/extensions/emms/emms-info-metaflac.el	2011-01-09 21:58:08.134903811 +0800
***************
*** 62,68 ****
      "--show-tag=ARTIST"
      "--show-tag=ALBUM"
      "--show-tag=NOTE"
!     "--show-tag=YEAR"
      "--show-tag=TRACKNUMBER"
      "--show-tag=GENRE")
    "The argument to pass to `emms-info-metaflac-program-name'."
--- 62,68 ----
      "--show-tag=ARTIST"
      "--show-tag=ALBUM"
      "--show-tag=NOTE"
!     "--show-tag=DATE"
      "--show-tag=TRACKNUMBER"
      "--show-tag=GENRE")
    "The argument to pass to `emms-info-metaflac-program-name'."
***************
*** 91,97 ****
                               (string-to-number (buffer-substring (point) (line-end-position))))))
          (forward-line 1)
          (while (looking-at "^\\([^=\n]+\\)=\\(.*\\)$")
!           (let ((name (intern (concat "info-" (downcase (match-string 1)))))
                  (value (match-string 2)))
              (when (> (length value)
                       0)
--- 91,98 ----
                               (string-to-number (buffer-substring (point) (line-end-position))))))
          (forward-line 1)
          (while (looking-at "^\\([^=\n]+\\)=\\(.*\\)$")
!           (let ((name (intern (concat "info-" (if (string-equal "DATE" (match-string 1)) "year"
!                                         (downcase (match-string 1))))))
                  (value (match-string 2)))
              (when (> (length value)
                       0)

Youtube, Vk.com, そしてストリームからタグを読む

元ネタ

I’m not a programmer, can you help me refactor this piece of code?

1. w3m-bufferからyoutubeリンクを追加する

(defun w3m-open-link-or-image-in-chromium ()
  "Firefoxで現在のリンクもしくはイメージを開く."
  (interactive)
  (let ((url (or (w3m-anchor) (w3m-image))))
   (if (string-match "youtube" url) 
       (let ((track (emms-track 'url url)))
	  (emms-track-set track 'info-title (substring  (shell-command-to-string (concat "youtube-dl -e " url)) 0 -1))
	  (with-current-emms-playlist
	  (emms-playlist-insert-track track)))
 (browse-url-generic url))))

(define-key w3m-mode-map "z" 'w3m-open-link-or-image-in-chromium)

2. youtubeの中を検索しw3m-bufferに表示する

(defun emms-youtube-walk (node)
      (when (listp node)
	(let* ((title (car (nthcdr 2 (car (xml-get-children node 'title)))))
	       (group (car (xml-get-children node 'media:group)))
	       (description  (car (nthcdr 2 (car (xml-get-children group 'media:description)))))
	       (url (xml-get-attribute (car (xml-get-children group 'media:player)) 'url))
	       (thumbnail (xml-get-attribute (car (xml-get-children group 'media:thumbnail)) 'url)))
	  (insert (concat "<li><a href=\"" url "\"><img src=\""thumbnail"\" ></a><b>"title"</b></li>"))
	  )))


(defun emms-add-youtube (search)
(interactive "sYoutube Search:")
(let* (
       (link (concat "https://gdata.youtube.com/feeds/api/videos?q='" search "'&max-results=50&orderby=relevance&format=5&prettyprint=true&v=2&fields=entry(title,media:group(media:player,media:description,media:thumbnail[@yt:name='hqdefault'](@url)))"))
)
(url-retrieve  link 
	       (lambda (s) 
		 (beginning-of-buffer) 
		 (search-forward "<" ) 
		 (beginning-of-line) 
		 (setq feed (xml-get-children (car (xml-parse-region (point) (point-max))) 'entry))
		 (erase-buffer)
		 (insert (concat "<html><head><title>Youtube Client "  "</title></head><body><ol>"))
		 (mapc 'emms-youtube-walk feed)
		 (insert "</ol></body></html>")
		 (let ((filename (concat (make-temp-file "w3m-") ".html")))
		   (unwind-protect
		       (progn
			 (write-region (point-min) (point-max) filename)
			 (kill-buffer (current-buffer))
;			 (w3m-copy-buffer nil nil nil t)
			 (w3m-find-file filename))
		     (delete-file filename)))
))))

3. 新しいプレイヤーを作る

(define-emms-simple-player youtube '(url)
   "www.youtube.com\\|rtmp://" "~/apps/w3myou.sh" )
(push 'emms-player-youtube emms-player-list)
~/apps/w3myou.sh

mplayer -quiet -really-quiet  -cookies -cookies-file /tmp/cookie.txt $(youtube-dl -g --max-quality 720p --cookies /tmp/cookie.txt $1)

4. Vk.comの中を検索しemmsプレイリストバッファーに追加する

(defun emms-add-vk (search)
(interactive "sVk Search:")
(let* (
       (link (concat "https://api.vk.com/method/audio.search.xml?q=" search "&sort=2&auto_complete=1&lyrics=0&count=300&offset=0&access_token=3a582f82cd975ace6015cd56e3e6eb3fff57961dccec60850a6272915f547132d616ae4ea0330a19725b9"))
)
(url-retrieve  link 
	       (lambda (s) 
		 (beginning-of-buffer) 
		 (search-forward "<" ) 
		 (beginning-of-line) 
		 (setq feed (xml-get-children (car (xml-parse-region (point) (point-max))) 'audio))
		 (mapc 'emms-vk-walk feed)
		 (kill-buffer (current-buffer))
))))


(defun emms-vk-walk (node)
      (when (listp node)
	(let* ((artist (decode-coding-string   (car (nthcdr 2 (car (xml-get-children node 'artist)))) 'utf-8))
	       (title (decode-coding-string (car (nthcdr 2 (car (xml-get-children node 'title)))) 'utf-8))
	       (url (car (nthcdr 2 (car (xml-get-children node 'url)))))
	       (track (emms-track 'url url)))
	  (emms-track-set track 'info-artist artist)
	  (emms-track-set track 'info-title (car  (split-string title "\n")))
	  (with-current-emms-playlist
	  (emms-playlist-insert-track track)
	  ))))

5. ストリーミングオーディオからの情報 (mplayerだけ)

(setq  emms-player-mplayer-parameters '("-slave" "-quiet")
 emms-player-mplayer-playlist-parameters '("-slave" "-quiet" "-playlist"))

(defun mplayer-stream-start-listening ()
  "This emms-player-started-hook checks if the current track is a url and the process playing it is mplayer. If it is then the output filter mplayer-steam-filter is added to the process"
(let ((type (emms-track-type (emms-playlist-current-selected-track))))
 (if (or (eq  type 'url) (eq  type 'streamlist))
      (let ((process (get-process emms-player-simple-process-name)))
        (if (string= (car (process-command process)) "mplayer")
            (set-process-filter process 'mplayer-stream-filter))
        ))
  ))

(add-hook 'emms-player-started-hook 'mplayer-stream-start-listening)
(defvar emms-mplayer-info-coding-system 'cp1251)
(defmacro emms-mplayer-info-defreg (symname regexp)
  "Set SYMNAME to be the match for REGEXP."
  `(if (string-match ,regexp string)
	(progn 
	  (setq ,symname (decode-coding-string (match-string 1 string) emms-mplayer-info-coding-system))
	  (if (> (length ,symname) 40)
	      (setq ,symname (concat (substring ,symname 0 37) "..."))))
      ))


(defun mplayer-stream-filter (proc string)
  "Checks mplayer output for ICY Info data. If any is found then the StreamTitle option is extracted and written to the track's 'info-title property.
Because emms-info-track-description -- the function that creates the track name -- needs a title *and* an artist 'info-artist is set to the stream title (the one you see in emms-streams)."
  (let ((name "")
	(Title "")
	(Artist "")
	(Album "")
	(genre "")
	(bitrate "")
	(nowplaying "")
	(track (emms-playlist-current-selected-track))
)
	(emms-mplayer-info-defreg name "^Name[ ]*:[ ]*\\(.*\\)\\b[ ]*$") ;;;;describe station
	(emms-mplayer-info-defreg genre "^Genre[ ]*:[ ]*\\(.*\\)\\b[ ]*$") ;;;;describe station
	(emms-mplayer-info-defreg bitrate "^Bitrate[ ]*:[ ]*\\(.*\\)\\b[ ]*$") ;;;;describe station
	(emms-mplayer-info-defreg nowplaying "^ICY Info: StreamTitle='\\(.*\\)'")
	(emms-mplayer-info-defreg Artist "Artist:[ ]*\\(.*\\)\\b[ ]*$\\|^author:[ ]*\\(.*\\)\\b[ ]*$") ;;;;describe artist
	(emms-mplayer-info-defreg Album "Album:[ ]*\\(.*\\)\\b[ ]*$") ;;;;describe artist
	(emms-mplayer-info-defreg Title "Title:[ ]*\\(.*\\)\\b[ ]*$") ;;;;describe artist
	(if (> (length (concat nowplaying Title)) 0)
	(emms-track-set track 'info-title (concat nowplaying Title)))
	(if (> (length (concat name Album)) 0)
	(emms-track-set track 'info-album (concat name Album)))
	(if (> (length Artist) 0)
	(emms-track-set track 'info-artist Artist))
	(if (not (or (emms-track-get track 'info-artist)
		     (emms-track-get track 'info-album)
		     (emms-track-get track 'info-title)))
	    (emms-track-set track 'info-album
			    (if (listp (emms-track-get track 'metadata))
				(car (emms-track-get track 'metadata))
			      "")))
	(emms-track-updated track)
))

プレイリスト中のより叙述的なトラック行

(defun fg-emms-track-description (track)
  "いくらかナイスなトラック情報を返す."
  (let ((artist (emms-track-get track 'info-artist))
        (year (emms-track-get track 'info-year))
        (album (emms-track-get track 'info-album))
        (tracknumber (emms-track-get track 'info-tracknumber))
        (title (emms-track-get track 'info-title)))
    (cond
     ((or artist title)
      (concat (if (> (length artist) 0) artist "Unknown artist") " - "
              (if (> (length year) 0) year "XXXX") " - "
              (if (> (length album) 0) album "Unknown album") " - "
              (if (> (length tracknumber) 0)
                  (format "%02d" (string-to-number tracknumber))
                "XX") " - "
                (if (> (length title) 0) title "Unknown title")))
     (t
      (emms-track-simple-description track)))))

(setq emms-track-description-function 'fg-emms-track-description)

– Filipp Gunbin

スクリーンショット

[1]

EmmsEasyNotification produces notification like: this

質問

ムービーについてはどう, 字幕は?

EMMSは動画再生をサポートするとホームページでは謳われているが本当は 私は調べるのが面倒だどのくらいでそれはなる? 例えば, それはMPlayerか、他のプレーヤーのためのサブテキストファイルの選択をサポートしていますか? これについてのいくつかのより詳細な情報がいいだろう. – MaDa

It supports movies, just define a new player than can play the extensions you want.

What it doesn’t support, though, is subtitles selection.

もし前がそれをどう有効にするかについてのアイディアを持っているなら, 聞かせてくれ ☺ 現在俺はmplayer出力パースし.mkvに埋め込まれたたくさんの異なるトラックを俺に選ばせるカスタムpythonスクリプトをちょうど使っている. しかしビデオクリップのために,EMMSだけで動作します.

LucasBonnet

俺は .MKVファイルついては知らない,だから俺はお前がさっき行ったことは今のところ無視するよ. ☺ What I do know, however, is that sub text files most of the times have the same base name as the movie file, and ends in .srt or .sub.

Yes, there are other variants too, with “vobsub” files. EMMS should be able to make quite good guesses.

I have some example elisp at home that I can publish here later, that makes such guesses. Many times, mplayer will guess the correct file automatically though.

MaDa

約束したコードがここにある. 俺はdiredでmplayerを使って動画ファイルをより簡単に再生するために使っている:

(defvar dired-mplayer-program "c:/pgm/mplayer/mplayer.exe")

(defun dired-mplayer ()
  (interactive)
  (let ((file (expand-file-name (dired-get-filename)))
        ext files basename dir curr-file idx-file sub-file srt-file
command options)
    (setq basename (file-name-nondirectory
(file-name-sans-extension file)))
    (setq dir (file-name-directory file))
    (setq files (directory-files dir t basename))
    (delete file files)
    (while files
      (setq curr-file (car files))
      (if (string= (file-name-extension curr-file) "idx")
        (setq idx-file curr-file))
      (if (string= (file-name-extension curr-file) "sub")
        (setq sub-file curr-file))
      (if (string= (file-name-extension curr-file) "srt")
        (setq srt-file curr-file))
      (setq files (cdr files)))
    (if (and idx-file sub-file)
        (setq options (format "-vobsub \"%s\""
(file-name-sans-extension idx-file))))
    (if (and sub-file
             (not idx-file))
        (setq options (format "-sub \"%s\"" sub-file)))
    (if (and srt-file
             (not sub-file))
        (setq options (format "-sub \"%s\"" srt-file)))
    (setq options (format "%s -font \"%s\" -subfont-text-scale 4
-really-quiet" options "c:\\windows\\fonts\\arial.ttf"))
    (setq command (format "\"%s\" \"%s\" %s" dired-mplayer-program
file options))
    (if (y-or-n-p (format "Run command %s?" command))
        (shell-command command))))

もし気に入ったらEMMSで使え. – MaDa

Or simply put “sub-fuzziness=1” into your ~/.mplayer/config.

WilliamXu

ストリーミングラジオは?

ストリーミングラジオを聞くためにこのパッケージを使うことができますか(例えば[[2]]から使える)?

JoeCorneli

はい! 今あなたはできる! それはCVSにあります. 私はしばらくの間それを使ってきました, あなたが良い局を見つけたらそしてそれは本当によく働きます. (require ‘emms-streaming) とするだけ‘M-x emms-streams’とすれば立ち上がります.

DanielBrockman

少なくとも私のDebian EMMS (version 1.3)は,正しいrequireは(require ‘emms-streams)です.

LucaCapello

RichardRiley: 3 Nov 2009

Create or edit your emacs home directory file “emms-streams” and add/paste this in (editing appropriately) for BBC Radio streams around the world:-

(("NDR Info" "http://ndr.ic.llnwd.net/stream/ndr_ndrinfo_hi_mp3" 1 url)
 ("NDR Kultur" "http://ndr.ic.llnwd.net/stream/ndr_ndrkultur_hi_mp3" 1 url)
 ("BBC Radio 1" "mms://wmlive.bbc.net.uk/wms/bbc_ami/radio1/radio1_bb_live_int_eq1_sl0?BBC-UID=e44a970b22ffbda06a4e058b91802eba1c90682640d091dff269e685b0547800&SSO2-UID=" 1 url)
 ("BBC Radio 2" "mms://wmlive.bbc.net.uk/wms/bbc_ami/radio2/radio2_bb_live_int_eq1_sl0?BBC-UID=e44a970b22ffbda06a4e058b91802eba1c90682640d091dff269e685b0547800&SSO2-UID=" 1 url)
 ("BBC Radio 3" "mms://wmlive.bbc.net.uk/wms/bbc_ami/radio3/radio3_bb_live_int_eq1_sl0?BBC-UID=e44a970b22ffbda06a4e058b91802eba1c90682640d091dff269e685b0547800&SSO2-UID=" 1 url)
 ("BBC Radio 4" "mms://wmlive.bbc.net.uk/wms/bbc_ami/radio4/radio4_bb_live_int_eq1_sl0?BBC-UID=e44a970b22ffbda06a4e058b91802eba1c90682640d091dff269e685b0547800&SSO2-UID=" 1 url)
 ("BBC Radio 5" "mms://wmlive.bbc.net.uk/wms/bbc_ami/radio5/radio5_bb_live_int_eq1_sl0?BBC-UID=e44a970b22ffbda06a4e058b91802eba1c90682640d091dff269e685b0547800&SSO2-UID=" 1 url)
 ("Nectarine" "http://calcipher.verbrennung.org:8000/nectarine.ogg.m3u" 1 url))

リロードするために M-x emms-streams

AlsaPlayerについては?

AlsaPlayerはCDDA (CD)オーディオ再生とicecast/shoutcastストリーミングサポートを含む,たくさんのファイル形式を再生することができる汎用コマンドライン(--interface text)ミュージックプレイヤーです. それがいま非常にたくさんの異なる出力システムのサポートしているのでAlsaPlayerという名前は今日では少し迷うかもしれない. Esound, NAS (Network Audio Server), Sparc そして SGI オーディオ出力のような,古い既定のOSSオーディオインターフェースがサポートされています. 最も興味深い新しい出力はJACKです.

はい! あなたはできる! これら2つの簡単なステップに従ってください.
'(emms-player-list (quote (emms-player-alsaplayer)))

in your custom-set-variables section of your .emacs file.

(define-emms-simple-player alsaplayer '(file url) (regexp-opt
'(".ogg" ".mp3" ".wav" ".flac" ".pls" ".m3u" "http://"))
"alsaplayer" "--quiet" "--nosave" "\"--interface text\"")

注意: alsaplayerのicecast/shoutcastストリーミングサポートは(まだ)EMMSに統合されていないが, 使用可能.

CDプレイヤーについては ?

emms-cd.elは推奨されていませんか?

上記の,AlsaPlayerノートを見よ.

Apple リモートコントロールの使用については?

How about scrobbling to libre.fm?

(メーンgitリポジトリの)Emmsは今音楽のスクラブリングとストリーミングの両方のための Libre.fm サポートを持っています, そして今度の4.0 リリースでは含まれているでしょう. Last.fm サポートは除去されました.

MPDについては?

MPDもしくはMusicPDはオーディオプレイヤーです.

それは異なるユーザインタフェースによって制御することができるデーモンとして振る舞い, 全てのオーディオファイルはひとつのディレクトリになければならない.

私はこれを見つけたが, emacsを正しく設定できない. 私はMPDで全てのサポートされているファイルをどうやって再生するのか知りたいそして私は私のユーザの/home中の特定のディレクトリ上で全ての私のオーディオファイルを持ちたい.

http://cvs.savannah.gnu.org/viewvc/*checkout*/emms/emms/emms-mpd.el?revision=HEAD

ここにサイトがあります: http://musicpd.org


バグ: 何らかの理由で, もしMPDのプレイリストがとても長いと (すなわち, 選曲の全体のうち, ランダムに曲を聴くために), プレイリスト中の実際に再生されている現在の曲に先立ってその曲を再生している曲としていつも表示する.

バグ: 同様に, emms-cache-set-from-mpd-all (in ~/.emacs)を使用すると, たとえもしMPDキャッシュが更新されたとしても, この関数を呼び出すとそれに応じて走っているemacsセッション中または新規emacsセッションのどちらかがキャッシュの更新に失敗する.

UADEについては?

UADEはUnix Amiga Delitracker Emulatorの略です. それはたくさんのオーディオ形式のオリジナルプレイヤーを走らせるためにAmiga コンピューター ハードウェア (UAE Amiga エミュレーターからのコードを使って)の一部をエミュレートし, これらの形式の多くは改造タイプであることそして"trackers"として知られているツールを使って構成されている. Amiga computers were mainly used by the multimedia stuff (before the term was invented), Amiga コンピューターは主に使われている マルチメディアスタッフによって (その用語が発明される前に) largely known by its games and demoscene productions, meaning there are tons of music files. 広く知られている それらのゲームとデモシーン生成によって 意味するのはそこにはたくさんの音楽ファイルがある Stuff like mikmod is usable for a few of formats, but it can’t play lots of others from Amiga platforms and others. スタッフが好きなmikmodはいくつかの形式のために利用可能ですが それは 再生できない 他のたくさん  サイトはここです: http://zakalwe.fi/uade/

emms-print-metadata バイナリー

全ての私のタグを得る emms-pritn-metadataのwin32 バイナリーもしくはその他の方法はどこかにありますか?

[3]にemms-print-metadataのw32ビルドをアップロードしました. MinGWでコンパイルされています. --DiGash

歌詞の取得

私はemmsで現在再生中の曲の歌詞をゲットするため数行の書きました. (歌詞だけで, emmsに歌詞を同期させて表示させるような形式の歌詞はゲットしない.) ちょっとラフだけど, それは俺のために働いてくれる, それで思ったそれを投稿しようと.

Lisp:emms-get-lyrics.el (2007), emms-get-lyrics.el (2010) (オリジナルのLisp:emms-get-lyrics.elは俺のところでは動かない, それで直した, mode-mapを除去し, いくつかの機能を追加した:

歌詞を探そうとする前に, 調べろ: 要求されるプログラム, そして曲のアーティストとタイトル. – talau)

Jay

JohnSturdyは歌詞ファイルの作成と編集をするためのメジャーモードを書いています; それはogg123に直接接続し, そして実際にEMMSでは使わないだろうが, それと並んで役に立つかもしれない.

LyricMode

win32上で動かす

私は最近windows版のEMMSとmplayerとcygwin上のvorbis-toolsをダウンロードしましたが, しかしながらemmsが動いているように見ることができません.

私が使っている設定は次の通り:

;;EMMS player (a music/video player for emacs)
(add-to-list 'load-path "D:/emacs/site-lisp/emms/")
(add-to-list 'load-path "C:/mplayer/")
(require 'emms)
(require 'emms-player-simple)
(require 'emms-source-file)
(require 'emms-source-playlist)
(setq emms-player-list '(emms-player-mpg321 
			 emms-player-ogg123 
			 emms-player-mplayer)
      emms-source-list '((emms-directory-tree "D:/My Music/")))

Where C:/mplayer/mplayer.exe is where i downloaded the windows version of myplayer.

When i enter emms-play-file D:/abc.mp3 (a small test file),it returns symbol’s value as variable is void: emms-player-mplayer

どうもありがとう!

あなたはこれも追加する必要があるだろう.

(require 'emms-player-mplayer)

--MichaelOlson

えっと, 俺はそれを追加したが今, ファイルを再生しようとした時,それは俺にこのエラーを与える: どうやってトラックを再生するかわからない: (track (type .file) (name . “D:/abc.mp3”))

どうやってwindowsで動くmpg321/mpg123を手に入れるか恐らく俺が見つけ出すことができないかもしくは見つけられない, 俺はMpthreePlayerページからのアドバイスにしたがってcygwinとvorbis-toolsを手に入れた. 誰か何かアイディア持ってない?

どうもありがとう!

You need to put the player executable (mpg321/mplayer/whatever) in Emacs’ exec-path list:

(add-to-list ‘exec-path “C:mplayer”)

--LucasBonnet

プレイリストバッファーでイメージ?

So on the EMMS website, there’s a screenshot in which the playlist buffer (not just the browser buffer) displays cover images! I’ve tried googling around but haven’t found the code that enables that particular feature, but would really like to prettify the playlist buffer some…basically, it would be cool to have the default display mode, plus images.

Anyway…any response is much appreciated. And just think--then this’ll be on the internet and will come up in google searches the first time around.

This is part of emms-browser.el - when you add tracks from the browser into the playlist, it automatically adds the images as well. If you want to use images without the browser, you’ll need to write your own code to insert the images into the buffer.

- Well, that’s the thing! I always use emms-browser. When I add tracks from the browser into the playlist, it does not insert an image (whether inserting individual tracks, a whole album, or everything by an artist). And I use a recent (a few days old) darcs version (this didn’t work on the Debian version either, back when I used that). What might be causing this abnormal behavior?

The playlist uses a different size image by default. Have a look at the variable ‘emms-browser-covers’

By default, emms will insert cover_small.jpg into browser buffer and cover_med.jpg into playlist. Therefore, you need to make sure there are such image files for each directory.

Here is the script I used to create such files from images:

#!/bin/bash
# Modified: Fang lungang 03/13/2010 21:55>
for afile in "$@"; do
    path=$(dirname "$afile")
    convert -resize 60x60 "$afile" "$path/cover_small.jpg"
    convert -resize 120x120 "$afile" "$path/cover_med.jpg"
    # large cover not used
done

EMMSとWMA

For one reason or another I have a bunch of WMA files. However, EMMS does not read the tags. Instead WMA tracks are just mixed together under Misc. EMMS will play back the tracks, however. Does somebody know how to make EMMS handle WMA tags?

DVD's and CD's Using MPlayer Player?

Is this possible? Would I just point EMMS to the /mnt/cdrom directory?

元ファイルを削除することなくキャッシュからアイテムを削除するには

Since EMMS seems to cache everything (which, normally, is useful since I like to use the Browser), is there a way to delete items from the cache without deleting the files? For example, I might move a file to a different location, eject a CD (if there’s a way to play CD’s), or delete it from somewhere else--in which case, when I try to remove it from the cache using “D” in browser-mode, I get an error about the file not existing (and the item remains in the cache), so I have to use “touch” to create new files for it to delete. Any thoughts?

Run M-x emms-cache-sync and it will look through your cache for files which have been updates or deleted.

Apache ディレクトリ リスティングからファイルを再生する

I share my whole mp3-collection through a secret link (i.e. you need to know the exact link to access them) on my Apache server, and some of my friends does too. So I wanted an easy way to get EMMS to play all mp3 files found in such a directory listing. It was quite easy to do. Enjoy!

(defun my-emms-play-apache-mp3-folder (folder-url)
  "Plays mp3 files found in Apache directory listing."
  (interactive "sURL to Apache directory listing: ")
  (let ((tmp-file "~/.my-emms-play-apache-mp3-folder-tmp"))
    (when (file-exists-p tmp-file)
      (delete-file tmp-file))
    (url-copy-file folder-url "~/.my-emms-play-apache-mp3-folder-tmp" t)
    (while (not (file-exists-p tmp-file))
      (sleep-for 0 500)
      (message "Looking for file..."))
    (message "Listing downloaded. Parsing...")
    (with-temp-buffer
      (insert-file-contents "~/.my-emms-play-apache-mp3-folder-tmp")
      (goto-char (point-min))
      (while (search-forward-regexp "a href=\"\\(.+\.mp3\\)\"" nil t)
        (emms-add-url (concat folder-url (match-string 1))))
      (message "Done."))))

Usage: Copy the URL to a specific folder with mp3-files. Execute the command above and paste the URL. The URL needs to end in a slash, I was lazy and did not want to check for it in the code…

MaDa

キーバインディング

This code sets up the arrow keys to control the player:

    (global-set-key (kbd "C-c e <up>") 'emms-start)
    (global-set-key (kbd "C-c e <down>") 'emms-stop)
    (global-set-key (kbd "C-c e <left>") 'emms-previous)
    (global-set-key (kbd "C-c e <right>") 'emms-next)

If you have “multimedia keys” on your keyboard, you might want to do the following:

    (global-set-key (kbd "<XF86AudioPlay>") 'emms-pause)
    (global-set-key (kbd "<XF86AudioStop>") 'emms-stop)
    (global-set-key (kbd "<XF86AudioPrev>") 'emms-previous)
    (global-set-key (kbd "<XF86AudioNext>") 'emms-next)

Or… Are you running Emms inside your emacs daemon? Have you ever wanted to set it as your default, primary audio player? Have you ever wanted to switch to the next track (this one suc*s!) but you where in Firefox/OpenOffice/whatever ?

Well, then give a look to EmmsRemote, in order to bind your Window-Manager keychain to Emacs/Emms ;-)

emmsプレイリスト中のポイント以下の全てのトラックの合計時間を計算する

I just started out with lisp and there can be any better thing to hack on but emms!

(defun my-emms-playlist-total-time-below-point ()
"Calculates the total time taken for all the tracks currently in playlist and below point"
(interactive)
(let ((move-forward t)
      (total-playlist-time 0))
  (save-excursion 		
    (while move-forward
      (setq total-playlist-time (+ total-playlist-time (or (emms-track-get (emms-playlist-track-at (point)) 'info-playing-time) 0)))
      (forward-line 1)
	(setq move-forward (next-single-property-change (point) 'emms-track))))
(setq total-hour-only (/ total-playlist-time 3600)
	total-minutes-only (/ (% total-playlist-time 3600) 60)
	total-seconds-only (% total-playlist-time 60))
(message "Total time is %dh:%dm:%ds" total-hour-only total-minutes-only total-seconds-only)))

– shyam_k

Anythingで使う

Anything は候補選択のフレームワークです.

Lisp:anything-config.el has EMMS related sources, ‘anything-c-source-emms-streams’ and ‘anything-c-source-emms-dired’.

ディスク番号とディスクサブタイトル

ディスク番号タグは少なくともmp3とoggファイルでサポートされており, ほとんどのプレイヤーはそれを理解できます. EMMSがそれを無視する特別な理由がありますか? 見かけ上ファイルがトラック番号によって再生されるので,それはちょっと私のメディアライブラリーを汚くする従って2つのディスクのアルバムの再生時に,両方の最初のトラックが再生され,次に両方の2番目のトラックというようになる.

私はディスク番号サポートを実装し,パッチをemms-patchesへ送りそしてここから閲覧可能: http://article.gmane.org/gmane.emacs.emms.patches/691 . まだ反応はない. – ChristopheRhodes