What is EMMS and How Does it Work?
EMMS is an Elisp front-end client for various multimedia players. This means that unlike traditional music players, EMMS only deals with displaying files and it uses external programs to decode those files. EMMS consists of three distinct parts: the core, the player and the source.
The core – controls how files in an EMMS buffer should behave. Further, it also provides a way for other EMMS modules to read and manipulate those files.The player – handles the interface between Emacs and the external music players.The source – deals with how Emacs discovers and reads those files. It then puts those in an editable text buffer that the core part can read.
As a result, this approach allows you to treat each media file as text that you can easily copy to other Emacs buffers. For example, you can take a playlist from EMMS and either export it to an Org journal or a post to USENET through Gnus.
Installing EMMS
With that, installing EMMS is incredibly easy. EMMS is already available in the GNU ELPA repository, so you can quickly install it:
Configuring EMMS
With that done, you should create a simple configuration script for EMMS. Doing this will then allow EMMS to know which Emacs settings to enable as well as the external programs and file paths that it should look for.
Adding an External Music Player
By default, EMMS does not provide any media player for playback, the next thing you need to do is tell EMMS which media player it can use to play the audio that it indexes. As such, you will need to first install a suitable media player if you want to play either FLAC or MP3 files. setq – Emacs function that allows you to set a particular variable’s value. In this case, you are modifying the value for the emms-player-list. emms-player-list – a EMMS function that defines the list of media players that it can use. emms-player-mpv – a specific glue function that links mpv and Emacs together. This is what allows EMMS to play your music inside Emacs.
Adding a Default Music Directory
From there, the next thing that you need to do is to set the default directory where EMMS will look for media files. Similar to the other settings above, this also requires you to edit your “init.el” file.
Starting a Basic EMMS Session
Using the EMMS Playlist to Play Music in Emacs
Creating a New Playlist in Emacs
EMMS also allows you to create custom playlists from inside Emacs. This means that, similar to traditional music players, you can save a specific list of music files that you want to play in sequence.
Music Scrobbling in Emacs with GNU FM
Aside from playing music, it is also possible to customize EMMS and extend its features beyond a simple media player. For example, you can use a function that allows you to upload track information to a music scrobbler such as libre.fm. The first function – explicitly tells Emacs to load the GNU FM scrobbler for EMMS. This enables EMMS to connect to libre.fm and submit track information in its database. The second function – contains your account information which EMMS uses to access libre.fm. Image credit: Unsplash All screenshots by Ramces Red sshfs remoteuser@remotemachine:/path/to/music /home/$USER/ Aside from external network mounts, EMMS also supports network radio streams. To enable this, all you need to do is to press Alt + X, then type “emms-streams”.