游世集

遨游人世,累文一集

  IT博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  87 随笔 :: 0 文章 :: 27 评论 :: 0 Trackbacks

  A major mode to play mp3s under emacs

I am an intensive emacs user and I hate fancy GUIs à la xmms. Hence, I wrote this major mode front-end to mpg321. You can get the source here: mp3play.el. It displays your list of mp3 in a buffer and allows you to control mpg321 and organise sequences of mp3 to play. You can check this impressive screenshot. Note that to control the gain, mp3play can either use aumix, or directly control the gain of mpg321 if you use the patch below.

I have the following in my .emacs

(setq mp3play-dirlist '("~/mp3")
      ;; I want to see the remaining time
      mp3play-show-timing 1
      ;; This because I use a patched mpg321 to control the gain
      mp3play-use-remote-gain t
      ;; Initially, set the gain to 50%
      mp3play-initial-gain 50
      ;; Where to store the info about the song playing to resume later
      mp3play-resume-file "~/.mp3play-resume")

(load "mp3play")

;; M-\ go to the mp3play buffer
(define-key global-map [(meta \\)] 'mp3play)
;; C-x C-m C-s stops the current mp3
(define-key global-map [(control x) (control m) (control s)] 'mp3play-stop)
;; C-x C-m C-p pauses it
(define-key global-map [(control x) (control m) (control p)] 'mp3play-pause)
;; C-x C-m C-i shows mp3 informations
(define-key global-map [(control x) (control m) (control i)]   'mp3play-show-current-information)

这个太cool了!
下载链接http://diwww.epfl.ch/~fleuret/files/mp3play.el
posted on 2005-07-08 11:26 xlmo 阅读(202) 评论(0)  编辑 收藏 引用 所属分类: Emacs
只有注册用户登录后才能发表评论。