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.

nvlc

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, nvlc /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.

Hint: enter nvlc -h for basic help, which is actually quite lengthy, or nvlc -H for even lengthier help. Enter nvlc --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

MikMod

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

Conclusion

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.

Resources

Ncurses: http://www.gnu.org/software/ncurses

Mp3blaster: http://mp3blaster.sourceforge.net

Herrie: http://herrie.info

MOC: http://moc.daper.net

Bongo: https://github.com/dbrock/bongo

EMMS: http://www.gnu.org/software/emms

MPD: http://www.musicpd.org

Ncmpcpp: http://unkart.ovh.org/ncmpcpp

Kuechenstation: http://kuechenstation.sourceforge.net

CCX2: http://palbo.github.com/ccx2

VLC: http://www.videolan.org/vlc

MikMod: http://mikmod.raphnet.net

______________________

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

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

+1 cmus; randomplay for random play

Kevinhss's picture

cmus for hassle free music. I just discovered randomplay looking for random number generators it the mint repos' and it is great. does what it says and remembers acroos sessions.

Reply to comment | Linux Journal

solo ads's picture

Your personal message emailed to 500,000 UNIQUE Prospects.

All interested in your service or product. These are not just your regular everyday emails.
The list members chose to join it by double-opting in. Most people have found that the list is highly responsive.
What more could you ask for? A one time personal-emailing to 500,000 UNIQUE Prospects is
just *$9.95. Purchase it now and we Will Boost The UNIQUE Prospects To 1,
500,000. We feel It will please you to know that we have
been an internationally recognized company for over twelve years.

You better hope you surf to our website before your competition does.

Dont Forget To Use Promo Code 233 For a Lifetime Global-Marketing Membership.
Start Success Now!

re

acacsacacascicacasal's picture

thanks!

Michel Gru's picture

Thanks Rebecca, wasn't aware these were out there, and that many of them.
I really prefer console in favor of GUI.
Maybe you can write an article on the excellent ffmpeg too?

Thanks again,

Michel

Somehow, nvlc passed me by.

Dave Keays's picture

Somehow, nvlc passed me by. Thanks for the tip. Now I don't have to pull my head out of the command line just to listen to music files.

Dave Keays, freelance webmaster

MOC

moc lover's picture

I have been using MOC with transparency for a long time. It is perfect.

+1 for cmus. Been using it

gt's picture

+1 for cmus. Been using it for years. very lightweight, to the point, without any bloat.

I am quite surprised that the author didn't know of cmus, as she has mentioned quite a few obscure ones.

Anyway, good article. It'll sure help a lot of people looking for console players.

Forgot CMUS

Billy Larlad's picture

The author deserves credit for being quite thorough. Unfortunately, one of the omissions is a big one; to me, cmus is the best music player there is, holding its own against all other TUI, CLI, or GUI programs.

forgot about cplay

Craig Hollabaugh's picture

I've been using cplay for years,

https://github.com/holizz/cplay

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix