Skip to main content

How To Play Music on Your Terminal

MOC (music on console) is a music player app for linux/unix command line interface designed to be simple and robust enough to run smoothly on your terminal without significantly affecting other I/O operations.

"MOC plays smoothly, regardless of system or I/O load because it uses the output buffer in a separate thread. The transition between files is gapless, because the next file to be played is precached while the current file is playing". as quoted from their website.

Top features
  • JACK, ALSA, SNDIO
  • An inbuilt simple equalizer.
  • A mixer that can be connected to an external mixer.
  • Fully customizable keymapping.
  • Playlist and directory search.
  • Support for internet streams.
  • Theme options
  • Character set conversion using iconv()


The latest stable release is MOC 2.5.2. 
Version 2.6-alpha3 seems to be the one installed although it is still in development according to their page.


It has the following improvements.
  • Complete support for all Sndfile formats.
  • DSD format support via FFmpeg/Libav
  • OSS sound driver has 24-bit support
More information can be found here.

Installation
Installation is easy for most distributions because the PPA is natively supported.

Ubuntu/ Debian / Mint
You may also need to install the moc-ffmpeg-plugin
Type this command in your terminal to install both moc and its plugin.
 sudo apt-get install moc moc-ffmpeg-plugin  
If you prefer installation via the .deb package or are interested in its source code, visit the downloads page linked below.
If you encounter any problems during installation visit their downloads page.

Launch moc
To launch the moc player, type this command in your terminal.
 mocp  
The following window appears 




Navigate to your music directory using the arrow keys on your keyboard.

Create a playlist.
To create a playlist in moc, select the track you want and press A.
To add an entire directory of songs in your playlist, select the directory and press Shift + A.
Save the playlist using Shift + V as m3u file and load it whenever you want.
U - move up
J - move down
esc - to exit the playlist
Tab - switch between file list and playlists
enter - play music
space - pause or continue
shift+ S - shuffle

Navigation Shortcuts
Q - hide moc interface or return to the terminal window without closing moc. The music will continue playing.
To return to the moc interface type mocp in your terminal.
Output of Q option on moc interface
To stop the music from playing, type this in your terminal
mocp -x
P- play music
B - previous track
N - next track
To get more controls, you can access the help menu using Shift + ?
If you are interested in the source code, it can be found in their website.
There are a couple of themes to choose from. To find them use Shift + T.
Here is the list of available themes and their appearance.
  • black_theme

  • darkdot_theme

  • example_theme is the default theme.
  • green_theme
  • moca_theme
  • nightly_theme
  • red_theme
  • transparent-background
  • yellow_red_theme

When you change the theme, it doesn't seem to stick. So when you load the player the next time, it is back to its default theme.
It probably needs to be configured into a file. If you happen to know how to do that, please leave the steps in the comment section below.
Otherwise it works just as well as any other music player.

Please let me know your experience with moc player in the comments section below.

Comments

  1. this is interesting at least it will save on my ram usage

    ReplyDelete
    Replies
    1. There are more apps actually cmus etc. I will cover them soon

      Delete

Post a Comment

Your input is valued. Please type something....