Setting Orange, the 35 day of Chaos in the YOLD 3180
Using EMMS on OS X
I spend most of my tube time in Emacs. Many years ago I used mpg123.el to play music in Emacs. For some reason, perhaps because I started using more audio formats, I changed to other music players. I mostly used mpd with ncmpc.
When I made the switch to Macintosh I continued to live in Emacs but continued to use terminal-based music players. No longer! It's time Emacs did what it does best… er… play music!
Install mpg321, flac123 and libtag from Homebrew.
Clone latest version of EMMS from git:
% git clone git://git.sv.gnu.org/emms.git % cd emms % make
Copy the emms-print-metadata program (that uses libtag to be able to edit music metadata) to my program directory:
% cp src/emms-print-metadata ~/bin/
Add to ~/.emacs.el
:
; Emacs Multimedia System (EMMS) (add-to-list 'load-path "~/hacks/emms/lisp") (require 'emms-setup) (emms-standard) (require 'emms-tag-editor) (require 'emms-info) ; Use only libtag for tagging. (require 'emms-info-libtag) (setq emms-info-functions '(emms-info-libtag)) (setq emms-info-libtag-program-name "/Users/mc/bin/emms-print-metadata") (emms-default-players) (setq emms-source-file-default-directory "~/Music/") ; Play FLAC with flac123. (define-emms-simple-player flac123 '(file) "\\.flac$" "/usr/local/bin/flac123") (add-to-list 'emms-player-list emms-player-flac123) ; Add music file or directory to EMMS playlist on ! in dired. (define-key dired-mode-map "!" 'emms-add-dired)
Note well: Tag information won't work if you have spaces in file names.
If you really need to change large amount of files and directories,
consider using the Perl rename
script from Homebrew and then do:
% find . -depth -name "* *" -execdir rename 's/ /_/g' "{}" \;
over your music collection.