Rock Out with Your Console Out
MPD + Ncmpcpp
In the vast universe of Linux audio, the Music Player Dæmon (MPD) could be considered a red giant. Chances are you've at least heard of it if you've done any research on playing music in Linux. It comes preinstalled in many distributions, and I have yet to find a major repository that doesn't include it.
MPD is technically a server-side application; it's great for setting up networked audio in a home media center. You also can use it simply for local playback. The advantage here is that you can use any client you want to control MPD, and there are many from which to choose. I easily could devote pages to discussing MPD, but that's beyond the scope of this article. Documentation is easy to find on-line.
Now, let's move on to Ncmpcpp. This is an Ncurses MPD client, based on Ncmpc but more advanced. It includes support for Last.fm scrobbling and music visualization via external libraries. Lyrics fetching and display are built in and can be activated for a selected track by pressing l. The lyrics feature is, in fact, what attracted me to Ncmpcpp in the first place. I'd tried various scripts to fetch lyrics in other console music players, particularly MOC, but nothing worked for me until Ncmpcpp. Ncmpcpp can fetch artist information as well.
Although Ncmpcpp is terrific once you get it set up, using an MPD client to listen to music isn't always a pragmatic choice. You'll most likely be up and running much faster with a player like Mp3blaster, MOC or Herrie.
I'm someone who likes to experiment with various Linux distributions by installing them on old computers and in virtual machines, and I often test out software in these environments. The truth about MPD is that a lot can go wrong. I let out a (silent) cheer every time I manage to install and use it successfully. Grappling with dependencies is half the battle, and configuring your system, especially your ~/.mpdconf file, is the other half. I've gotten it to work on some systems without a hitch, but more often than not, I've encountered problems and solved them through trial and error.
Don't let this discourage you; MPD and its wide selection of clients are worth the effort to set up if you take advantage of their features, and there are plenty of places to get help if you need it. The MPD man page is essential reading; beyond that, read through the official wiki and forums. Your distribution may provide documentation as well. Gentoo's on-line wiki, for instance, has a lengthy section on MPD.
Figure 5. Ncmpcpp Showing Lyrics
Figure 6. Browsing Files in Ncmpcpp
XMMS2 + Kuechenstation/CCX2
Like MPD, XMMS2 is a dæmon you can control over a network, and there are various clients for it. The XMMS2 Wiki acknowledges that the developers of these two applications have similar goals and that a collaboration could eventually be possible. For now though, they are separate packages with separate clients. Two text-mode XMMS2 clients that caught my attention were Kuechenstation and CCX2.
Kuechenstation is one 1337 music player. Okay, I was being mostly facetious there, but take one look at it, and you'll think "eighties demoscene". (Kuechenstation actually has been around only since 2008.) It uses the FIGlet library to display the current song title in a scrolling marquee of oversized letters made from ASCII characters.
The whole interface is attractive and friendly. You can navigate through several full-screen modes using keybindings that are helpfully listed at the bottom of the screen. These modes include playlist mode, artist information mode and podcast mode, to name a few. The podcast feature is especially notable; I haven't seen podcast support in any of the other music players discussed in this article. Kuechenstation helps you get started with a few pre-subscribed feeds, which are all in German.
The Kuechenstation configuration file is located at ~/.config/xmms2/clients/kuechenstation.conf. There you can choose your podcast subscriptions, interface colors and even the scrolling FIGlet font.
Figure 7. Kuechenstation with My Customized Color Theme
CCX2, written in Python, is another solid XMMS2 client. Its command mode will come naturally to Vi/Vim users. All the standard playback and playlist management features are there: search, rename, browse, metadata display and so forth.
So why did I decide to write about two TUI XMMS2 clients instead of just choosing the one with more features? My reasoning is, first of all, that the interfaces of Kuechenstation and CCX2 are quite different, and each will appeal to different users solely on the basis of personal taste. Second, each has a major feature that the other lacks. CCX2 doesn't come with podcast support as Kuechenstation does, but it does support lyrics fetching out of the box, which Kuechenstation does not.
Figure 8. One of CCX2's Lyrics Display Layouts
I suggest trying them both. They are young and in active development, so there's a reasonable chance that a feature you're missing could be added in the future. And, of course, if you're a developer, you can try to add it yourself.
The famous VLC media player, known for its ability to play almost any
media file you throw at it, comes with a lesser-known Ncurses control
interface. To start it up, type
nvlc. The interactive
features are noticeably limited in comparison with the vast array of
options you may be used to seeing in the GUI version. Press B to browse
your files and Return to add a file to the playlist. Toggle help view with
h for a complete list of hot keys.
At first glance, nvlc doesn't seem all that special. It might not be for you if you want a player that's preconfigured with a hefty arsenal of hot keys, but you can do a lot with it—including adding custom hot keys—if you're willing to experiment.
The path to nvlc's power is through command-line arguments. You can
pass arguments ranging from a directory or playlist (a la,
/path/to/my/music) to complex chains of filters. Anything you
can do in the GUI version of VLC is possible with nvlc if you know which
arguments to pass.
nvlc -h for basic help, which is actually quite
nvlc -H for even lengthier help.
--list to see what modules are available in your installation or
nvlc --list-verbose for more-detailed output.
For starters, try:
nvlc --audio-filter chorus_flanger --delay-time 150 ↪--dry-mix 0.8 --wet-mix 0.6 --feedback-gain -0.3 ↪/path/to/my/music.fileextension
Figure 9. A Playlist in nvlc
For the old-schoolers among you who collect modules—and perhaps scoff when you hear the phrases "MP3 player" and "music player" used interchangeably—there is MikMod. MikMod is an old standby from pre-Windows Microsoft DOS. You can use it as a back end for other applications, such as Bongo or EMMS in Emacs, or as a standalone module player.
MikMod will play many module formats. If your file extensions include MOD, XM, IT or S3M, you're in luck. Sorry, MP3s—no MikMod for you, or for all you WAVs and OGGs and AIFFs. In a way, this is a bit sad, because I'd love to play my standard music files in a player as awesome as MikMod. I have to keep in mind that many of MikMod's features, such as on-the-fly tempo change and instrument-specific volume bars, are built specifically for module file formats. Perhaps this will be an incentive for me to make some sounds in MilkyTracker.
Figure 10. Instrument Levels in MikMod
Figure 11. Some of MikMod's Options
Many console music players are available for Linux. I chose the few I covered in this article based on my level of experience with them and on what I considered to be unique and notable features. If the topic intrigues you, go out (or Google) and explore.
Rebecca "Ruji" Chapnik is a freelance creator of miscellanea, including but not limited to text and images. You can find her experiments at http://rujic.net
Getting Started with DevOps - Including New Data on IT Performance from Puppet Labs 2015 State of DevOps Report
August 27, 2015
12:00 PM CDT
DevOps represents a profound change from the way most IT departments have traditionally worked: from siloed teams and high-anxiety releases to everyone collaborating on uneventful and more frequent releases of higher-quality code. It doesn't matter how large or small an organization is, or even whether it's historically slow moving or risk averse — there are ways to adopt DevOps sanely, and get measurable results in just weeks.
Free to Linux Journal readers.Register Now!
- August 2015 Issue of Linux Journal: Programming
- Django Models and Migrations
- Hacking a Safe with Bash
- Secure Server Deployments in Hostile Territory, Part II
- The Controversy Behind Canonical's Intellectual Property Policy
- Huge Package Overhaul for Debian and Ubuntu
- Shashlik - a Tasty New Android Simulator
- Embed Linux in Monitoring and Control Systems
- KDE Reveals Plasma Mobile
- diff -u: What's New in Kernel Development