Skip to content

Latest commit

 

History

History
98 lines (73 loc) · 2.76 KB

emacs-emms.org

File metadata and controls

98 lines (73 loc) · 2.76 KB

Emacs EMMS

This file attempts to define the needs I have for streaming music from Emacs at work instead of using iTunes like the good lord intended.

Setup and Installation

To begin, install all the goodness:

# brew install mpg321
# brew install mpg123
brew install mplayer

Install the EMMS package:

(packages-install '( emms ))

Load up the system and the players.

(require 'emms-setup)
(emms-standard)
(emms-default-players)

Show the current track each time EMMS starts to play a track.

(add-hook 'emms-player-started-hook 'emms-show)
(setq emms-show-format "Playing: %s")

When asked for emms-play-directory, always start from this one:

(setq emms-source-file-default-directory "~/Music/")

Radio Stations

Perhaps the easiest approach is just to have some radio stations wrapped up in some easy-to-functions, for instance:

(defun play-smooth-jazz ()
  "Start up some nice Jazz"
  (interactive)
  (emms-play-streamlist "http://thejazzgroove.com/itunes.pls"))

And then bind it to some key, however, I’m sure I will start picking up a larger and larger collection of radio stations that fit my mood, so I might as well create a prefix for these using my snazzy define-sequence macro:

(define-sequence 'personal-music-map "<f9> m" 'emms-play-streamlist
  '(("a" "http://stereoscenic.com/pls/pill-hi-mp3.pls") ;; Ambient
    ("t" "http://www.1.fm/tunein/trance64k.pls")        ;; Trance
    ("j" "http://thejazzgroove.com/itunes.pls")))       ;; Jazz

Controlling the Music

Stopping should be a bit quicker to hit:

(define-key personal-music-map (kbd "s") 'emms-stop)

Technical Artifacts

Make sure that we can simply require this library.

(provide 'init-emms)

Before you can build this on a new system, make sure that you put the cursor over any of these properties, and hit: C-c C-c